@galaxy-io/dls 1.2.7 → 1.3.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 (305) hide show
  1. package/README.md +2 -0
  2. package/dist/avatar/Avatar.d.ts +2 -1
  3. package/dist/avatar/Avatar.js +103 -14
  4. package/dist/buttons/Button.d.ts +6 -1
  5. package/dist/buttons/Button.js +8 -4
  6. package/dist/charts/BarChart.d.ts +30 -20
  7. package/dist/charts/BarChart.js +183 -253
  8. package/dist/charts/ChartAxis.d.ts +47 -22
  9. package/dist/charts/ChartAxis.js +81 -60
  10. package/dist/charts/ChartCategoryTargets.d.ts +27 -0
  11. package/dist/charts/ChartCategoryTargets.js +75 -0
  12. package/dist/charts/ChartEmptyState.d.ts +17 -0
  13. package/dist/charts/ChartEmptyState.js +29 -0
  14. package/dist/charts/ChartFrame.d.ts +110 -0
  15. package/dist/charts/ChartFrame.js +143 -0
  16. package/dist/charts/ChartLegend.d.ts +27 -4
  17. package/dist/charts/ChartLegend.js +46 -23
  18. package/dist/charts/ChartPrimitives.d.ts +230 -0
  19. package/dist/charts/ChartPrimitives.js +305 -0
  20. package/dist/charts/ChartTooltip.d.ts +25 -4
  21. package/dist/charts/ChartTooltip.js +55 -49
  22. package/dist/charts/LineChart.d.ts +42 -20
  23. package/dist/charts/LineChart.js +175 -241
  24. package/dist/charts/PieChart.d.ts +48 -32
  25. package/dist/charts/PieChart.js +180 -170
  26. package/dist/charts/barChartGeometry.d.ts +120 -0
  27. package/dist/charts/barChartGeometry.js +210 -0
  28. package/dist/charts/barChartLegend.d.ts +25 -0
  29. package/dist/charts/barChartLegend.js +23 -0
  30. package/dist/charts/chartFormat.d.ts +27 -0
  31. package/dist/charts/chartFormat.js +71 -0
  32. package/dist/charts/chartScales.d.ts +120 -0
  33. package/dist/charts/chartScales.js +165 -0
  34. package/dist/charts/chartTheme.d.ts +18 -0
  35. package/dist/charts/chartTheme.js +26 -0
  36. package/dist/charts/constants.d.ts +241 -18
  37. package/dist/charts/constants.js +261 -32
  38. package/dist/charts/lineChartGeometry.d.ts +92 -0
  39. package/dist/charts/lineChartGeometry.js +134 -0
  40. package/dist/charts/pieChartGeometry.d.ts +60 -0
  41. package/dist/charts/pieChartGeometry.js +79 -0
  42. package/dist/charts/types.d.ts +428 -54
  43. package/dist/charts/types.js +155 -0
  44. package/dist/charts/useCartesianChartLayout.d.ts +70 -0
  45. package/dist/charts/useCartesianChartLayout.js +56 -0
  46. package/dist/charts/useChartDimensions.d.ts +47 -0
  47. package/dist/charts/useChartDimensions.js +63 -0
  48. package/dist/charts/useChartFormatters.d.ts +19 -0
  49. package/dist/charts/useChartFormatters.js +20 -0
  50. package/dist/charts/useChartInteraction.d.ts +76 -0
  51. package/dist/charts/useChartInteraction.js +126 -0
  52. package/dist/charts/useChartTooltipPosition.d.ts +53 -0
  53. package/dist/charts/useChartTooltipPosition.js +39 -0
  54. package/dist/charts/useSeriesColorResolver.d.ts +37 -0
  55. package/dist/charts/useSeriesColorResolver.js +27 -0
  56. package/dist/hooks/useElementClientSize.d.ts +20 -0
  57. package/dist/hooks/useElementClientSize.js +43 -0
  58. package/dist/inputs/CheckboxInput.d.ts +7 -2
  59. package/dist/inputs/CheckboxInput.js +30 -14
  60. package/dist/inputs/Input.d.ts +1 -1
  61. package/dist/inputs/Input.js +6 -2
  62. package/dist/inputs/MultiSelectInput.js +1 -1
  63. package/dist/inputs/RadioInput.js +7 -2
  64. package/dist/styles.css +69 -74
  65. package/dist/table/InfiniteSpreadsheet.d.ts +6 -0
  66. package/dist/table/InfiniteSpreadsheet.js +235 -0
  67. package/dist/table/InfiniteTable.d.ts +7 -88
  68. package/dist/table/InfiniteTable.js +366 -577
  69. package/dist/{spreadsheet → table}/SpreadsheetCell.d.ts +6 -4
  70. package/dist/table/SpreadsheetCell.js +71 -0
  71. package/dist/{spreadsheet → table}/SpreadsheetCellEditor.js +27 -21
  72. package/dist/table/SpreadsheetHeaderCell.d.ts +23 -0
  73. package/dist/table/SpreadsheetHeaderCell.js +91 -0
  74. package/dist/table/SpreadsheetMenuItem.d.ts +14 -0
  75. package/dist/table/SpreadsheetMenuItem.js +33 -0
  76. package/dist/table/SpreadsheetPrimitives.d.ts +172 -0
  77. package/dist/table/SpreadsheetPrimitives.js +105 -0
  78. package/dist/table/SpreadsheetRow.d.ts +33 -0
  79. package/dist/table/SpreadsheetRow.js +73 -0
  80. package/dist/{spreadsheet → table}/SpreadsheetRowActionCell.d.ts +5 -7
  81. package/dist/table/SpreadsheetRowActionCell.js +51 -0
  82. package/dist/table/TableExpandCell.d.ts +11 -0
  83. package/dist/table/TableExpandCell.js +24 -0
  84. package/dist/table/TableExpandedRow.d.ts +16 -0
  85. package/dist/table/TableExpandedRow.js +77 -0
  86. package/dist/table/TableHeaderCellContent.d.ts +30 -0
  87. package/dist/table/TableHeaderCellContent.js +48 -0
  88. package/dist/table/TablePrimitives.d.ts +307 -0
  89. package/dist/table/TablePrimitives.js +298 -0
  90. package/dist/table/TableSelectCell.d.ts +18 -0
  91. package/dist/table/TableSelectCell.js +26 -0
  92. package/dist/table/TableStatusRow.d.ts +18 -0
  93. package/dist/table/TableStatusRow.js +50 -0
  94. package/dist/table/VirtualizedInfiniteTable.d.ts +11 -27
  95. package/dist/table/VirtualizedInfiniteTable.js +182 -317
  96. package/dist/table/types.d.ts +249 -0
  97. package/dist/table/types.js +51 -0
  98. package/dist/table/useInfiniteScrollSentinel.d.ts +24 -0
  99. package/dist/table/useInfiniteScrollSentinel.js +53 -0
  100. package/dist/{spreadsheet/hooks → table}/useSpreadsheetEditing.d.ts +1 -1
  101. package/dist/{spreadsheet/hooks → table}/useSpreadsheetEditing.js +1 -1
  102. package/dist/table/useTableColumnLayout.d.ts +28 -0
  103. package/dist/table/useTableColumnLayout.js +63 -0
  104. package/dist/table/useTableColumnResize.d.ts +38 -0
  105. package/dist/table/useTableColumnResize.js +155 -0
  106. package/dist/table/useTableKeyboardNavigation.d.ts +25 -0
  107. package/dist/table/useTableKeyboardNavigation.js +83 -0
  108. package/dist/table/useTableRowExpansion.d.ts +24 -0
  109. package/dist/table/useTableRowExpansion.js +62 -0
  110. package/dist/table/useTableRowSelection.d.ts +27 -0
  111. package/dist/table/useTableRowSelection.js +94 -0
  112. package/dist/table/utils.d.ts +50 -0
  113. package/dist/table/utils.js +78 -0
  114. package/dist/text/MarkdownText.js +45 -27
  115. package/dist/theme/variants/dark.js +1 -1
  116. package/dist/widget/Widget.d.ts +2 -0
  117. package/dist/widget/Widget.js +14 -7
  118. package/package.json +1 -5
  119. package/dist/assets/components/enrichment/PerplexityIcon.d.ts +0 -3
  120. package/dist/assets/components/enrichment/PerplexityIcon.js +0 -35
  121. package/dist/assets/components/enrichment/TavilyIcon.d.ts +0 -3
  122. package/dist/assets/components/enrichment/TavilyIcon.js +0 -15
  123. package/dist/assets/components/onboarding/TenantSetupDark.d.ts +0 -3
  124. package/dist/assets/components/onboarding/TenantSetupDark.js +0 -498
  125. package/dist/assets/components/onboarding/TenantSetupLight.d.ts +0 -3
  126. package/dist/assets/components/onboarding/TenantSetupLight.js +0 -482
  127. package/dist/assets/components/onboarding/UserSetupDark.d.ts +0 -3
  128. package/dist/assets/components/onboarding/UserSetupDark.js +0 -1086
  129. package/dist/assets/components/onboarding/UserSetupLight.d.ts +0 -3
  130. package/dist/assets/components/onboarding/UserSetupLight.js +0 -1024
  131. package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.d.ts +0 -3
  132. package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.js +0 -466
  133. package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.d.ts +0 -3
  134. package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.js +0 -460
  135. package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.d.ts +0 -3
  136. package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.js +0 -336
  137. package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.d.ts +0 -3
  138. package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.js +0 -336
  139. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.d.ts +0 -3
  140. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.js +0 -153
  141. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.d.ts +0 -3
  142. package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.js +0 -153
  143. package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.d.ts +0 -3
  144. package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.js +0 -117
  145. package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.d.ts +0 -3
  146. package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.js +0 -117
  147. package/dist/assets/components/projects/MappingMethodBlankDark.d.ts +0 -3
  148. package/dist/assets/components/projects/MappingMethodBlankDark.js +0 -150
  149. package/dist/assets/components/projects/MappingMethodBlankDarkHovered.d.ts +0 -3
  150. package/dist/assets/components/projects/MappingMethodBlankDarkHovered.js +0 -150
  151. package/dist/assets/components/projects/MappingMethodBlankLight.d.ts +0 -3
  152. package/dist/assets/components/projects/MappingMethodBlankLight.js +0 -150
  153. package/dist/assets/components/projects/MappingMethodBlankLightHovered.d.ts +0 -3
  154. package/dist/assets/components/projects/MappingMethodBlankLightHovered.js +0 -150
  155. package/dist/assets/components/projects/MappingMethodJsonDark.d.ts +0 -3
  156. package/dist/assets/components/projects/MappingMethodJsonDark.js +0 -90
  157. package/dist/assets/components/projects/MappingMethodJsonDarkHovered.d.ts +0 -3
  158. package/dist/assets/components/projects/MappingMethodJsonDarkHovered.js +0 -90
  159. package/dist/assets/components/projects/MappingMethodJsonLight.d.ts +0 -3
  160. package/dist/assets/components/projects/MappingMethodJsonLight.js +0 -90
  161. package/dist/assets/components/projects/MappingMethodJsonLightHovered.d.ts +0 -3
  162. package/dist/assets/components/projects/MappingMethodJsonLightHovered.js +0 -90
  163. package/dist/assets/components/projects/ProjectsEmptyStateDark.d.ts +0 -3
  164. package/dist/assets/components/projects/ProjectsEmptyStateDark.js +0 -454
  165. package/dist/assets/components/projects/ProjectsEmptyStateLight.d.ts +0 -3
  166. package/dist/assets/components/projects/ProjectsEmptyStateLight.js +0 -456
  167. package/dist/assets/components/root/CreateProjectActionCardDark.d.ts +0 -3
  168. package/dist/assets/components/root/CreateProjectActionCardDark.js +0 -1796
  169. package/dist/assets/components/root/CreateProjectActionCardDarkHovered.d.ts +0 -3
  170. package/dist/assets/components/root/CreateProjectActionCardDarkHovered.js +0 -1796
  171. package/dist/assets/components/root/CreateProjectActionCardLight.d.ts +0 -3
  172. package/dist/assets/components/root/CreateProjectActionCardLight.js +0 -1786
  173. package/dist/assets/components/root/CreateProjectActionCardLightHovered.d.ts +0 -3
  174. package/dist/assets/components/root/CreateProjectActionCardLightHovered.js +0 -1786
  175. package/dist/assets/components/root/CreateSourceActionCardDark.d.ts +0 -3
  176. package/dist/assets/components/root/CreateSourceActionCardDark.js +0 -879
  177. package/dist/assets/components/root/CreateSourceActionCardDarkHovered.d.ts +0 -3
  178. package/dist/assets/components/root/CreateSourceActionCardDarkHovered.js +0 -879
  179. package/dist/assets/components/root/CreateSourceActionCardLight.d.ts +0 -3
  180. package/dist/assets/components/root/CreateSourceActionCardLight.js +0 -889
  181. package/dist/assets/components/root/CreateSourceActionCardLightHovered.d.ts +0 -3
  182. package/dist/assets/components/root/CreateSourceActionCardLightHovered.js +0 -889
  183. package/dist/assets/components/sources/AttioIcon.d.ts +0 -3
  184. package/dist/assets/components/sources/AttioIcon.js +0 -11
  185. package/dist/assets/components/sources/BigquerySourceIcon.d.ts +0 -3
  186. package/dist/assets/components/sources/BigquerySourceIcon.js +0 -39
  187. package/dist/assets/components/sources/BrowserbaseSourceIcon.d.ts +0 -3
  188. package/dist/assets/components/sources/BrowserbaseSourceIcon.js +0 -35
  189. package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.d.ts +0 -3
  190. package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.js +0 -13
  191. package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.d.ts +0 -3
  192. package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.js +0 -13
  193. package/dist/assets/components/sources/ConfluenceSourceIcon.d.ts +0 -3
  194. package/dist/assets/components/sources/ConfluenceSourceIcon.js +0 -30
  195. package/dist/assets/components/sources/GithubSourceIcon.d.ts +0 -3
  196. package/dist/assets/components/sources/GithubSourceIcon.js +0 -27
  197. package/dist/assets/components/sources/GoogleDriveIcon.d.ts +0 -3
  198. package/dist/assets/components/sources/GoogleDriveIcon.js +0 -45
  199. package/dist/assets/components/sources/HubspotSourceIcon.d.ts +0 -3
  200. package/dist/assets/components/sources/HubspotSourceIcon.js +0 -14
  201. package/dist/assets/components/sources/JiraSourceIcon.d.ts +0 -3
  202. package/dist/assets/components/sources/JiraSourceIcon.js +0 -54
  203. package/dist/assets/components/sources/LinearSourceIcon.d.ts +0 -3
  204. package/dist/assets/components/sources/LinearSourceIcon.js +0 -14
  205. package/dist/assets/components/sources/MysqlLogoSourceIconDark.d.ts +0 -3
  206. package/dist/assets/components/sources/MysqlLogoSourceIconDark.js +0 -17
  207. package/dist/assets/components/sources/NetsuiteSourceIcon.d.ts +0 -3
  208. package/dist/assets/components/sources/NetsuiteSourceIcon.js +0 -32
  209. package/dist/assets/components/sources/NotionIcon.d.ts +0 -3
  210. package/dist/assets/components/sources/NotionIcon.js +0 -20
  211. package/dist/assets/components/sources/PostgresqlIcon.d.ts +0 -3
  212. package/dist/assets/components/sources/PostgresqlIcon.js +0 -61
  213. package/dist/assets/components/sources/S3Icon.d.ts +0 -3
  214. package/dist/assets/components/sources/S3Icon.js +0 -76
  215. package/dist/assets/components/sources/SalesforceSourceIcon.d.ts +0 -3
  216. package/dist/assets/components/sources/SalesforceSourceIcon.js +0 -23
  217. package/dist/assets/components/sources/SlackIcon.d.ts +0 -3
  218. package/dist/assets/components/sources/SlackIcon.js +0 -32
  219. package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.d.ts +0 -3
  220. package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.js +0 -14
  221. package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.d.ts +0 -3
  222. package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.js +0 -14
  223. package/dist/assets/components/sources/WikipediaSourceIcon.d.ts +0 -3
  224. package/dist/assets/components/sources/WikipediaSourceIcon.js +0 -1490
  225. package/dist/avatar/AvatarEmpty.d.ts +0 -7
  226. package/dist/avatar/AvatarEmpty.js +0 -99
  227. package/dist/avatar/types.d.ts +0 -5
  228. package/dist/avatar/types.js +0 -9
  229. package/dist/charts/utils.d.ts +0 -29
  230. package/dist/charts/utils.js +0 -62
  231. package/dist/icons/BackIcon.d.ts +0 -3
  232. package/dist/icons/BackIcon.js +0 -13
  233. package/dist/icons/CloseIcon.d.ts +0 -3
  234. package/dist/icons/CloseIcon.js +0 -13
  235. package/dist/icons/CreateIcon.d.ts +0 -3
  236. package/dist/icons/CreateIcon.js +0 -13
  237. package/dist/icons/ForwardIcon.d.ts +0 -3
  238. package/dist/icons/ForwardIcon.js +0 -13
  239. package/dist/icons/HelpIcon.d.ts +0 -3
  240. package/dist/icons/HelpIcon.js +0 -14
  241. package/dist/icons/ProjectsIcon.d.ts +0 -3
  242. package/dist/icons/ProjectsIcon.js +0 -12
  243. package/dist/icons/SearchIcon.d.ts +0 -3
  244. package/dist/icons/SearchIcon.js +0 -12
  245. package/dist/icons/SourcesIcon.d.ts +0 -3
  246. package/dist/icons/SourcesIcon.js +0 -12
  247. package/dist/icons/TextIcon.d.ts +0 -4
  248. package/dist/icons/TextIcon.js +0 -22
  249. package/dist/icons/WebScrapeIcon.d.ts +0 -4
  250. package/dist/icons/WebScrapeIcon.js +0 -22
  251. package/dist/icons/WebhookIcon.d.ts +0 -4
  252. package/dist/icons/WebhookIcon.js +0 -22
  253. package/dist/icons/sources/AttioLogomark.d.ts +0 -4
  254. package/dist/icons/sources/AttioLogomark.js +0 -8
  255. package/dist/icons/sources/BrowserbaseLogomark.d.ts +0 -4
  256. package/dist/icons/sources/BrowserbaseLogomark.js +0 -8
  257. package/dist/icons/sources/ClickhouseLogomark.d.ts +0 -4
  258. package/dist/icons/sources/ClickhouseLogomark.js +0 -16
  259. package/dist/icons/sources/ConfluenceLogomark.d.ts +0 -4
  260. package/dist/icons/sources/ConfluenceLogomark.js +0 -8
  261. package/dist/icons/sources/GithubLogomark.d.ts +0 -4
  262. package/dist/icons/sources/GithubLogomark.js +0 -8
  263. package/dist/icons/sources/GoogleBigqueryLogomark.d.ts +0 -4
  264. package/dist/icons/sources/GoogleBigqueryLogomark.js +0 -8
  265. package/dist/icons/sources/GoogleDriveLogomark.d.ts +0 -4
  266. package/dist/icons/sources/GoogleDriveLogomark.js +0 -8
  267. package/dist/icons/sources/HubspotLogomark.d.ts +0 -4
  268. package/dist/icons/sources/HubspotLogomark.js +0 -8
  269. package/dist/icons/sources/JiraLogomark.d.ts +0 -4
  270. package/dist/icons/sources/JiraLogomark.js +0 -8
  271. package/dist/icons/sources/LinearLogomark.d.ts +0 -4
  272. package/dist/icons/sources/LinearLogomark.js +0 -8
  273. package/dist/icons/sources/MySQLLogomark.d.ts +0 -4
  274. package/dist/icons/sources/MySQLLogomark.js +0 -8
  275. package/dist/icons/sources/NetsuiteLogomark.d.ts +0 -4
  276. package/dist/icons/sources/NetsuiteLogomark.js +0 -8
  277. package/dist/icons/sources/NotionLogomark.d.ts +0 -4
  278. package/dist/icons/sources/NotionLogomark.js +0 -8
  279. package/dist/icons/sources/PostgresLogomark.d.ts +0 -4
  280. package/dist/icons/sources/PostgresLogomark.js +0 -8
  281. package/dist/icons/sources/S3Logomark.d.ts +0 -4
  282. package/dist/icons/sources/S3Logomark.js +0 -8
  283. package/dist/icons/sources/SalesforceLogomark.d.ts +0 -4
  284. package/dist/icons/sources/SalesforceLogomark.js +0 -8
  285. package/dist/icons/sources/SlackLogoIconmark.d.ts +0 -4
  286. package/dist/icons/sources/SlackLogoIconmark.js +0 -8
  287. package/dist/icons/sources/SnowflakeLogomark.d.ts +0 -4
  288. package/dist/icons/sources/SnowflakeLogomark.js +0 -16
  289. package/dist/icons/sources/WikipediaLogomark.d.ts +0 -4
  290. package/dist/icons/sources/WikipediaLogomark.js +0 -8
  291. package/dist/spreadsheet/InfiniteSpreadsheet.d.ts +0 -3
  292. package/dist/spreadsheet/InfiniteSpreadsheet.js +0 -265
  293. package/dist/spreadsheet/SpreadsheetAddColumnButton.d.ts +0 -6
  294. package/dist/spreadsheet/SpreadsheetAddColumnButton.js +0 -32
  295. package/dist/spreadsheet/SpreadsheetCell.js +0 -115
  296. package/dist/spreadsheet/SpreadsheetHeaderCell.d.ts +0 -18
  297. package/dist/spreadsheet/SpreadsheetHeaderCell.js +0 -141
  298. package/dist/spreadsheet/SpreadsheetRow.d.ts +0 -21
  299. package/dist/spreadsheet/SpreadsheetRow.js +0 -68
  300. package/dist/spreadsheet/SpreadsheetRowActionCell.js +0 -78
  301. package/dist/spreadsheet/hooks/useColumnResize.d.ts +0 -6
  302. package/dist/spreadsheet/hooks/useColumnResize.js +0 -46
  303. package/dist/spreadsheet/types.d.ts +0 -92
  304. package/dist/spreadsheet/types.js +0 -21
  305. /package/dist/{spreadsheet → table}/SpreadsheetCellEditor.d.ts +0 -0
@@ -1,28 +1,51 @@
1
- import Text, { TextSize, TextVariant } from "../text/Text.js";
2
- import FlexWrapper, { AlignItems, FlexDirection } from "../containers/FlexWrapper.js";
1
+ import Text, { TextSize } from "../text/Text.js";
3
2
  import Circle from "../shapes/Circle.js";
4
- import { resolveSeriesColor } from "./utils.js";
5
- import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { ChartMarkState } from "./types.js";
4
+ import { ChartLegendItemButton, ChartLegendItemStatic, ChartLegendRow } from "./ChartPrimitives.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/charts/ChartLegend.tsx
7
- var ChartLegend = ({ series, palette }) => {
8
- return /* @__PURE__ */ jsx(FlexWrapper, {
9
- direction: FlexDirection.ROW,
10
- alignItems: AlignItems.CENTER,
11
- gap: 16,
12
- children: series.map((s, i) => {
13
- const color = resolveSeriesColor(s, i, palette);
14
- return /* @__PURE__ */ jsxs(FlexWrapper, {
15
- alignItems: AlignItems.CENTER,
16
- gap: 6,
17
- children: [/* @__PURE__ */ jsx(Circle, {
18
- size: 8,
19
- hex: color
20
- }), /* @__PURE__ */ jsx(Text, {
21
- size: TextSize.CAPTION,
22
- variant: TextVariant.TERTIARY,
23
- children: s.name
24
- })]
25
- }, s.key);
7
+ /**
8
+ * Legend for the chart components.
9
+ *
10
+ * Hovering an entry isolates its series and clicking pins that isolation.
11
+ *
12
+ * Deliberately *not* a visibility toggle: hiding a series would have to rescale
13
+ * the value axis to stay honest — otherwise the remaining bars sit mysteriously
14
+ * short and that belongs with the geometry layer rather than bolted on here.
15
+ * Isolation only changes opacity, so the domain is untouched and the numbers
16
+ * keep meaning what they did.
17
+ */
18
+ var ChartLegend = ({ items, inset, hoveredKey = null, pinnedKey = null, onItemEnter, onItemLeave, onItemClick }) => {
19
+ if (items.length === 0) return null;
20
+ const isInteractive = Boolean(onItemEnter ?? onItemClick);
21
+ const activeKey = pinnedKey ?? hoveredKey;
22
+ return /* @__PURE__ */ jsx(ChartLegendRow, {
23
+ $inset: inset,
24
+ "data-active": activeKey !== null ? "true" : "false",
25
+ children: items.map((item) => {
26
+ const state = activeKey === null || item.key === activeKey ? ChartMarkState.ACTIVE : ChartMarkState.MUTED;
27
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Circle, {
28
+ size: 8,
29
+ hex: item.color
30
+ }), /* @__PURE__ */ jsx(Text, {
31
+ size: TextSize.BODY_SM,
32
+ children: item.label
33
+ })] });
34
+ if (!isInteractive) return /* @__PURE__ */ jsx(ChartLegendItemStatic, {
35
+ "data-state": state,
36
+ children: content
37
+ }, item.key);
38
+ return /* @__PURE__ */ jsx(ChartLegendItemButton, {
39
+ type: "button",
40
+ "data-state": state,
41
+ "aria-pressed": pinnedKey === item.key,
42
+ onMouseEnter: () => onItemEnter?.(item.key),
43
+ onMouseLeave: () => onItemLeave?.(),
44
+ onFocus: () => onItemEnter?.(item.key),
45
+ onBlur: () => onItemLeave?.(),
46
+ onClick: () => onItemClick?.(item.key),
47
+ children: content
48
+ }, item.key);
26
49
  })
27
50
  });
28
51
  };
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Outer container. Receives the measurement ref.
3
+ *
4
+ * `min-width: 0` is load-bearing rather than cosmetic — without it a chart in a
5
+ * flex row feeds its min-content width back into the ResizeObserver and the
6
+ * measurement can oscillate.
7
+ */
8
+ export declare const ChartRoot: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
9
+ $fillWidth?: boolean;
10
+ $fillHeight?: boolean;
11
+ }>;
12
+ /**
13
+ * Holds the plot, anchors the tooltip, and is the element that gets measured.
14
+ *
15
+ * Reserving the box from `aspect-ratio` or an explicit height means a
16
+ * `fillWidth` chart is the right size on its very first paint, instead of
17
+ * rendering at zero height and jumping once the observer reports.
18
+ *
19
+ * **`$fillHeight` is what makes "fill the container" tractable.** The chart root
20
+ * is a flex column of this box plus the legend, and the legend wraps, so its
21
+ * height is not known until after layout. Claiming the remaining track with
22
+ * `flex: 1` lets the browser do that subtraction during its own layout pass —
23
+ * measuring the root and subtracting a measured legend would instead be a
24
+ * second, dependent pass, and one that can oscillate under a ResizeObserver.
25
+ * `min-height: 0` is required with it: a flex item's automatic minimum size is
26
+ * its content, which would let the SVG hold the box open above its track.
27
+ */
28
+ export declare const ChartPlotBox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
29
+ $reservedHeight?: number;
30
+ $reservedAspectRatio?: number;
31
+ $fillHeight?: boolean;
32
+ }>;
33
+ /**
34
+ * `overflow: visible` lets a value label above a full-height bar paint outside
35
+ * the plot rather than being clipped by the root SVG.
36
+ */
37
+ export declare const ChartSvg: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGSVGElement> & Record<never, unknown>>;
38
+ /**
39
+ * Cancels the restore delay for every mark beneath it while a category is
40
+ * engaged. See {@link markState}.
41
+ */
42
+ export declare const ChartPlotGroup: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGGElement> & Record<never, unknown>>;
43
+ export declare const ChartBarPath: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGPathElement> & Record<never, unknown>>;
44
+ export declare const ChartLinePath: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGPathElement> & Record<never, unknown>>;
45
+ export declare const ChartAreaPath: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGPathElement> & Record<never, unknown>>;
46
+ export declare const ChartPointCircle: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGCircleElement> & Record<never, unknown>>;
47
+ export declare const ChartArcPath: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGPathElement> & Record<never, unknown>>;
48
+ /**
49
+ * Wrapper for the category target layer.
50
+ *
51
+ * Exists to carry the focus-ring colour: the targets themselves are plain
52
+ * `styled.x` because they receive refs (see the module note above), so they
53
+ * cannot read the theme directly. Setting `color` here lets them use
54
+ * `currentColor` and still take the token rather than inheriting whatever the
55
+ * consumer's page happens to set.
56
+ */
57
+ export declare const ChartCategoryTargetLayer: import("react").ComponentType<Pick<import("react").SVGProps<SVGGElement> & {
58
+ theme: import("../theme").Theme;
59
+ } & {
60
+ as?: React.ElementType;
61
+ }, "as" | keyof import("react").SVGProps<SVGGElement>> & {
62
+ theme?: import("@callstack/react-theme-provider").$DeepPartial<import("../theme").Theme> | undefined;
63
+ }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("react").SVGProps<SVGGElement> & {
64
+ theme: import("../theme").Theme;
65
+ } & {
66
+ as?: React.ElementType;
67
+ }> & {
68
+ __wyw_meta: unknown;
69
+ } & import("react").FunctionComponent<import("react").SVGProps<SVGGElement> & {
70
+ theme: import("../theme").Theme;
71
+ } & {
72
+ as?: React.ElementType;
73
+ }>, {}>;
74
+ /**
75
+ * Per-category hit target, rendered above the marks.
76
+ *
77
+ * Hit testing the full column rather than the bars themselves means a two-pixel
78
+ * bar is as easy to hover as a two-hundred-pixel one, and crossing between
79
+ * segments inside a category fires no events at all — so the tooltip holds
80
+ * still instead of chasing each segment.
81
+ */
82
+ export declare const ChartHitTarget: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGRectElement> & Record<never, unknown>>;
83
+ /**
84
+ * The radial equivalent, reusing the arc's own `d`.
85
+ *
86
+ * A pie has no category axis to band, so its targets are the arc shapes
87
+ * themselves — drawn again, transparent, above the marks. That keeps hit
88
+ * testing and focus identical across all three charts instead of the pie
89
+ * hit-testing its visible arcs directly.
90
+ */
91
+ export declare const ChartHitTargetPath: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGPathElement> & Record<never, unknown>>;
92
+ /** Full-plot backdrop; clicking it clears a pinned category. */
93
+ export declare const ChartBackdrop: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGRectElement> & Record<never, unknown>>;
94
+ /**
95
+ * Solid hairline rather than a dashed rule, and drawn at every tick including
96
+ * zero — the line under the bars is what makes them read as resting on a
97
+ * baseline.
98
+ */
99
+ export declare const ChartGridLine: import("react").ComponentType<Pick<import("react").SVGLineElementAttributes<SVGLineElement> & {
100
+ theme: import("../theme").Theme;
101
+ } & {
102
+ as?: React.ElementType;
103
+ }, "as" | keyof import("react").SVGLineElementAttributes<SVGLineElement>> & {
104
+ theme?: import("@callstack/react-theme-provider").$DeepPartial<import("../theme").Theme> | undefined;
105
+ }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("react").SVGLineElementAttributes<SVGLineElement> & {
106
+ theme: import("../theme").Theme;
107
+ } & {
108
+ as?: React.ElementType;
109
+ }> & {
110
+ __wyw_meta: unknown;
111
+ } & import("react").FunctionComponent<import("react").SVGLineElementAttributes<SVGLineElement> & {
112
+ theme: import("../theme").Theme;
113
+ } & {
114
+ as?: React.ElementType;
115
+ }>, {}>;
116
+ /** Vertical rule marking the hovered category on a line chart. */
117
+ export declare const ChartCursorLine: import("react").ComponentType<Pick<import("react").SVGLineElementAttributes<SVGLineElement> & {
118
+ theme: import("../theme").Theme;
119
+ } & {
120
+ as?: React.ElementType;
121
+ }, "as" | keyof import("react").SVGLineElementAttributes<SVGLineElement>> & {
122
+ theme?: import("@callstack/react-theme-provider").$DeepPartial<import("../theme").Theme> | undefined;
123
+ }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("react").SVGLineElementAttributes<SVGLineElement> & {
124
+ theme: import("../theme").Theme;
125
+ } & {
126
+ as?: React.ElementType;
127
+ }> & {
128
+ __wyw_meta: unknown;
129
+ } & import("react").FunctionComponent<import("react").SVGLineElementAttributes<SVGLineElement> & {
130
+ theme: import("../theme").Theme;
131
+ } & {
132
+ as?: React.ElementType;
133
+ }>, {}>;
134
+ export declare const ChartAxisLabelBox: import("@linaria/react").StyledComponent<import("react").SVGProps<SVGForeignObjectElement> & Record<never, unknown>>;
135
+ /**
136
+ * Positioned from coordinates already clamped to the chart box.
137
+ *
138
+ * `left`/`top` are transitioned so the tooltip slides between categories rather
139
+ * than teleporting, and it stays mounted while hidden so the fade can actually
140
+ * run — unmounting on hide is why a fade-out never appears.
141
+ */
142
+ export declare const ChartTooltipPositioner: import("react").ComponentType<Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
143
+ $x: number;
144
+ $y: number;
145
+ $isVisible: boolean;
146
+ } & {
147
+ theme: import("../theme").Theme;
148
+ } & {
149
+ as?: React.ElementType;
150
+ }, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement> | "as" | "$x" | "$y" | "$isVisible"> & {
151
+ theme?: import("@callstack/react-theme-provider").$DeepPartial<import("../theme").Theme> | undefined;
152
+ }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
153
+ $x: number;
154
+ $y: number;
155
+ $isVisible: boolean;
156
+ } & {
157
+ theme: import("../theme").Theme;
158
+ } & {
159
+ as?: React.ElementType;
160
+ }> & {
161
+ __wyw_meta: unknown;
162
+ } & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
163
+ $x: number;
164
+ $y: number;
165
+ $isVisible: boolean;
166
+ } & {
167
+ theme: import("../theme").Theme;
168
+ } & {
169
+ as?: React.ElementType;
170
+ }>, {}>;
171
+ /**
172
+ * Content well inside a donut hole.
173
+ *
174
+ * Rendered as HTML positioned over the SVG rather than as `<text>`, so the
175
+ * caller can compose it from the same `Text` and layout primitives as the rest
176
+ * of the DLS. `pointer-events: none` keeps it from stealing hover from the arc
177
+ * behind it.
178
+ */
179
+ export declare const ChartCenterBox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
180
+ $centerX: number;
181
+ $centerY: number;
182
+ $diameter: number;
183
+ }>;
184
+ /**
185
+ * Sits slightly above centre, over where the bars would be, so the axes stay
186
+ * legible underneath.
187
+ */
188
+ export declare const ChartEmptyOverlay: import("react").ComponentType<Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
189
+ theme: import("../theme").Theme;
190
+ } & {
191
+ as?: React.ElementType;
192
+ }, keyof import("react").ClassAttributes<HTMLDivElement> | keyof import("react").HTMLAttributes<HTMLDivElement> | "as"> & {
193
+ theme?: import("@callstack/react-theme-provider").$DeepPartial<import("../theme").Theme> | undefined;
194
+ }> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
195
+ theme: import("../theme").Theme;
196
+ } & {
197
+ as?: React.ElementType;
198
+ }> & {
199
+ __wyw_meta: unknown;
200
+ } & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
201
+ theme: import("../theme").Theme;
202
+ } & {
203
+ as?: React.ElementType;
204
+ }>, {}>;
205
+ /**
206
+ * Aligns the legend under the plot rather than the value-axis gutter.
207
+ *
208
+ * Also cancels the restore delay for its entries while the legend is dimming,
209
+ * exactly as {@link ChartPlotGroup} does for the marks. The legend renders
210
+ * *outside* the SVG, so the plot group's selector cannot reach it — without this
211
+ * the marks dim instantly while their legend entries sit through the full
212
+ * {@link CHART_RESTORE_DELAY_MS}, and the two visibly fall out of step.
213
+ */
214
+ export declare const ChartLegendRow: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
215
+ $inset: number;
216
+ }>;
217
+ /**
218
+ * One legend entry, when the legend is interactive.
219
+ *
220
+ * A real `<button>` rather than a styled div: it is clickable, so it has to be
221
+ * reachable and operable by keyboard. `aria-pressed` carries the pinned state —
222
+ * the only thing here a screen reader can truthfully announce, since the plot
223
+ * itself is `role="img"` and its marks are not in the accessibility tree.
224
+ *
225
+ * Shares the mark opacity ramp via `data-state`, so an entry recedes in step
226
+ * with the series it names.
227
+ */
228
+ export declare const ChartLegendItemButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
229
+ /** The same row, when the legend is inert — no button semantics to announce. */
230
+ export declare const ChartLegendItemStatic: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,305 @@
1
+ import { withTheme } from "../theme/GalaxyTheme.js";
2
+ /* empty css */
3
+ import { styled } from "@linaria/react";
4
+ //#region src/charts/ChartPrimitives.tsx
5
+ /**
6
+ * Styled leaves shared by the chart components.
7
+ *
8
+ * Linaria evaluates this module at build time, so it may import from
9
+ * `constants.ts` only — a component, framer-motion or Phosphor import here
10
+ * would be dragged into build-time evaluation.
11
+ *
12
+ * **SVG marks carry state as `data-*` attributes, never as `$`-prefixed props.**
13
+ * `@linaria/react` builds its tag allow-list as
14
+ * `new Set([...elements.html, elements.svg])` — the spread is missing on the
15
+ * second array, so `has('rect')` is false, `propsAsIs` turns on, and every prop
16
+ * is forwarded verbatim to the DOM. A `$isDimmed` prop reaches the element and
17
+ * React warns. Attribute selectors sidestep this entirely and keep the CSS
18
+ * static, which suits a zero-runtime setup better anyway.
19
+ *
20
+ * Leaves that receive a ref use plain `styled.x` rather than `withTheme`: the
21
+ * HOC's return type erases the element type, so a mismatched ref would compile.
22
+ */
23
+ /**
24
+ * Shared emphasis ramp.
25
+ *
26
+ * The delay asymmetry is deliberate and load-bearing: highlighting is instant,
27
+ * but restoring waits, so sweeping the pointer across categories reads as one
28
+ * gesture instead of a strobe. The plot sets `data-active` while any category is
29
+ * engaged, which cancels the delay for the whole subtree.
30
+ */
31
+ /**
32
+ * Outer container. Receives the measurement ref.
33
+ *
34
+ * `min-width: 0` is load-bearing rather than cosmetic — without it a chart in a
35
+ * flex row feeds its min-content width back into the ResizeObserver and the
36
+ * measurement can oscillate.
37
+ */
38
+ var _exp = () => ({ $fillWidth }) => $fillWidth ? "flex" : "inline-flex";
39
+ var _exp2 = () => ({ $fillWidth }) => $fillWidth ? "100%" : "auto";
40
+ var _exp3 = () => ({ $fillHeight }) => $fillHeight ? "100%" : "auto";
41
+ var ChartRoot = /*#__PURE__*/ styled("div")({
42
+ name: "ChartRoot",
43
+ class: "c1hcga6s",
44
+ propsAsIs: false,
45
+ vars: {
46
+ "c1hcga6s-0": [_exp()],
47
+ "c1hcga6s-1": [_exp2()],
48
+ "c1hcga6s-2": [_exp3()]
49
+ }
50
+ });
51
+ /**
52
+ * Holds the plot, anchors the tooltip, and is the element that gets measured.
53
+ *
54
+ * Reserving the box from `aspect-ratio` or an explicit height means a
55
+ * `fillWidth` chart is the right size on its very first paint, instead of
56
+ * rendering at zero height and jumping once the observer reports.
57
+ *
58
+ * **`$fillHeight` is what makes "fill the container" tractable.** The chart root
59
+ * is a flex column of this box plus the legend, and the legend wraps, so its
60
+ * height is not known until after layout. Claiming the remaining track with
61
+ * `flex: 1` lets the browser do that subtraction during its own layout pass —
62
+ * measuring the root and subtracting a measured legend would instead be a
63
+ * second, dependent pass, and one that can oscillate under a ResizeObserver.
64
+ * `min-height: 0` is required with it: a flex item's automatic minimum size is
65
+ * its content, which would let the SVG hold the box open above its track.
66
+ */
67
+ var _exp4 = () => ({ $reservedAspectRatio }) => $reservedAspectRatio ?? "auto";
68
+ var _exp5 = () => ({ $reservedHeight }) => $reservedHeight ? `${$reservedHeight}px` : "auto";
69
+ var _exp6 = () => ({ $fillHeight }) => $fillHeight ? "1 1 0%" : "0 1 auto";
70
+ var _exp7 = () => ({ $fillHeight }) => $fillHeight ? "0" : "auto";
71
+ var ChartPlotBox = /*#__PURE__*/ styled("div")({
72
+ name: "ChartPlotBox",
73
+ class: "c1fvbgkp",
74
+ propsAsIs: false,
75
+ vars: {
76
+ "c1fvbgkp-0": [_exp4()],
77
+ "c1fvbgkp-1": [_exp5()],
78
+ "c1fvbgkp-2": [_exp6()],
79
+ "c1fvbgkp-3": [_exp7()]
80
+ }
81
+ });
82
+ /**
83
+ * `overflow: visible` lets a value label above a full-height bar paint outside
84
+ * the plot rather than being clipped by the root SVG.
85
+ */
86
+ var ChartSvg = /*#__PURE__*/ styled("svg")({
87
+ name: "ChartSvg",
88
+ class: "c10uj5yt",
89
+ propsAsIs: false
90
+ });
91
+ /**
92
+ * Cancels the restore delay for every mark beneath it while a category is
93
+ * engaged. See {@link markState}.
94
+ */
95
+ var ChartPlotGroup = /*#__PURE__*/ styled("g")({
96
+ name: "ChartPlotGroup",
97
+ class: "cyuty3o",
98
+ propsAsIs: true
99
+ });
100
+ var ChartBarPath = /*#__PURE__*/ styled("path")({
101
+ name: "ChartBarPath",
102
+ class: "c1ob2op2",
103
+ propsAsIs: true
104
+ });
105
+ var ChartLinePath = /*#__PURE__*/ styled("path")({
106
+ name: "ChartLinePath",
107
+ class: "c8c506o",
108
+ propsAsIs: true
109
+ });
110
+ var ChartAreaPath = /*#__PURE__*/ styled("path")({
111
+ name: "ChartAreaPath",
112
+ class: "ceqlpek",
113
+ propsAsIs: true
114
+ });
115
+ var ChartPointCircle = /*#__PURE__*/ styled("circle")({
116
+ name: "ChartPointCircle",
117
+ class: "c1fcbddl",
118
+ propsAsIs: true
119
+ });
120
+ var ChartArcPath = /*#__PURE__*/ styled("path")({
121
+ name: "ChartArcPath",
122
+ class: "cpcxr59",
123
+ propsAsIs: true
124
+ });
125
+ /**
126
+ * Wrapper for the category target layer.
127
+ *
128
+ * Exists to carry the focus-ring colour: the targets themselves are plain
129
+ * `styled.x` because they receive refs (see the module note above), so they
130
+ * cannot read the theme directly. Setting `color` here lets them use
131
+ * `currentColor` and still take the token rather than inheriting whatever the
132
+ * consumer's page happens to set.
133
+ */
134
+ var _exp11 = () => ({ theme }) => theme.color.border.selected;
135
+ var ChartCategoryTargetLayer = withTheme(/*#__PURE__*/ styled("g")({
136
+ name: "ChartCategoryTargetLayer",
137
+ class: "c1wvzvu4",
138
+ propsAsIs: true,
139
+ vars: { "c1wvzvu4-0": [_exp11()] }
140
+ }));
141
+ /**
142
+ * Shared by both target shapes.
143
+ *
144
+ * The ring is a `stroke`, not an `outline`: `outline` on SVG elements is a late
145
+ * arrival in WebKit and `outline-offset` behaves inconsistently across engines,
146
+ * while a stroke on a transparent shape is universally supported — and it
147
+ * traces a pie arc, which a rectangular outline could not.
148
+ */
149
+ /**
150
+ * Per-category hit target, rendered above the marks.
151
+ *
152
+ * Hit testing the full column rather than the bars themselves means a two-pixel
153
+ * bar is as easy to hover as a two-hundred-pixel one, and crossing between
154
+ * segments inside a category fires no events at all — so the tooltip holds
155
+ * still instead of chasing each segment.
156
+ */
157
+ var ChartHitTarget = /*#__PURE__*/ styled("rect")({
158
+ name: "ChartHitTarget",
159
+ class: "c17guewt",
160
+ propsAsIs: true
161
+ });
162
+ /**
163
+ * The radial equivalent, reusing the arc's own `d`.
164
+ *
165
+ * A pie has no category axis to band, so its targets are the arc shapes
166
+ * themselves — drawn again, transparent, above the marks. That keeps hit
167
+ * testing and focus identical across all three charts instead of the pie
168
+ * hit-testing its visible arcs directly.
169
+ */
170
+ var ChartHitTargetPath = /*#__PURE__*/ styled("path")({
171
+ name: "ChartHitTargetPath",
172
+ class: "cblgiyf",
173
+ propsAsIs: true
174
+ });
175
+ /** Full-plot backdrop; clicking it clears a pinned category. */
176
+ var ChartBackdrop = /*#__PURE__*/ styled("rect")({
177
+ name: "ChartBackdrop",
178
+ class: "c1lr03cc",
179
+ propsAsIs: true
180
+ });
181
+ /**
182
+ * Solid hairline rather than a dashed rule, and drawn at every tick including
183
+ * zero — the line under the bars is what makes them read as resting on a
184
+ * baseline.
185
+ */
186
+ var _exp14 = () => ({ theme }) => theme.color.border.primary;
187
+ var ChartGridLine = withTheme(/*#__PURE__*/ styled("line")({
188
+ name: "ChartGridLine",
189
+ class: "cizy1s8",
190
+ propsAsIs: true,
191
+ vars: { "cizy1s8-0": [_exp14()] }
192
+ }));
193
+ /** Vertical rule marking the hovered category on a line chart. */
194
+ var _exp15 = () => ({ theme }) => theme.color.border.secondary;
195
+ var ChartCursorLine = withTheme(/*#__PURE__*/ styled("line")({
196
+ name: "ChartCursorLine",
197
+ class: "c1ukq11d",
198
+ propsAsIs: true,
199
+ vars: { "c1ukq11d-0": [_exp15()] }
200
+ }));
201
+ var ChartAxisLabelBox = /*#__PURE__*/ styled("foreignObject")({
202
+ name: "ChartAxisLabelBox",
203
+ class: "cwcko2m",
204
+ propsAsIs: true
205
+ });
206
+ /**
207
+ * Positioned from coordinates already clamped to the chart box.
208
+ *
209
+ * `left`/`top` are transitioned so the tooltip slides between categories rather
210
+ * than teleporting, and it stays mounted while hidden so the fade can actually
211
+ * run — unmounting on hide is why a fade-out never appears.
212
+ */
213
+ var _exp16 = () => ({ $x }) => `${$x}px`;
214
+ var _exp17 = () => ({ $y }) => `${$y}px`;
215
+ var _exp20 = () => ({ theme }) => theme.color.border.primary;
216
+ var _exp21 = () => ({ theme }) => theme.color.background.primary;
217
+ var _exp22 = () => ({ $isVisible }) => $isVisible ? 1 : 0;
218
+ var ChartTooltipPositioner = withTheme(/*#__PURE__*/ styled("div")({
219
+ name: "ChartTooltipPositioner",
220
+ class: "cqwhvyz",
221
+ propsAsIs: false,
222
+ vars: {
223
+ "cqwhvyz-0": [_exp16()],
224
+ "cqwhvyz-1": [_exp17()],
225
+ "cqwhvyz-2": [_exp20()],
226
+ "cqwhvyz-3": [_exp21()],
227
+ "cqwhvyz-4": [_exp22()]
228
+ }
229
+ }));
230
+ /**
231
+ * Content well inside a donut hole.
232
+ *
233
+ * Rendered as HTML positioned over the SVG rather than as `<text>`, so the
234
+ * caller can compose it from the same `Text` and layout primitives as the rest
235
+ * of the DLS. `pointer-events: none` keeps it from stealing hover from the arc
236
+ * behind it.
237
+ */
238
+ var _exp26 = () => ({ $centerX }) => `${$centerX}px`;
239
+ var _exp27 = () => ({ $centerY }) => `${$centerY}px`;
240
+ var _exp29 = () => ({ $diameter }) => `${$diameter}px`;
241
+ var ChartCenterBox = /*#__PURE__*/ styled("div")({
242
+ name: "ChartCenterBox",
243
+ class: "c1iaray",
244
+ propsAsIs: false,
245
+ vars: {
246
+ "c1iaray-0": [_exp26()],
247
+ "c1iaray-1": [_exp27()],
248
+ "c1iaray-2": [_exp29()]
249
+ }
250
+ });
251
+ /**
252
+ * Sits slightly above centre, over where the bars would be, so the axes stay
253
+ * legible underneath.
254
+ */
255
+ var _exp30 = () => ({ theme }) => theme.color.border.primary;
256
+ var _exp31 = () => ({ theme }) => theme.color.background.tertiary;
257
+ var ChartEmptyOverlay = withTheme(/*#__PURE__*/ styled("div")({
258
+ name: "ChartEmptyOverlay",
259
+ class: "cz6jod1",
260
+ propsAsIs: false,
261
+ vars: {
262
+ "cz6jod1-0": [_exp30()],
263
+ "cz6jod1-1": [_exp31()]
264
+ }
265
+ }));
266
+ /**
267
+ * Aligns the legend under the plot rather than the value-axis gutter.
268
+ *
269
+ * Also cancels the restore delay for its entries while the legend is dimming,
270
+ * exactly as {@link ChartPlotGroup} does for the marks. The legend renders
271
+ * *outside* the SVG, so the plot group's selector cannot reach it — without this
272
+ * the marks dim instantly while their legend entries sit through the full
273
+ * {@link CHART_RESTORE_DELAY_MS}, and the two visibly fall out of step.
274
+ */
275
+ var _exp32 = () => ({ $inset }) => `${$inset}px`;
276
+ var ChartLegendRow = /*#__PURE__*/ styled("div")({
277
+ name: "ChartLegendRow",
278
+ class: "c1de5mqk",
279
+ propsAsIs: false,
280
+ vars: { "c1de5mqk-0": [_exp32()] }
281
+ });
282
+ /**
283
+ * One legend entry, when the legend is interactive.
284
+ *
285
+ * A real `<button>` rather than a styled div: it is clickable, so it has to be
286
+ * reachable and operable by keyboard. `aria-pressed` carries the pinned state —
287
+ * the only thing here a screen reader can truthfully announce, since the plot
288
+ * itself is `role="img"` and its marks are not in the accessibility tree.
289
+ *
290
+ * Shares the mark opacity ramp via `data-state`, so an entry recedes in step
291
+ * with the series it names.
292
+ */
293
+ var ChartLegendItemButton = /*#__PURE__*/ styled("button")({
294
+ name: "ChartLegendItemButton",
295
+ class: "cjirv6a",
296
+ propsAsIs: false
297
+ });
298
+ /** The same row, when the legend is inert — no button semantics to announce. */
299
+ var ChartLegendItemStatic = /*#__PURE__*/ styled("div")({
300
+ name: "ChartLegendItemStatic",
301
+ class: "c1armna5",
302
+ propsAsIs: false
303
+ });
304
+ //#endregion
305
+ export { ChartArcPath, ChartAreaPath, ChartAxisLabelBox, ChartBackdrop, ChartBarPath, ChartCategoryTargetLayer, ChartCenterBox, ChartCursorLine, ChartEmptyOverlay, ChartGridLine, ChartHitTarget, ChartHitTargetPath, ChartLegendItemButton, ChartLegendItemStatic, ChartLegendRow, ChartLinePath, ChartPlotBox, ChartPlotGroup, ChartPointCircle, ChartRoot, ChartSvg, ChartTooltipPositioner };
@@ -1,7 +1,28 @@
1
- import type { ChartTooltipData, ChartValueFormatter } from "./types";
1
+ import type { ChartTooltipModel, ChartTooltipRenderer } from "./types";
2
+ import { ChartTooltipVerticalAlign } from "./useChartTooltipPosition";
3
+ /**
4
+ * Positioned tooltip shared by the chart components.
5
+ *
6
+ * The positioner wraps a custom `renderer` too, so a caller replacing the body
7
+ * still gets collision handling — in V1 the custom path received no positioning
8
+ * at all and had to reimplement it.
9
+ */
2
10
  interface ChartTooltipProps {
3
- data: ChartTooltipData | null;
4
- valueFormatter?: ChartValueFormatter;
11
+ /**
12
+ * The model to display, or `null` when nothing is active.
13
+ *
14
+ * The element stays mounted while hidden so the fade can run; unmounting on
15
+ * hide is why a fade-out never appears.
16
+ */
17
+ model: ChartTooltipModel | null;
18
+ containerWidth: number;
19
+ containerHeight: number;
20
+ /** Half a category's width, so the tooltip sits beside the bars, not over them. */
21
+ anchorHalfWidth?: number;
22
+ /** Radial charts pass their centre so the tooltip is pushed outward. */
23
+ placeAwayFromX?: number;
24
+ verticalAlign?: ChartTooltipVerticalAlign;
25
+ renderer?: ChartTooltipRenderer;
5
26
  }
6
- declare const ChartTooltip: ({ data, valueFormatter }: ChartTooltipProps) => import("react").JSX.Element | null;
27
+ declare const ChartTooltip: ({ model, containerWidth, containerHeight, anchorHalfWidth, placeAwayFromX, verticalAlign, renderer, }: ChartTooltipProps) => import("react").JSX.Element;
7
28
  export default ChartTooltip;