@monolith-forensics/monolith-ui 1.7.1 → 1.8.1-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/BarChart/BarChart.d.ts +3 -0
  2. package/dist/BarChart/BarChart.js +511 -0
  3. package/dist/BarChart/BarChart.lib.d.ts +31 -0
  4. package/dist/BarChart/BarChart.lib.js +136 -0
  5. package/dist/BarChart/BarChart.styled.d.ts +49 -0
  6. package/dist/BarChart/BarChart.styled.js +111 -0
  7. package/dist/BarChart/BarChart.types.d.ts +170 -0
  8. package/dist/BarChart/BarChart.types.js +1 -0
  9. package/dist/BarChart/index.d.ts +3 -0
  10. package/dist/BarChart/index.js +2 -0
  11. package/dist/Button/Button.js +9 -58
  12. package/dist/Calendar/Calendar.d.ts +3 -1
  13. package/dist/Calendar/Calendar.js +134 -33
  14. package/dist/Calendar/CalendarStyles.d.ts +3 -0
  15. package/dist/Calendar/CalendarStyles.js +92 -14
  16. package/dist/Calendar/calendarHelpers.d.ts +5 -1
  17. package/dist/Calendar/calendarHelpers.js +13 -5
  18. package/dist/ChartPrimitives/chartLegend.styled.d.ts +12 -0
  19. package/dist/ChartPrimitives/chartLegend.styled.js +52 -0
  20. package/dist/ChartPrimitives/chartTooltip.styled.d.ts +19 -0
  21. package/dist/ChartPrimitives/chartTooltip.styled.js +61 -0
  22. package/dist/ChartPrimitives/index.d.ts +2 -0
  23. package/dist/ChartPrimitives/index.js +2 -0
  24. package/dist/ChartUtils/chartColors.d.ts +8 -0
  25. package/dist/ChartUtils/chartColors.js +65 -0
  26. package/dist/ChartUtils/chartMath.d.ts +3 -0
  27. package/dist/ChartUtils/chartMath.js +3 -0
  28. package/dist/ChartUtils/index.d.ts +2 -0
  29. package/dist/ChartUtils/index.js +2 -0
  30. package/dist/Charts/BarChart/BarChart.d.ts +5 -0
  31. package/dist/Charts/BarChart/BarChart.js +549 -0
  32. package/dist/Charts/BarChart/BarChart.lib.d.ts +31 -0
  33. package/dist/Charts/BarChart/BarChart.lib.js +136 -0
  34. package/dist/Charts/BarChart/BarChart.styled.d.ts +51 -0
  35. package/dist/Charts/BarChart/BarChart.styled.js +115 -0
  36. package/dist/Charts/BarChart/BarChart.types.d.ts +171 -0
  37. package/dist/Charts/BarChart/BarChart.types.js +1 -0
  38. package/dist/Charts/BarChart/index.d.ts +3 -0
  39. package/dist/Charts/BarChart/index.js +2 -0
  40. package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +11 -0
  41. package/dist/Charts/ChartPrimitives/ChartExportControl.js +29 -0
  42. package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +1 -0
  43. package/dist/Charts/ChartPrimitives/chartActions.styled.js +8 -0
  44. package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +12 -0
  45. package/dist/Charts/ChartPrimitives/chartLegend.styled.js +52 -0
  46. package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +19 -0
  47. package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +61 -0
  48. package/dist/Charts/ChartPrimitives/index.d.ts +4 -0
  49. package/dist/Charts/ChartPrimitives/index.js +4 -0
  50. package/dist/Charts/ChartUtils/chartColors.d.ts +8 -0
  51. package/dist/Charts/ChartUtils/chartColors.js +65 -0
  52. package/dist/Charts/ChartUtils/chartExport.d.ts +47 -0
  53. package/dist/Charts/ChartUtils/chartExport.js +311 -0
  54. package/dist/Charts/ChartUtils/chartMath.d.ts +3 -0
  55. package/dist/Charts/ChartUtils/chartMath.js +3 -0
  56. package/dist/Charts/ChartUtils/index.d.ts +3 -0
  57. package/dist/Charts/ChartUtils/index.js +3 -0
  58. package/dist/Charts/HeatMap/HeatMap.d.ts +5 -0
  59. package/dist/Charts/HeatMap/HeatMap.js +212 -0
  60. package/dist/Charts/HeatMap/HeatMap.lib.d.ts +30 -0
  61. package/dist/Charts/HeatMap/HeatMap.lib.js +115 -0
  62. package/dist/Charts/HeatMap/HeatMap.styled.d.ts +37 -0
  63. package/dist/Charts/HeatMap/HeatMap.styled.js +91 -0
  64. package/dist/Charts/HeatMap/HeatMap.types.d.ts +80 -0
  65. package/dist/Charts/HeatMap/HeatMap.types.js +1 -0
  66. package/dist/Charts/HeatMap/index.d.ts +3 -0
  67. package/dist/Charts/HeatMap/index.js +2 -0
  68. package/dist/Charts/LineChart/LineChart.d.ts +5 -0
  69. package/dist/Charts/LineChart/LineChart.js +529 -0
  70. package/dist/Charts/LineChart/LineChart.lib.d.ts +24 -0
  71. package/dist/Charts/LineChart/LineChart.lib.js +132 -0
  72. package/dist/Charts/LineChart/LineChart.styled.d.ts +59 -0
  73. package/dist/Charts/LineChart/LineChart.styled.js +147 -0
  74. package/dist/Charts/LineChart/LineChart.types.d.ts +193 -0
  75. package/dist/Charts/LineChart/LineChart.types.js +1 -0
  76. package/dist/Charts/LineChart/index.d.ts +3 -0
  77. package/dist/Charts/LineChart/index.js +2 -0
  78. package/dist/Charts/PieChart/PieChart.d.ts +4 -0
  79. package/dist/Charts/PieChart/PieChart.js +199 -0
  80. package/dist/Charts/PieChart/PieChart.lib.d.ts +5 -0
  81. package/dist/Charts/PieChart/PieChart.lib.js +19 -0
  82. package/dist/Charts/PieChart/PieChart.styled.d.ts +51 -0
  83. package/dist/Charts/PieChart/PieChart.styled.js +163 -0
  84. package/dist/Charts/PieChart/PieChart.types.d.ts +100 -0
  85. package/dist/Charts/PieChart/PieChart.types.js +1 -0
  86. package/dist/Charts/PieChart/index.d.ts +2 -0
  87. package/dist/Charts/PieChart/index.js +1 -0
  88. package/dist/Charts/index.d.ts +5 -0
  89. package/dist/Charts/index.js +4 -0
  90. package/dist/CheckBox/CheckBox.js +2 -16
  91. package/dist/DateInput/DateInput.js +198 -143
  92. package/dist/DropDownMenu/components/MenuComponent.js +2 -1
  93. package/dist/DropDownMenu/components/MenuItem.js +5 -14
  94. package/dist/DropDownMenu/components/MenuItemList.js +7 -24
  95. package/dist/DropDownMenu/components/StyledFloatContainer.js +1 -1
  96. package/dist/FieldLabel/FieldLabel.js +4 -12
  97. package/dist/FileInputField/FileInputField.js +4 -23
  98. package/dist/FormSection/FormSection.js +5 -25
  99. package/dist/HeatMap/HeatMap.d.ts +3 -0
  100. package/dist/HeatMap/HeatMap.js +174 -0
  101. package/dist/HeatMap/HeatMap.lib.d.ts +30 -0
  102. package/dist/HeatMap/HeatMap.lib.js +115 -0
  103. package/dist/HeatMap/HeatMap.styled.d.ts +34 -0
  104. package/dist/HeatMap/HeatMap.styled.js +83 -0
  105. package/dist/HeatMap/HeatMap.types.d.ts +79 -0
  106. package/dist/HeatMap/HeatMap.types.js +1 -0
  107. package/dist/HeatMap/index.d.ts +3 -0
  108. package/dist/HeatMap/index.js +2 -0
  109. package/dist/IconButton/IconButton.js +2 -16
  110. package/dist/Input/Input.js +7 -56
  111. package/dist/LineChart/LineChart.d.ts +3 -0
  112. package/dist/LineChart/LineChart.js +491 -0
  113. package/dist/LineChart/LineChart.lib.d.ts +24 -0
  114. package/dist/LineChart/LineChart.lib.js +132 -0
  115. package/dist/LineChart/LineChart.styled.d.ts +57 -0
  116. package/dist/LineChart/LineChart.styled.js +150 -0
  117. package/dist/LineChart/LineChart.types.d.ts +192 -0
  118. package/dist/LineChart/LineChart.types.js +1 -0
  119. package/dist/LineChart/index.d.ts +3 -0
  120. package/dist/LineChart/index.js +2 -0
  121. package/dist/PieChart/PieChart.d.ts +2 -0
  122. package/dist/PieChart/PieChart.js +161 -0
  123. package/dist/PieChart/PieChart.lib.d.ts +5 -0
  124. package/dist/PieChart/PieChart.lib.js +19 -0
  125. package/dist/PieChart/PieChart.styled.d.ts +49 -0
  126. package/dist/PieChart/PieChart.styled.js +161 -0
  127. package/dist/PieChart/PieChart.types.d.ts +99 -0
  128. package/dist/PieChart/PieChart.types.js +1 -0
  129. package/dist/PieChart/index.d.ts +2 -0
  130. package/dist/PieChart/index.js +1 -0
  131. package/dist/Pill/Pill.js +8 -79
  132. package/dist/Popover/Popover.context.d.ts +2 -1
  133. package/dist/Popover/Popover.js +5 -2
  134. package/dist/Popover/Popover.styles.d.ts +1 -6
  135. package/dist/Popover/Popover.styles.js +11 -28
  136. package/dist/Popover/Popover.transitions.d.ts +4 -2
  137. package/dist/Popover/Popover.transitions.js +23 -49
  138. package/dist/Popover/PopoverDropdown.js +6 -8
  139. package/dist/Popover/PopoverTarget.js +6 -3
  140. package/dist/SegmentedControl/SegmentedControl.utils.d.ts +2 -2
  141. package/dist/SegmentedControl/SegmentedControl.utils.js +3 -30
  142. package/dist/SelectBox/SelectBox.js +3 -3
  143. package/dist/SelectBox/select-box.styled-components.d.ts +3 -1
  144. package/dist/SelectBox/select-box.styled-components.js +10 -48
  145. package/dist/SuperDatePicker/SuperDatePicker.d.ts +74 -0
  146. package/dist/SuperDatePicker/SuperDatePicker.js +557 -0
  147. package/dist/SuperDatePicker/index.d.ts +2 -0
  148. package/dist/SuperDatePicker/index.js +2 -0
  149. package/dist/Switch/Switch.d.ts +2 -2
  150. package/dist/Switch/Switch.js +18 -83
  151. package/dist/Table/StateStorage.d.ts +4 -0
  152. package/dist/Table/StateStorage.js +13 -0
  153. package/dist/Table/Table.js +160 -12
  154. package/dist/Table/TableComponents.d.ts +10 -0
  155. package/dist/Table/TableComponents.js +57 -0
  156. package/dist/Table/TableDefaults.d.ts +7 -0
  157. package/dist/Table/TableDefaults.js +7 -0
  158. package/dist/Table/TableProvider.js +263 -71
  159. package/dist/Table/TableRow.js +15 -10
  160. package/dist/Table/types.d.ts +64 -0
  161. package/dist/Tabs/Tab.js +8 -0
  162. package/dist/TagBox/TagBox.js +18 -76
  163. package/dist/TextArea/TextArea.js +4 -23
  164. package/dist/TextInput/TextInput.js +12 -6
  165. package/dist/Utilities/parseTimestamp.js +11 -6
  166. package/dist/core/ArrowButton.d.ts +2 -0
  167. package/dist/core/ArrowButton.js +7 -3
  168. package/dist/core/ClearButton.d.ts +2 -0
  169. package/dist/core/ClearButton.js +7 -3
  170. package/dist/core/controlSizes.d.ts +34 -0
  171. package/dist/core/controlSizes.js +190 -0
  172. package/dist/core/index.d.ts +1 -0
  173. package/dist/core/index.js +1 -0
  174. package/dist/index.d.ts +1 -0
  175. package/dist/index.js +1 -0
  176. package/package.json +5 -1
@@ -0,0 +1,212 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __rest = (this && this.__rest) || function (s, e) {
11
+ var t = {};
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
+ t[p] = s[p];
14
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
+ t[p[i]] = s[p[i]];
18
+ }
19
+ return t;
20
+ };
21
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
+ import { forwardRef, useEffect, useId, useImperativeHandle, useMemo, useRef, useState, } from "react";
23
+ import { useTheme } from "styled-components";
24
+ import { ChartExportControl } from "../ChartPrimitives";
25
+ import { DEFAULT_CHART_EXPORT_FORMATS, copyChartImage, downloadChartImage, } from "../ChartUtils";
26
+ import { buildHeatMapCells, clamp, easeOutCubic, formatDefaultValue, formatDefaultWeekdayLabel, getHeatMapColor, getHeatMapDateRange, getMonthLabels, } from "./HeatMap.lib";
27
+ import { StyledCell, StyledChartActions, StyledChartFrame, StyledChartScroller, StyledContainer, StyledLegend, StyledLegendCell, StyledLegendScale, StyledMonthLabel, StyledSvg, StyledTooltip, StyledTooltipHeader, StyledTooltipMeta, StyledTooltipSwatch, StyledWeekdayLabel, } from "./HeatMap.styled";
28
+ const HeatMapInner = (_a, ref) => {
29
+ var { data, startDate, endDate, cellSize = 12, cellGap = 4, cellRadius = 2, emptyColor, colors, minValue = 0, maxValue, weekStartsOn = 0, showMonthLabels = true, showWeekdayLabels = true, showLegend = true, animateOnRender = false, animationDuration = 350, animationStagger = 1, showExportButton = false, exportFileName = "heat-map", exportFormats = DEFAULT_CHART_EXPORT_FORMATS, exportScale = 2, exportBackgroundColor, showTooltips = false, ariaLabel = "Heat map", valueFormatter, monthLabelFormatter, weekdayLabelFormatter, tooltipFormatter, onCellClick, className } = _a, props = __rest(_a, ["data", "startDate", "endDate", "cellSize", "cellGap", "cellRadius", "emptyColor", "colors", "minValue", "maxValue", "weekStartsOn", "showMonthLabels", "showWeekdayLabels", "showLegend", "animateOnRender", "animationDuration", "animationStagger", "showExportButton", "exportFileName", "exportFormats", "exportScale", "exportBackgroundColor", "showTooltips", "ariaLabel", "valueFormatter", "monthLabelFormatter", "weekdayLabelFormatter", "tooltipFormatter", "onCellClick", "className"]);
30
+ const descriptionId = useId();
31
+ const theme = useTheme();
32
+ const containerRef = useRef(null);
33
+ const svgRef = useRef(null);
34
+ const [activeCellKey, setActiveCellKey] = useState(null);
35
+ const [activeTooltip, setActiveTooltip] = useState(null);
36
+ const [animationElapsed, setAnimationElapsed] = useState(animateOnRender ? 0 : Number.POSITIVE_INFINITY);
37
+ const { startDate: resolvedStartDate, endDate: resolvedEndDate } = useMemo(() => getHeatMapDateRange(data, startDate, endDate), [data, endDate, startDate]);
38
+ const resolvedColors = (colors === null || colors === void 0 ? void 0 : colors.length)
39
+ ? colors
40
+ : [
41
+ theme.palette.background.secondary,
42
+ theme.alert.info.color,
43
+ theme.palette.primary.main,
44
+ theme.alert.success.color,
45
+ ];
46
+ const resolvedEmptyColor = emptyColor !== null && emptyColor !== void 0 ? emptyColor : theme.palette.background.secondary;
47
+ const resolvedExportBackgroundColor = exportBackgroundColor !== null && exportBackgroundColor !== void 0 ? exportBackgroundColor : theme.palette.background.paper;
48
+ useImperativeHandle(ref, () => ({
49
+ getSvgElement: () => svgRef.current,
50
+ downloadImage: (request) => __awaiter(void 0, void 0, void 0, function* () {
51
+ var _a, _b, _c, _d;
52
+ yield downloadChartImage({
53
+ rootElement: containerRef.current,
54
+ svg: svgRef.current,
55
+ format: (_a = request === null || request === void 0 ? void 0 : request.format) !== null && _a !== void 0 ? _a : "svg",
56
+ fileName: (_b = request === null || request === void 0 ? void 0 : request.fileName) !== null && _b !== void 0 ? _b : exportFileName,
57
+ scale: (_c = request === null || request === void 0 ? void 0 : request.scale) !== null && _c !== void 0 ? _c : exportScale,
58
+ backgroundColor: (_d = request === null || request === void 0 ? void 0 : request.backgroundColor) !== null && _d !== void 0 ? _d : resolvedExportBackgroundColor,
59
+ });
60
+ }),
61
+ copyImage: (request) => __awaiter(void 0, void 0, void 0, function* () {
62
+ var _a, _b, _c;
63
+ return copyChartImage({
64
+ rootElement: containerRef.current,
65
+ svg: svgRef.current,
66
+ format: (_a = request === null || request === void 0 ? void 0 : request.format) !== null && _a !== void 0 ? _a : "png",
67
+ scale: (_b = request === null || request === void 0 ? void 0 : request.scale) !== null && _b !== void 0 ? _b : exportScale,
68
+ backgroundColor: (_c = request === null || request === void 0 ? void 0 : request.backgroundColor) !== null && _c !== void 0 ? _c : resolvedExportBackgroundColor,
69
+ });
70
+ }),
71
+ }), [exportFileName, exportScale, resolvedExportBackgroundColor]);
72
+ const values = data
73
+ .map((datum) => datum.value)
74
+ .filter((value) => Number.isFinite(value));
75
+ const resolvedMaxValue = maxValue !== null && maxValue !== void 0 ? maxValue : Math.max(...values, minValue, 1);
76
+ const safeCellSize = Math.max(cellSize, 1);
77
+ const safeCellGap = Math.max(cellGap, 0);
78
+ const safeCellRadius = Math.max(cellRadius, 0);
79
+ const labelWidth = showWeekdayLabels ? 28 : 0;
80
+ const monthLabelHeight = showMonthLabels ? 18 : 0;
81
+ const step = safeCellSize + safeCellGap;
82
+ const cells = useMemo(() => buildHeatMapCells({
83
+ data,
84
+ startDate: resolvedStartDate,
85
+ endDate: resolvedEndDate,
86
+ weekStartsOn,
87
+ }), [data, resolvedEndDate, resolvedStartDate, weekStartsOn]);
88
+ const monthLabels = useMemo(() => showMonthLabels
89
+ ? getMonthLabels({
90
+ startDate: resolvedStartDate,
91
+ endDate: resolvedEndDate,
92
+ weekStartsOn,
93
+ formatter: monthLabelFormatter,
94
+ })
95
+ : [], [
96
+ monthLabelFormatter,
97
+ resolvedEndDate,
98
+ resolvedStartDate,
99
+ showMonthLabels,
100
+ weekStartsOn,
101
+ ]);
102
+ const weekCount = cells.length > 0 ? Math.max(...cells.map((cell) => cell.weekIndex)) + 1 : 1;
103
+ const width = labelWidth + weekCount * step - safeCellGap;
104
+ const height = monthLabelHeight + 7 * step - safeCellGap;
105
+ const formatValue = (cell) => { var _a; return (_a = valueFormatter === null || valueFormatter === void 0 ? void 0 : valueFormatter(cell.value, cell.datum)) !== null && _a !== void 0 ? _a : formatDefaultValue(cell.value); };
106
+ const getCellFill = (cell) => {
107
+ if (!cell.datum)
108
+ return resolvedEmptyColor;
109
+ if (cell.color)
110
+ return cell.color;
111
+ return getHeatMapColor(cell.value, resolvedColors, minValue, resolvedMaxValue);
112
+ };
113
+ const updateTooltipPosition = (event, cell) => {
114
+ if (!showTooltips || !containerRef.current)
115
+ return;
116
+ const containerRect = containerRef.current.getBoundingClientRect();
117
+ setActiveTooltip({
118
+ dateKey: cell.dateKey,
119
+ x: event.clientX - containerRect.left,
120
+ y: event.clientY - containerRect.top,
121
+ });
122
+ };
123
+ const activeTooltipCell = showTooltips && activeTooltip
124
+ ? cells.find((cell) => cell.dateKey === activeTooltip.dateKey)
125
+ : null;
126
+ const description = cells
127
+ .filter((cell) => cell.datum)
128
+ .map((cell) => `${cell.dateKey}: ${formatDefaultValue(cell.value)}`)
129
+ .join(", ");
130
+ const safeAnimationDuration = Math.max(animationDuration, 0);
131
+ const safeAnimationStagger = Math.max(animationStagger, 0);
132
+ const totalAnimationDuration = safeAnimationDuration +
133
+ Math.max(cells.length - 1, 0) * safeAnimationStagger;
134
+ useEffect(() => {
135
+ var _a;
136
+ if (!animateOnRender || cells.length === 0) {
137
+ setAnimationElapsed(Number.POSITIVE_INFINITY);
138
+ return;
139
+ }
140
+ const prefersReducedMotion = typeof window !== "undefined" &&
141
+ ((_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, "(prefers-reduced-motion: reduce)").matches);
142
+ if (prefersReducedMotion) {
143
+ setAnimationElapsed(Number.POSITIVE_INFINITY);
144
+ return;
145
+ }
146
+ let animationFrame = 0;
147
+ let startTime = null;
148
+ setAnimationElapsed(0);
149
+ const runAnimation = (timestamp) => {
150
+ if (startTime == null)
151
+ startTime = timestamp;
152
+ const elapsed = timestamp - startTime;
153
+ setAnimationElapsed(elapsed);
154
+ if (elapsed < totalAnimationDuration) {
155
+ animationFrame = window.requestAnimationFrame(runAnimation);
156
+ }
157
+ };
158
+ animationFrame = window.requestAnimationFrame(runAnimation);
159
+ return () => {
160
+ window.cancelAnimationFrame(animationFrame);
161
+ };
162
+ }, [
163
+ animateOnRender,
164
+ cells.length,
165
+ safeAnimationDuration,
166
+ safeAnimationStagger,
167
+ totalAnimationDuration,
168
+ ]);
169
+ const getCellAnimationProgress = (index) => {
170
+ if (!animateOnRender || safeAnimationDuration === 0)
171
+ return 1;
172
+ const elapsed = animationElapsed - index * safeAnimationStagger;
173
+ return easeOutCubic(clamp(elapsed / safeAnimationDuration, 0, 1));
174
+ };
175
+ return (_jsxs(StyledContainer, Object.assign({ ref: containerRef, className: className }, props, { children: [_jsx(StyledChartScroller, { children: _jsxs(StyledChartFrame, { children: [showExportButton && exportFormats.length > 0 && (_jsx(StyledChartActions, { "data-chart-export-ignore": "true", children: _jsx(ChartExportControl, { rootRef: containerRef, svgRef: svgRef, fileName: exportFileName, formats: exportFormats, scale: exportScale, backgroundColor: resolvedExportBackgroundColor }) })), _jsxs(StyledSvg, { ref: svgRef, width: width, height: height, viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": ariaLabel, "aria-describedby": descriptionId, children: [_jsx("desc", { id: descriptionId, children: description }), showMonthLabels &&
176
+ monthLabels.map((monthLabel) => (_jsx(StyledMonthLabel, { x: labelWidth + monthLabel.weekIndex * step, y: 10, children: monthLabel.label }, `${monthLabel.label}-${monthLabel.weekIndex}`))), showWeekdayLabels &&
177
+ Array.from({ length: 7 }, (_, dayIndex) => {
178
+ var _a;
179
+ return (_jsx(StyledWeekdayLabel, { x: 0, y: monthLabelHeight + dayIndex * step + safeCellSize - 2, children: (_a = weekdayLabelFormatter === null || weekdayLabelFormatter === void 0 ? void 0 : weekdayLabelFormatter(dayIndex)) !== null && _a !== void 0 ? _a : formatDefaultWeekdayLabel(dayIndex, weekStartsOn) }, dayIndex));
180
+ }), cells.map((cell, index) => {
181
+ const fill = getCellFill(cell);
182
+ const isActive = activeCellKey === cell.dateKey;
183
+ const animationProgress = getCellAnimationProgress(index);
184
+ const cellX = labelWidth + cell.weekIndex * step;
185
+ const cellY = monthLabelHeight + cell.dayIndex * step;
186
+ const cellCenterX = cellX + safeCellSize / 2;
187
+ const cellCenterY = cellY + safeCellSize / 2;
188
+ const cellScale = 0.7 + animationProgress * 0.3;
189
+ const cellOpacity = 0.2 + animationProgress * 0.8;
190
+ return (_jsx("g", { style: {
191
+ opacity: cellOpacity,
192
+ transformOrigin: `${cellCenterX}px ${cellCenterY}px`,
193
+ transform: `scale(${cellScale})`,
194
+ }, children: _jsx(StyledCell, { "$active": isActive, x: cellX, y: cellY, width: safeCellSize, height: safeCellSize, rx: safeCellRadius, ry: safeCellRadius, fill: fill, stroke: theme.palette.action.hover, strokeWidth: 1, tabIndex: 0, "aria-label": `${cell.dateKey}: ${formatDefaultValue(cell.value)}`, onFocus: () => setActiveCellKey(cell.dateKey), onBlur: () => setActiveCellKey(null), onMouseEnter: (event) => {
195
+ setActiveCellKey(cell.dateKey);
196
+ updateTooltipPosition(event, cell);
197
+ }, onMouseMove: (event) => updateTooltipPosition(event, cell), onMouseLeave: () => {
198
+ setActiveCellKey(null);
199
+ setActiveTooltip(null);
200
+ }, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(event, cell, cell.datum), onKeyDown: (event) => {
201
+ if (event.key !== "Enter" && event.key !== " ")
202
+ return;
203
+ event.preventDefault();
204
+ onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(event, cell, cell.datum);
205
+ } }) }, cell.dateKey));
206
+ })] })] }) }), showLegend && (_jsxs(StyledLegend, { children: [_jsx("span", { children: "Less" }), _jsxs(StyledLegendScale, { children: [_jsx(StyledLegendCell, { "$color": resolvedEmptyColor, "$size": safeCellSize, "$radius": safeCellRadius }), resolvedColors.map((color) => (_jsx(StyledLegendCell, { "$color": color, "$size": safeCellSize, "$radius": safeCellRadius }, color)))] }), _jsx("span", { children: "More" })] })), activeTooltip && activeTooltipCell && (_jsx(StyledTooltip, { style: {
207
+ left: activeTooltip.x,
208
+ top: activeTooltip.y,
209
+ }, children: tooltipFormatter ? (tooltipFormatter(activeTooltipCell, activeTooltipCell.datum)) : (_jsxs(_Fragment, { children: [_jsxs(StyledTooltipHeader, { children: [_jsx(StyledTooltipSwatch, { "$color": getCellFill(activeTooltipCell) }), _jsx("span", { children: activeTooltipCell.dateKey })] }), _jsx(StyledTooltipMeta, { children: formatValue(activeTooltipCell) })] })) }))] })));
210
+ };
211
+ const HeatMap = forwardRef(HeatMapInner);
212
+ export default HeatMap;
@@ -0,0 +1,30 @@
1
+ import { clamp, easeOutCubic, formatDefaultValue } from "../ChartUtils";
2
+ import { HeatMapCell, HeatMapDatum, HeatMapMonthLabel } from "./HeatMap.types";
3
+ export declare const DEFAULT_WEEKDAY_LABELS: string[];
4
+ export { clamp, easeOutCubic, formatDefaultValue };
5
+ export declare const startOfDay: (date: Date) => Date;
6
+ export declare const parseHeatMapDate: (value: Date | string) => Date;
7
+ export declare const formatDateKey: (date: Date) => string;
8
+ export declare const addDays: (date: Date, days: number) => Date;
9
+ export declare const differenceInDays: (from: Date, to: Date) => number;
10
+ export declare const getDayIndex: (date: Date, weekStartsOn: 0 | 1) => number;
11
+ export declare const startOfWeek: (date: Date, weekStartsOn: 0 | 1) => Date;
12
+ export declare const formatDefaultMonthLabel: (date: Date) => string;
13
+ export declare const formatDefaultWeekdayLabel: (dayIndex: number, weekStartsOn: 0 | 1) => string;
14
+ export declare const getHeatMapDateRange: <TData>(data: HeatMapDatum<TData>[], startDate?: Date | string, endDate?: Date | string) => {
15
+ startDate: Date;
16
+ endDate: Date;
17
+ };
18
+ export declare const getHeatMapColor: (value: number, colors: string[], minValue: number, maxValue: number) => string;
19
+ export declare const buildHeatMapCells: <TData>({ data, startDate, endDate, weekStartsOn, }: {
20
+ data: HeatMapDatum<TData>[];
21
+ startDate: Date;
22
+ endDate: Date;
23
+ weekStartsOn: 0 | 1;
24
+ }) => HeatMapCell<TData>[];
25
+ export declare const getMonthLabels: ({ startDate, endDate, weekStartsOn, formatter, }: {
26
+ startDate: Date;
27
+ endDate: Date;
28
+ weekStartsOn: 0 | 1;
29
+ formatter?: (date: Date) => string;
30
+ }) => HeatMapMonthLabel[];
@@ -0,0 +1,115 @@
1
+ import { scaleQuantize } from "d3-scale";
2
+ import { clamp, easeOutCubic, formatDefaultValue } from "../ChartUtils";
3
+ const MONTH_LABELS = [
4
+ "Jan",
5
+ "Feb",
6
+ "Mar",
7
+ "Apr",
8
+ "May",
9
+ "Jun",
10
+ "Jul",
11
+ "Aug",
12
+ "Sep",
13
+ "Oct",
14
+ "Nov",
15
+ "Dec",
16
+ ];
17
+ export const DEFAULT_WEEKDAY_LABELS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
18
+ export { clamp, easeOutCubic, formatDefaultValue };
19
+ export const startOfDay = (date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());
20
+ export const parseHeatMapDate = (value) => {
21
+ if (value instanceof Date)
22
+ return startOfDay(value);
23
+ const isoDate = value.match(/^(\d{4})-(\d{2})-(\d{2})$/);
24
+ if (isoDate) {
25
+ return new Date(Number(isoDate[1]), Number(isoDate[2]) - 1, Number(isoDate[3]));
26
+ }
27
+ return startOfDay(new Date(value));
28
+ };
29
+ export const formatDateKey = (date) => {
30
+ const year = date.getFullYear();
31
+ const month = String(date.getMonth() + 1).padStart(2, "0");
32
+ const day = String(date.getDate()).padStart(2, "0");
33
+ return `${year}-${month}-${day}`;
34
+ };
35
+ export const addDays = (date, days) => {
36
+ const nextDate = new Date(date);
37
+ nextDate.setDate(nextDate.getDate() + days);
38
+ return nextDate;
39
+ };
40
+ export const differenceInDays = (from, to) => {
41
+ const fromTime = Date.UTC(from.getFullYear(), from.getMonth(), from.getDate());
42
+ const toTime = Date.UTC(to.getFullYear(), to.getMonth(), to.getDate());
43
+ return Math.round((toTime - fromTime) / 86400000);
44
+ };
45
+ export const getDayIndex = (date, weekStartsOn) => (date.getDay() - weekStartsOn + 7) % 7;
46
+ export const startOfWeek = (date, weekStartsOn) => addDays(date, -getDayIndex(date, weekStartsOn));
47
+ export const formatDefaultMonthLabel = (date) => MONTH_LABELS[date.getMonth()];
48
+ export const formatDefaultWeekdayLabel = (dayIndex, weekStartsOn) => DEFAULT_WEEKDAY_LABELS[(dayIndex + weekStartsOn) % 7];
49
+ export const getHeatMapDateRange = (data, startDate, endDate) => {
50
+ const parsedDates = data
51
+ .map((datum) => parseHeatMapDate(datum.date))
52
+ .filter((date) => Number.isFinite(date.getTime()));
53
+ const resolvedStartDate = startDate != null
54
+ ? parseHeatMapDate(startDate)
55
+ : parsedDates.length
56
+ ? new Date(Math.min(...parsedDates.map((date) => date.getTime())))
57
+ : startOfDay(new Date());
58
+ const resolvedEndDate = endDate != null
59
+ ? parseHeatMapDate(endDate)
60
+ : parsedDates.length
61
+ ? new Date(Math.max(...parsedDates.map((date) => date.getTime())))
62
+ : resolvedStartDate;
63
+ return resolvedStartDate <= resolvedEndDate
64
+ ? { startDate: resolvedStartDate, endDate: resolvedEndDate }
65
+ : { startDate: resolvedEndDate, endDate: resolvedStartDate };
66
+ };
67
+ export const getHeatMapColor = (value, colors, minValue, maxValue) => {
68
+ if (colors.length === 0)
69
+ return "currentColor";
70
+ if (colors.length === 1 || maxValue <= minValue)
71
+ return colors[colors.length - 1];
72
+ return scaleQuantize()
73
+ .domain([minValue, maxValue])
74
+ .range(colors)(value);
75
+ };
76
+ export const buildHeatMapCells = ({ data, startDate, endDate, weekStartsOn, }) => {
77
+ var _a;
78
+ const calendarStartDate = startOfWeek(startDate, weekStartsOn);
79
+ const dataByDate = new Map(data.map((datum) => [formatDateKey(parseHeatMapDate(datum.date)), datum]));
80
+ const visibleDayCount = differenceInDays(startDate, endDate) + 1;
81
+ const cells = [];
82
+ for (let dayOffset = 0; dayOffset < visibleDayCount; dayOffset += 1) {
83
+ const date = addDays(startDate, dayOffset);
84
+ const dateKey = formatDateKey(date);
85
+ const datum = dataByDate.get(dateKey);
86
+ const weekIndex = Math.floor(differenceInDays(calendarStartDate, date) / 7);
87
+ const dayIndex = getDayIndex(date, weekStartsOn);
88
+ cells.push({
89
+ date,
90
+ dateKey,
91
+ value: (_a = datum === null || datum === void 0 ? void 0 : datum.value) !== null && _a !== void 0 ? _a : 0,
92
+ color: datum === null || datum === void 0 ? void 0 : datum.color,
93
+ datum,
94
+ weekIndex,
95
+ dayIndex,
96
+ });
97
+ }
98
+ return cells;
99
+ };
100
+ export const getMonthLabels = ({ startDate, endDate, weekStartsOn, formatter = formatDefaultMonthLabel, }) => {
101
+ const calendarStartDate = startOfWeek(startDate, weekStartsOn);
102
+ const labels = [];
103
+ let cursor = new Date(startDate.getFullYear(), startDate.getMonth(), 1);
104
+ if (cursor < startDate) {
105
+ cursor = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 1);
106
+ }
107
+ while (cursor <= endDate) {
108
+ labels.push({
109
+ label: formatter(cursor),
110
+ weekIndex: Math.floor(differenceInDays(calendarStartDate, cursor) / 7),
111
+ });
112
+ cursor = new Date(cursor.getFullYear(), cursor.getMonth() + 1, 1);
113
+ }
114
+ return labels;
115
+ };
@@ -0,0 +1,37 @@
1
+ import { StyledChartActions } from "../ChartPrimitives";
2
+ export declare const StyledContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const StyledChartScroller: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const StyledChartFrame: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export { StyledChartActions };
6
+ export declare const StyledSvg: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").SVGProps<SVGSVGElement>, never>> & string;
7
+ export declare const StyledCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGRectElement>, {
8
+ $active: boolean;
9
+ }>> & string;
10
+ export declare const StyledMonthLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").SVGTextElementAttributes<SVGTextElement>, never>> & string;
11
+ export declare const StyledWeekdayLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").SVGTextElementAttributes<SVGTextElement>, never>> & string;
12
+ export declare const StyledLegend: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ export declare const StyledLegendScale: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
14
+ export declare const StyledLegendCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
15
+ $color: string;
16
+ $size: number;
17
+ $radius: number;
18
+ }>> & string;
19
+ export declare const StyledTooltip: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$minWidth" | "$maxWidth" | "$transform"> & {
20
+ $minWidth?: number;
21
+ $maxWidth?: number;
22
+ $transform?: string;
23
+ }, import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$minWidth" | "$maxWidth" | "$transform"> & {
24
+ $minWidth?: number;
25
+ $maxWidth?: number;
26
+ $transform?: string;
27
+ }>, never>, never>> & string;
28
+ export declare const StyledTooltipHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
29
+ export declare const StyledTooltipSwatch: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
30
+ $color: string;
31
+ $radius?: string;
32
+ }>> & string;
33
+ export declare const StyledTooltipMeta: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$marginTop" | "$direction" | "$gap"> & {
34
+ $marginTop?: number;
35
+ $direction?: "row" | "column";
36
+ $gap?: number;
37
+ }, never>> & string;
@@ -0,0 +1,91 @@
1
+ import styled from "styled-components";
2
+ import { StyledChartActions, StyledChartTooltip, StyledChartTooltipHeader, StyledChartTooltipMeta, StyledChartTooltipSwatch, } from "../ChartPrimitives";
3
+ const activeCellStyles = `
4
+ filter: brightness(1.12) saturate(1.08);
5
+ transform: scale(1.08);
6
+ `;
7
+ export const StyledContainer = styled.div `
8
+ position: relative;
9
+ display: inline-flex;
10
+ flex-direction: column;
11
+ gap: 10px;
12
+ max-width: 100%;
13
+ color: ${({ theme }) => theme.palette.text.primary};
14
+ overflow: visible;
15
+ `;
16
+ export const StyledChartScroller = styled.div `
17
+ display: flex;
18
+ max-width: 100%;
19
+ overflow-x: auto;
20
+ overflow-y: visible;
21
+ padding-bottom: 2px;
22
+ `;
23
+ export const StyledChartFrame = styled.div `
24
+ position: relative;
25
+ display: flex;
26
+ flex-direction: column;
27
+ width: fit-content;
28
+ `;
29
+ export { StyledChartActions };
30
+ export const StyledSvg = styled.svg `
31
+ display: block;
32
+ overflow: visible;
33
+ `;
34
+ export const StyledCell = styled.rect `
35
+ cursor: pointer;
36
+ outline: none;
37
+ transform-box: fill-box;
38
+ transform-origin: center;
39
+ transition:
40
+ fill 0.16s ease,
41
+ filter 0.16s ease,
42
+ opacity 0.16s ease,
43
+ transform 0.16s ease;
44
+
45
+ &:hover,
46
+ &:focus-visible {
47
+ ${activeCellStyles}
48
+ }
49
+
50
+ ${({ $active }) => $active && activeCellStyles}
51
+ `;
52
+ export const StyledMonthLabel = styled.text `
53
+ fill: ${({ theme }) => theme.palette.text.secondary};
54
+ font-size: 11px;
55
+ pointer-events: none;
56
+ `;
57
+ export const StyledWeekdayLabel = styled.text `
58
+ fill: ${({ theme }) => theme.palette.text.secondary};
59
+ font-size: 10px;
60
+ pointer-events: none;
61
+ `;
62
+ export const StyledLegend = styled.div `
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: flex-end;
66
+ gap: 7px;
67
+ min-height: 18px;
68
+ font-size: 11px;
69
+ color: ${({ theme }) => theme.palette.text.secondary};
70
+ `;
71
+ export const StyledLegendScale = styled.div `
72
+ display: flex;
73
+ gap: 3px;
74
+ `;
75
+ export const StyledLegendCell = styled.span `
76
+ display: inline-block;
77
+ width: ${({ $size }) => $size}px;
78
+ height: ${({ $size }) => $size}px;
79
+ border-radius: ${({ $radius }) => $radius}px;
80
+ background: ${({ $color }) => $color};
81
+ box-shadow: inset 0 0 0 1px ${({ theme }) => theme.palette.divider};
82
+ `;
83
+ export const StyledTooltip = styled(StyledChartTooltip).attrs({
84
+ $minWidth: 140,
85
+ $maxWidth: 240,
86
+ }) ``;
87
+ export const StyledTooltipHeader = StyledChartTooltipHeader;
88
+ export const StyledTooltipSwatch = StyledChartTooltipSwatch;
89
+ export const StyledTooltipMeta = styled(StyledChartTooltipMeta) `
90
+ display: block;
91
+ `;
@@ -0,0 +1,80 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ import type { ChartExportOptions } from "../ChartUtils";
3
+ export type HeatMapDatum<TData = unknown> = {
4
+ /** Date represented by this cell. ISO yyyy-mm-dd strings are recommended. */
5
+ date: Date | string;
6
+ /** Numeric value used to determine cell intensity. */
7
+ value: number;
8
+ /** Optional per-cell color. Takes precedence over generated scale colors. */
9
+ color?: string;
10
+ /** Optional contextual payload returned in callbacks and formatter functions. */
11
+ data?: TData;
12
+ };
13
+ export type HeatMapCell<TData = unknown> = {
14
+ date: Date;
15
+ dateKey: string;
16
+ value: number;
17
+ color?: string;
18
+ datum?: HeatMapDatum<TData>;
19
+ weekIndex: number;
20
+ dayIndex: number;
21
+ };
22
+ export type HeatMapMonthLabel = {
23
+ label: string;
24
+ weekIndex: number;
25
+ };
26
+ export type HeatMapTooltipState = {
27
+ dateKey: string;
28
+ x: number;
29
+ y: number;
30
+ };
31
+ export type HeatMapProps<TData = unknown> = HTMLAttributes<HTMLDivElement> & ChartExportOptions & {
32
+ /** Values rendered by the heatmap. Missing dates render as empty cells. */
33
+ data: HeatMapDatum<TData>[];
34
+ /** First date to render. Defaults to the earliest date in data. */
35
+ startDate?: Date | string;
36
+ /** Last date to render. Defaults to the latest date in data. */
37
+ endDate?: Date | string;
38
+ /** Size of each square cell in pixels. Defaults to 12. */
39
+ cellSize?: number;
40
+ /** Gap between cells in pixels. Defaults to 4. */
41
+ cellGap?: number;
42
+ /** Cell corner radius in pixels. Defaults to 2. */
43
+ cellRadius?: number;
44
+ /** Empty cell fill color. Defaults to the theme secondary background. */
45
+ emptyColor?: string;
46
+ /** Ordered color scale used for non-empty cells. */
47
+ colors?: string[];
48
+ /** Minimum value for color scaling. Defaults to 0. */
49
+ minValue?: number;
50
+ /** Maximum value for color scaling. Defaults to the largest data value. */
51
+ maxValue?: number;
52
+ /** Day used as the first row. 0 is Sunday, 1 is Monday. Defaults to 0. */
53
+ weekStartsOn?: 0 | 1;
54
+ /** Shows month labels above the heatmap. Defaults to true. */
55
+ showMonthLabels?: boolean;
56
+ /** Shows weekday labels at the left of the heatmap. Defaults to true. */
57
+ showWeekdayLabels?: boolean;
58
+ /** Shows the low-to-high legend. Defaults to true. */
59
+ showLegend?: boolean;
60
+ /** Animates cells into view on initial render. Defaults to false. */
61
+ animateOnRender?: boolean;
62
+ /** Duration in milliseconds for each cell animation. Defaults to 320. */
63
+ animationDuration?: number;
64
+ /** Delay in milliseconds between each cell animation. Defaults to 8. */
65
+ animationStagger?: number;
66
+ /** Shows a custom themed tooltip when hovering over cells. Defaults to false. */
67
+ showTooltips?: boolean;
68
+ /** Accessible label for the SVG chart image. Defaults to "Heat map". */
69
+ ariaLabel?: string;
70
+ /** Formats values shown in tooltips and accessibility text. */
71
+ valueFormatter?: (value: number, datum?: HeatMapDatum<TData>) => React.ReactNode;
72
+ /** Formats month labels. Receives the first visible date in that month. */
73
+ monthLabelFormatter?: (date: Date) => string;
74
+ /** Formats weekday labels. Receives the day index from 0 to 6. */
75
+ weekdayLabelFormatter?: (dayIndex: number) => string;
76
+ /** Custom tooltip renderer. Receives the cell plus original datum when available. */
77
+ tooltipFormatter?: (cell: HeatMapCell<TData>, datum?: HeatMapDatum<TData>) => React.ReactNode;
78
+ /** Called when a cell is clicked or activated with Enter/Space. */
79
+ onCellClick?: (event: React.MouseEvent<SVGRectElement> | React.KeyboardEvent<SVGRectElement>, cell: HeatMapCell<TData>, datum?: HeatMapDatum<TData>) => void;
80
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export { default } from "./HeatMap";
2
+ export { default as HeatMap } from "./HeatMap";
3
+ export type { HeatMapCell, HeatMapDatum, HeatMapProps } from "./HeatMap.types";
@@ -0,0 +1,2 @@
1
+ export { default } from "./HeatMap";
2
+ export { default as HeatMap } from "./HeatMap";
@@ -0,0 +1,5 @@
1
+ import { ReactElement, RefAttributes } from "react";
2
+ import { ChartHandle } from "../ChartUtils";
3
+ import { LineChartProps } from "./LineChart.types";
4
+ export declare const LineChart: <TData>(props: LineChartProps<TData> & RefAttributes<ChartHandle>) => ReactElement | null;
5
+ export default LineChart;