@galaxy-io/dls 1.4.9 → 1.4.11
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.
- package/dist/accordion/Accordion.d.ts +19 -2
- package/dist/accordion/Accordion.js +8 -0
- package/dist/avatar/Avatar.d.ts +9 -0
- package/dist/avatar/Avatar.js +4 -0
- package/dist/avatar/AvatarShimmer.d.ts +2 -0
- package/dist/avatar/AvatarShimmer.js +1 -0
- package/dist/backgrounds/CellGridBackground.d.ts +12 -1
- package/dist/backgrounds/CellGridBackground.js +5 -0
- package/dist/backgrounds/CrossGridBackground.d.ts +13 -1
- package/dist/backgrounds/CrossGridBackground.js +4 -0
- package/dist/backgrounds/DotGridBackground.d.ts +12 -1
- package/dist/backgrounds/DotGridBackground.js +4 -0
- package/dist/badge/Badge.d.ts +12 -0
- package/dist/badge/Badge.js +7 -0
- package/dist/beacons/Beacon.d.ts +7 -13
- package/dist/beacons/Beacon.js +3 -0
- package/dist/buttons/Button.d.ts +18 -0
- package/dist/buttons/Button.js +10 -1
- package/dist/charts/BarChart.js +3 -1
- package/dist/charts/ChartFrame.js +5 -7
- package/dist/charts/ChartLegend.js +1 -5
- package/dist/charts/ChartPrimitives.d.ts +1 -14
- package/dist/charts/ChartPrimitives.js +50 -69
- package/dist/charts/DashboardProvider.d.ts +47 -0
- package/dist/charts/DashboardProvider.js +52 -0
- package/dist/charts/LineChart.js +1 -0
- package/dist/charts/ProgressBar.d.ts +13 -1
- package/dist/charts/ProgressBar.js +7 -0
- package/dist/charts/StatChart.d.ts +10 -1
- package/dist/charts/StatChart.js +5 -0
- package/dist/charts/constants.d.ts +4 -18
- package/dist/charts/constants.js +5 -19
- package/dist/charts/useChartInteraction.d.ts +25 -8
- package/dist/charts/useChartInteraction.js +61 -6
- package/dist/chips/Chip.d.ts +20 -1
- package/dist/chips/Chip.js +9 -1
- package/dist/containers/FlexItem.d.ts +14 -12
- package/dist/containers/FlexItem.js +4 -0
- package/dist/containers/FlexWrapper.d.ts +29 -96
- package/dist/containers/FlexWrapper.js +12 -0
- package/dist/containers/GridWrapper.d.ts +25 -66
- package/dist/containers/GridWrapper.js +8 -0
- package/dist/containers/Spacing.d.ts +10 -0
- package/dist/containers/Spacing.js +7 -0
- package/dist/containers/Wrapper.d.ts +11 -1
- package/dist/containers/Wrapper.js +4 -0
- package/dist/dividers/HorizontalDivider.d.ts +2 -0
- package/dist/dividers/HorizontalDivider.js +1 -0
- package/dist/dividers/VerticalDivider.d.ts +4 -0
- package/dist/dividers/VerticalDivider.js +4 -0
- package/dist/drawer/Drawer.d.ts +11 -4
- package/dist/drawer/Drawer.js +7 -0
- package/dist/dropdown/Dropdown.d.ts +24 -0
- package/dist/dropdown/Dropdown.js +9 -0
- package/dist/editor/CodeEditor.d.ts +23 -42
- package/dist/editor/CodeEditor.js +9 -1
- package/dist/hooks/useDismiss.d.ts +6 -0
- package/dist/hooks/useDismiss.js +6 -0
- package/dist/hooks/useElementClientSize.d.ts +2 -2
- package/dist/hooks/useResize.d.ts +5 -2
- package/dist/icons/GalaxyLogomark.d.ts +9 -1
- package/dist/icons/GalaxyLogomark.js +7 -1
- package/dist/icons/GalaxyLogomark3D.d.ts +15 -0
- package/dist/icons/GalaxyLogomark3D.js +9 -0
- package/dist/icons/GalaxyLogomarkAnimation.d.ts +10 -0
- package/dist/icons/GalaxyLogomarkAnimation.js +7 -1
- package/dist/icons/GalaxyWordmark.d.ts +7 -1
- package/dist/icons/GalaxyWordmark.js +5 -1
- package/dist/icons/Icon.d.ts +10 -0
- package/dist/icons/Icon.js +5 -0
- package/dist/inputs/CheckboxInput.d.ts +13 -0
- package/dist/inputs/CheckboxInput.js +8 -0
- package/dist/inputs/ColorInput.d.ts +15 -0
- package/dist/inputs/ColorInput.js +6 -0
- package/dist/inputs/CopyInput.d.ts +9 -0
- package/dist/inputs/CopyInput.js +4 -0
- package/dist/inputs/DateInput.d.ts +13 -0
- package/dist/inputs/DateInput.js +5 -0
- package/dist/inputs/Input.d.ts +37 -0
- package/dist/inputs/Input.js +13 -0
- package/dist/inputs/MultiSelectInput.d.ts +26 -0
- package/dist/inputs/MultiSelectInput.js +6 -0
- package/dist/inputs/MultiTextInput.d.ts +16 -0
- package/dist/inputs/MultiTextInput.js +9 -0
- package/dist/inputs/NumberInput.d.ts +8 -2
- package/dist/inputs/NumberInput.js +7 -1
- package/dist/inputs/PasswordInput.d.ts +9 -1
- package/dist/inputs/PasswordInput.js +4 -0
- package/dist/inputs/RadioInput.d.ts +13 -0
- package/dist/inputs/RadioInput.js +8 -0
- package/dist/inputs/SelectInput.d.ts +30 -0
- package/dist/inputs/SelectInput.js +8 -0
- package/dist/inputs/SliderInput.d.ts +15 -0
- package/dist/inputs/SliderInput.js +6 -0
- package/dist/inputs/SwitcherInput.d.ts +10 -1
- package/dist/inputs/SwitcherInput.js +4 -0
- package/dist/inputs/TextAreaInput.d.ts +24 -0
- package/dist/inputs/TextAreaInput.js +9 -0
- package/dist/inputs/TextInput.d.ts +8 -1
- package/dist/inputs/TextInput.js +6 -0
- package/dist/inputs/ToggleInput.d.ts +11 -0
- package/dist/inputs/ToggleInput.js +6 -0
- package/dist/lists/BulletedList.d.ts +4 -0
- package/dist/lists/BulletedList.js +2 -0
- package/dist/modal/Modal.d.ts +8 -0
- package/dist/modal/Modal.js +6 -0
- package/dist/overlay/OverlayProvider.d.ts +11 -0
- package/dist/overlay/OverlayProvider.js +7 -0
- package/dist/overlay/constants.d.ts +1 -0
- package/dist/overlay/constants.js +1 -0
- package/dist/overlay/useOverlay.d.ts +11 -0
- package/dist/overlay/useOverlay.js +9 -0
- package/dist/resizable/HorizontalResizeHandle.d.ts +8 -1
- package/dist/resizable/HorizontalResizeHandle.js +6 -0
- package/dist/resizable/VerticalResizeHandle.d.ts +8 -1
- package/dist/resizable/VerticalResizeHandle.js +6 -0
- package/dist/shapes/Circle.d.ts +4 -1
- package/dist/shapes/Circle.js +1 -0
- package/dist/shapes/Square.d.ts +4 -1
- package/dist/shapes/Square.js +1 -0
- package/dist/styles.css +20 -21
- package/dist/table/InfiniteSpreadsheet.d.ts +7 -0
- package/dist/table/InfiniteSpreadsheet.js +7 -0
- package/dist/table/InfiniteTable.d.ts +8 -0
- package/dist/table/InfiniteTable.js +8 -0
- package/dist/table/VirtualizedInfiniteTable.d.ts +7 -0
- package/dist/table/VirtualizedInfiniteTable.js +7 -0
- package/dist/text/Bold.d.ts +4 -0
- package/dist/text/Bold.js +4 -0
- package/dist/text/Code.d.ts +4 -0
- package/dist/text/Code.js +4 -0
- package/dist/text/EditableText.d.ts +10 -1
- package/dist/text/EditableText.js +7 -0
- package/dist/text/Ellipsis.d.ts +6 -4
- package/dist/text/Ellipsis.js +4 -0
- package/dist/text/HotKeys.d.ts +10 -0
- package/dist/text/HotKeys.js +6 -0
- package/dist/text/MarkdownText.d.ts +9 -1
- package/dist/text/MarkdownText.js +6 -0
- package/dist/text/Paragraph.d.ts +17 -0
- package/dist/text/Paragraph.js +7 -0
- package/dist/text/RequiredMarker.d.ts +3 -1
- package/dist/text/RequiredMarker.js +1 -0
- package/dist/text/Selectable.d.ts +4 -0
- package/dist/text/Selectable.js +4 -0
- package/dist/text/Text.d.ts +19 -0
- package/dist/text/Text.js +10 -0
- package/dist/text/TextShimmer.d.ts +7 -0
- package/dist/text/TextShimmer.js +4 -0
- package/dist/theme/GalaxyTheme.d.ts +35 -4
- package/dist/theme/GalaxyTheme.js +13 -1
- package/dist/theme/constants.d.ts +1 -6
- package/dist/theme/constants.js +10 -15
- package/dist/theme/index.js +2 -1
- package/dist/theme/types.d.ts +21 -0
- package/dist/theme/types.js +10 -0
- package/dist/toast/Toast.d.ts +11 -0
- package/dist/toast/Toast.js +5 -0
- package/dist/toast/ToastProvider.d.ts +9 -0
- package/dist/toast/ToastProvider.js +4 -0
- package/dist/toast/useToast.d.ts +7 -0
- package/dist/toast/useToast.js +7 -0
- package/dist/tooltip/Tooltip.d.ts +19 -1
- package/dist/tooltip/Tooltip.js +9 -0
- package/dist/transform/Fade.d.ts +7 -0
- package/dist/transform/Fade.js +6 -0
- package/dist/transform/Flash.d.ts +4 -0
- package/dist/transform/Flash.js +4 -0
- package/dist/transform/Rotate.d.ts +7 -0
- package/dist/transform/Rotate.js +4 -0
- package/dist/transform/ScaleFade.d.ts +7 -0
- package/dist/transform/ScaleFade.js +6 -0
- package/dist/transform/Spin.d.ts +7 -0
- package/dist/transform/Spin.js +5 -0
- package/dist/widget/Widget.d.ts +18 -1
- package/dist/widget/Widget.js +5 -0
- package/package.json +1 -1
|
@@ -22,12 +22,10 @@ import { styled } from "@linaria/react";
|
|
|
22
22
|
* HOC's return type erases the element type, so a mismatched ref would compile.
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
|
-
* Shared emphasis
|
|
25
|
+
* Shared emphasis states.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* gesture instead of a strobe. The plot sets `data-active` while any category is
|
|
30
|
-
* engaged, which cancels the delay for the whole subtree.
|
|
27
|
+
* Deliberately no transition: emphasis is feedback, and feedback that eases in
|
|
28
|
+
* reads as lag. The states snap.
|
|
31
29
|
*/
|
|
32
30
|
/**
|
|
33
31
|
* Outer container. Receives the measurement ref.
|
|
@@ -104,38 +102,29 @@ var ChartSvg = /*#__PURE__*/ styled("svg")({
|
|
|
104
102
|
class: "c10uj5yt",
|
|
105
103
|
propsAsIs: false
|
|
106
104
|
});
|
|
107
|
-
/**
|
|
108
|
-
* Cancels the restore delay for every mark beneath it while a category is
|
|
109
|
-
* engaged. See {@link markState}.
|
|
110
|
-
*/
|
|
111
|
-
var ChartPlotGroup = /*#__PURE__*/ styled("g")({
|
|
112
|
-
name: "ChartPlotGroup",
|
|
113
|
-
class: "cyuty3o",
|
|
114
|
-
propsAsIs: true
|
|
115
|
-
});
|
|
116
105
|
var ChartBarPath = /*#__PURE__*/ styled("path")({
|
|
117
106
|
name: "ChartBarPath",
|
|
118
|
-
class: "
|
|
107
|
+
class: "cyuty3o",
|
|
119
108
|
propsAsIs: true
|
|
120
109
|
});
|
|
121
110
|
var ChartLinePath = /*#__PURE__*/ styled("path")({
|
|
122
111
|
name: "ChartLinePath",
|
|
123
|
-
class: "
|
|
112
|
+
class: "c1ob2op2",
|
|
124
113
|
propsAsIs: true
|
|
125
114
|
});
|
|
126
115
|
var ChartAreaPath = /*#__PURE__*/ styled("path")({
|
|
127
116
|
name: "ChartAreaPath",
|
|
128
|
-
class: "
|
|
117
|
+
class: "c8c506o",
|
|
129
118
|
propsAsIs: true
|
|
130
119
|
});
|
|
131
120
|
var ChartPointCircle = /*#__PURE__*/ styled("circle")({
|
|
132
121
|
name: "ChartPointCircle",
|
|
133
|
-
class: "
|
|
122
|
+
class: "ceqlpek",
|
|
134
123
|
propsAsIs: true
|
|
135
124
|
});
|
|
136
125
|
var ChartArcPath = /*#__PURE__*/ styled("path")({
|
|
137
126
|
name: "ChartArcPath",
|
|
138
|
-
class: "
|
|
127
|
+
class: "c1fcbddl",
|
|
139
128
|
propsAsIs: true
|
|
140
129
|
});
|
|
141
130
|
/**
|
|
@@ -151,7 +140,7 @@ var ChartArcPath = /*#__PURE__*/ styled("path")({
|
|
|
151
140
|
*/
|
|
152
141
|
var ChartHitTarget = /*#__PURE__*/ styled("rect")({
|
|
153
142
|
name: "ChartHitTarget",
|
|
154
|
-
class: "
|
|
143
|
+
class: "cpcxr59",
|
|
155
144
|
propsAsIs: true
|
|
156
145
|
});
|
|
157
146
|
/**
|
|
@@ -164,7 +153,7 @@ var ChartHitTarget = /*#__PURE__*/ styled("rect")({
|
|
|
164
153
|
*/
|
|
165
154
|
var ChartHitTargetPath = /*#__PURE__*/ styled("path")({
|
|
166
155
|
name: "ChartHitTargetPath",
|
|
167
|
-
class: "
|
|
156
|
+
class: "c1wvzvu4",
|
|
168
157
|
propsAsIs: true
|
|
169
158
|
});
|
|
170
159
|
/**
|
|
@@ -175,21 +164,21 @@ var ChartHitTargetPath = /*#__PURE__*/ styled("path")({
|
|
|
175
164
|
var _exp15 = () => ({ theme }) => theme.color.border.primary;
|
|
176
165
|
var ChartGridLine = withTheme(/*#__PURE__*/ styled("line")({
|
|
177
166
|
name: "ChartGridLine",
|
|
178
|
-
class: "
|
|
167
|
+
class: "c17guewt",
|
|
179
168
|
propsAsIs: true,
|
|
180
|
-
vars: { "
|
|
169
|
+
vars: { "c17guewt-0": [_exp15()] }
|
|
181
170
|
}));
|
|
182
171
|
/** Vertical rule marking the hovered category on a line chart. */
|
|
183
172
|
var _exp16 = () => ({ theme }) => theme.color.border.secondary;
|
|
184
173
|
var ChartCursorLine = withTheme(/*#__PURE__*/ styled("line")({
|
|
185
174
|
name: "ChartCursorLine",
|
|
186
|
-
class: "
|
|
175
|
+
class: "cblgiyf",
|
|
187
176
|
propsAsIs: true,
|
|
188
|
-
vars: { "
|
|
177
|
+
vars: { "cblgiyf-0": [_exp16()] }
|
|
189
178
|
}));
|
|
190
179
|
var ChartAxisLabelBox = /*#__PURE__*/ styled("foreignObject")({
|
|
191
180
|
name: "ChartAxisLabelBox",
|
|
192
|
-
class: "
|
|
181
|
+
class: "c1lr03cc",
|
|
193
182
|
propsAsIs: true
|
|
194
183
|
});
|
|
195
184
|
/**
|
|
@@ -206,14 +195,14 @@ var _exp22 = () => ({ theme }) => theme.color.background.tertiary;
|
|
|
206
195
|
var _exp23 = () => ({ $isVisible }) => $isVisible ? 1 : 0;
|
|
207
196
|
var ChartTooltipPositioner = withTheme(/*#__PURE__*/ styled("div")({
|
|
208
197
|
name: "ChartTooltipPositioner",
|
|
209
|
-
class: "
|
|
198
|
+
class: "cizy1s8",
|
|
210
199
|
propsAsIs: false,
|
|
211
200
|
vars: {
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"
|
|
201
|
+
"cizy1s8-0": [_exp17()],
|
|
202
|
+
"cizy1s8-1": [_exp18()],
|
|
203
|
+
"cizy1s8-2": [_exp21()],
|
|
204
|
+
"cizy1s8-3": [_exp22()],
|
|
205
|
+
"cizy1s8-4": [_exp23()]
|
|
217
206
|
}
|
|
218
207
|
}));
|
|
219
208
|
/**
|
|
@@ -227,19 +216,19 @@ var ChartTooltipPositioner = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
227
216
|
*/
|
|
228
217
|
var ChartTooltipGrid = /*#__PURE__*/ styled("div")({
|
|
229
218
|
name: "ChartTooltipGrid",
|
|
230
|
-
class: "
|
|
219
|
+
class: "c1ukq11d",
|
|
231
220
|
propsAsIs: false
|
|
232
221
|
});
|
|
233
222
|
/** Swatch + label. `min-width: 0` is what lets the label actually ellipsize. */
|
|
234
223
|
var ChartTooltipLabelCell = /*#__PURE__*/ styled("div")({
|
|
235
224
|
name: "ChartTooltipLabelCell",
|
|
236
|
-
class: "
|
|
225
|
+
class: "cwcko2m",
|
|
237
226
|
propsAsIs: false
|
|
238
227
|
});
|
|
239
228
|
/** Right-aligned and never wrapped — the value always shows in full. */
|
|
240
229
|
var ChartTooltipValueCell = /*#__PURE__*/ styled("div")({
|
|
241
230
|
name: "ChartTooltipValueCell",
|
|
242
|
-
class: "
|
|
231
|
+
class: "cqwhvyz",
|
|
243
232
|
propsAsIs: false
|
|
244
233
|
});
|
|
245
234
|
/**
|
|
@@ -255,12 +244,12 @@ var _exp28 = () => ({ $centerY }) => `${$centerY}px`;
|
|
|
255
244
|
var _exp30 = () => ({ $diameter }) => `${$diameter}px`;
|
|
256
245
|
var ChartCenterBox = /*#__PURE__*/ styled("div")({
|
|
257
246
|
name: "ChartCenterBox",
|
|
258
|
-
class: "
|
|
247
|
+
class: "c1iaray",
|
|
259
248
|
propsAsIs: false,
|
|
260
249
|
vars: {
|
|
261
|
-
"
|
|
262
|
-
"
|
|
263
|
-
"
|
|
250
|
+
"c1iaray-0": [_exp27()],
|
|
251
|
+
"c1iaray-1": [_exp28()],
|
|
252
|
+
"c1iaray-2": [_exp30()]
|
|
264
253
|
}
|
|
265
254
|
});
|
|
266
255
|
/**
|
|
@@ -271,21 +260,15 @@ var _exp31 = () => ({ theme }) => theme.color.border.primary;
|
|
|
271
260
|
var _exp32 = () => ({ theme }) => theme.color.background.primary;
|
|
272
261
|
var ChartEmptyOverlay = withTheme(/*#__PURE__*/ styled("div")({
|
|
273
262
|
name: "ChartEmptyOverlay",
|
|
274
|
-
class: "
|
|
263
|
+
class: "cz6jod1",
|
|
275
264
|
propsAsIs: false,
|
|
276
265
|
vars: {
|
|
277
|
-
"
|
|
278
|
-
"
|
|
266
|
+
"cz6jod1-0": [_exp31()],
|
|
267
|
+
"cz6jod1-1": [_exp32()]
|
|
279
268
|
}
|
|
280
269
|
}));
|
|
281
270
|
/**
|
|
282
271
|
* Aligns the legend under the plot rather than the value-axis gutter.
|
|
283
|
-
*
|
|
284
|
-
* Also cancels the restore delay for its entries while the legend is dimming,
|
|
285
|
-
* exactly as {@link ChartPlotGroup} does for the marks. The legend renders
|
|
286
|
-
* *outside* the SVG, so the plot group's selector cannot reach it — without this
|
|
287
|
-
* the marks dim instantly while their legend entries sit through the full
|
|
288
|
-
* {@link CHART_RESTORE_DELAY_MS}, and the two visibly fall out of step.
|
|
289
272
|
*/
|
|
290
273
|
var _exp33 = () => ({ $vertical }) => $vertical ? "column" : "row";
|
|
291
274
|
var _exp34 = () => ({ $vertical }) => $vertical ? "flex-start" : "center";
|
|
@@ -298,18 +281,18 @@ var _exp40 = () => ({ $vertical }) => $vertical ? "0" : "10px";
|
|
|
298
281
|
var _exp41 = () => ({ $inset }) => `${$inset}px`;
|
|
299
282
|
var ChartLegendRow = /*#__PURE__*/ styled("div")({
|
|
300
283
|
name: "ChartLegendRow",
|
|
301
|
-
class: "
|
|
284
|
+
class: "c1de5mqk",
|
|
302
285
|
propsAsIs: false,
|
|
303
286
|
vars: {
|
|
304
|
-
"
|
|
305
|
-
"
|
|
306
|
-
"
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"
|
|
312
|
-
"
|
|
287
|
+
"c1de5mqk-0": [_exp33()],
|
|
288
|
+
"c1de5mqk-1": [_exp34()],
|
|
289
|
+
"c1de5mqk-2": [_exp35()],
|
|
290
|
+
"c1de5mqk-3": [_exp36()],
|
|
291
|
+
"c1de5mqk-4": [_exp37()],
|
|
292
|
+
"c1de5mqk-5": [_exp38()],
|
|
293
|
+
"c1de5mqk-6": [_exp39()],
|
|
294
|
+
"c1de5mqk-7": [_exp40()],
|
|
295
|
+
"c1de5mqk-8": [_exp41()]
|
|
313
296
|
}
|
|
314
297
|
});
|
|
315
298
|
/**
|
|
@@ -325,12 +308,12 @@ var _exp43 = () => ({ $vertical }) => $vertical ? "flex-start" : "center";
|
|
|
325
308
|
var _exp44 = () => ({ $vertical }) => $vertical ? `8px` : `16px`;
|
|
326
309
|
var ChartLegendMeasure = /*#__PURE__*/ styled("div")({
|
|
327
310
|
name: "ChartLegendMeasure",
|
|
328
|
-
class: "
|
|
311
|
+
class: "cjirv6a",
|
|
329
312
|
propsAsIs: false,
|
|
330
313
|
vars: {
|
|
331
|
-
"
|
|
332
|
-
"
|
|
333
|
-
"
|
|
314
|
+
"cjirv6a-0": [_exp42()],
|
|
315
|
+
"cjirv6a-1": [_exp43()],
|
|
316
|
+
"cjirv6a-2": [_exp44()]
|
|
334
317
|
}
|
|
335
318
|
});
|
|
336
319
|
/**
|
|
@@ -338,13 +321,11 @@ var ChartLegendMeasure = /*#__PURE__*/ styled("div")({
|
|
|
338
321
|
* the body of an interactive tooltip.
|
|
339
322
|
*
|
|
340
323
|
* Scrolls past {@link CHART_LEGEND_OVERFLOW_MAX_HEIGHT} so a fifty-series chart
|
|
341
|
-
* gets a bounded popover rather than one taller than the plot.
|
|
342
|
-
* `data-active` delay-cancel rule: the tooltip content mounts outside
|
|
343
|
-
* {@link ChartLegendRow}, where the row's selector cannot reach it.
|
|
324
|
+
* gets a bounded popover rather than one taller than the plot.
|
|
344
325
|
*/
|
|
345
326
|
var ChartLegendOverflowList = /*#__PURE__*/ styled("div")({
|
|
346
327
|
name: "ChartLegendOverflowList",
|
|
347
|
-
class: "
|
|
328
|
+
class: "c1armna5",
|
|
348
329
|
propsAsIs: false
|
|
349
330
|
});
|
|
350
331
|
/**
|
|
@@ -361,14 +342,14 @@ var ChartLegendOverflowList = /*#__PURE__*/ styled("div")({
|
|
|
361
342
|
*/
|
|
362
343
|
var ChartLegendItemButton = /*#__PURE__*/ styled("button")({
|
|
363
344
|
name: "ChartLegendItemButton",
|
|
364
|
-
class: "
|
|
345
|
+
class: "cgd77rv",
|
|
365
346
|
propsAsIs: false
|
|
366
347
|
});
|
|
367
348
|
/** The same row, when the legend is inert — no button semantics to announce. */
|
|
368
349
|
var ChartLegendItemStatic = /*#__PURE__*/ styled("div")({
|
|
369
350
|
name: "ChartLegendItemStatic",
|
|
370
|
-
class: "
|
|
351
|
+
class: "cutidpi",
|
|
371
352
|
propsAsIs: false
|
|
372
353
|
});
|
|
373
354
|
//#endregion
|
|
374
|
-
export { ChartArcPath, ChartAreaPath, ChartAxisLabelBox, ChartBarPath, ChartCenterBox, ChartCursorLine, ChartEmptyOverlay, ChartGridLine, ChartHitTarget, ChartHitTargetPath, ChartLegendItemButton, ChartLegendItemStatic, ChartLegendMeasure, ChartLegendOverflowList, ChartLegendRow, ChartLinePath, ChartPlotBox,
|
|
355
|
+
export { ChartArcPath, ChartAreaPath, ChartAxisLabelBox, ChartBarPath, ChartCenterBox, ChartCursorLine, ChartEmptyOverlay, ChartGridLine, ChartHitTarget, ChartHitTargetPath, ChartLegendItemButton, ChartLegendItemStatic, ChartLegendMeasure, ChartLegendOverflowList, ChartLegendRow, ChartLinePath, ChartPlotBox, ChartPointCircle, ChartRoot, ChartSvg, ChartTooltipGrid, ChartTooltipLabelCell, ChartTooltipPositioner, ChartTooltipValueCell };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The category one chart's pointer is currently over, broadcast to its
|
|
4
|
+
* siblings.
|
|
5
|
+
*/
|
|
6
|
+
export interface DashboardSyncEntry {
|
|
7
|
+
/** `useId` of the chart whose pointer produced this entry. */
|
|
8
|
+
sourceId: string;
|
|
9
|
+
/**
|
|
10
|
+
* The raw category label under the pointer — never `labelFormatter` output,
|
|
11
|
+
* so two charts formatting the same label differently still match.
|
|
12
|
+
*/
|
|
13
|
+
categoryKey: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DashboardContextValue {
|
|
16
|
+
activeEntry: DashboardSyncEntry | null;
|
|
17
|
+
setActive: (entry: DashboardSyncEntry) => void;
|
|
18
|
+
/** Clears only if the current entry belongs to `sourceId`. */
|
|
19
|
+
clearActive: (sourceId: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const DashboardContext: import("react").Context<DashboardContextValue | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Shares the hovered category between the cartesian charts inside it.
|
|
24
|
+
*
|
|
25
|
+
* Hovering a category in one chart shows the same category emphasized in every
|
|
26
|
+
* sibling — matched by raw category label, so charts whose category sets only
|
|
27
|
+
* partially overlap simply show nothing for the labels they lack. The tooltip
|
|
28
|
+
* stays local to the chart under the pointer; siblings get the quiet emphasis
|
|
29
|
+
* only (LineChart its cursor line and dots, BarChart its category muting).
|
|
30
|
+
*
|
|
31
|
+
* Scope, deliberately narrow:
|
|
32
|
+
* - Only the category axis syncs. Legend (series) hover stays local.
|
|
33
|
+
* - PieChart never participates — it has no category axis.
|
|
34
|
+
* - There is no per-chart opt-out prop. The opt-out is rendering the chart
|
|
35
|
+
* outside the provider, and nesting a second provider isolates a subset —
|
|
36
|
+
* charts sync with their nearest ancestor.
|
|
37
|
+
*
|
|
38
|
+
* Renders no DOM and holds no layout opinion — unlike `OverlayProvider` it is
|
|
39
|
+
* not a page-root singleton, and several can coexist on a page.
|
|
40
|
+
*
|
|
41
|
+
* Plain context state is the right transport here: entries change at category
|
|
42
|
+
* granularity (once per hit band crossed, not per mousemove), so a sweep
|
|
43
|
+
* across a chart re-renders the group a handful of times. No subscription or
|
|
44
|
+
* selector machinery is warranted.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DashboardProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
|
|
47
|
+
export default DashboardProvider;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createContext, useCallback, useMemo, useState } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/charts/DashboardProvider.tsx
|
|
4
|
+
var DashboardContext = createContext(null);
|
|
5
|
+
/**
|
|
6
|
+
* Shares the hovered category between the cartesian charts inside it.
|
|
7
|
+
*
|
|
8
|
+
* Hovering a category in one chart shows the same category emphasized in every
|
|
9
|
+
* sibling — matched by raw category label, so charts whose category sets only
|
|
10
|
+
* partially overlap simply show nothing for the labels they lack. The tooltip
|
|
11
|
+
* stays local to the chart under the pointer; siblings get the quiet emphasis
|
|
12
|
+
* only (LineChart its cursor line and dots, BarChart its category muting).
|
|
13
|
+
*
|
|
14
|
+
* Scope, deliberately narrow:
|
|
15
|
+
* - Only the category axis syncs. Legend (series) hover stays local.
|
|
16
|
+
* - PieChart never participates — it has no category axis.
|
|
17
|
+
* - There is no per-chart opt-out prop. The opt-out is rendering the chart
|
|
18
|
+
* outside the provider, and nesting a second provider isolates a subset —
|
|
19
|
+
* charts sync with their nearest ancestor.
|
|
20
|
+
*
|
|
21
|
+
* Renders no DOM and holds no layout opinion — unlike `OverlayProvider` it is
|
|
22
|
+
* not a page-root singleton, and several can coexist on a page.
|
|
23
|
+
*
|
|
24
|
+
* Plain context state is the right transport here: entries change at category
|
|
25
|
+
* granularity (once per hit band crossed, not per mousemove), so a sweep
|
|
26
|
+
* across a chart re-renders the group a handful of times. No subscription or
|
|
27
|
+
* selector machinery is warranted.
|
|
28
|
+
*/
|
|
29
|
+
var DashboardProvider = ({ children }) => {
|
|
30
|
+
const [activeEntry, setActiveEntry] = useState(null);
|
|
31
|
+
const setActive = useCallback((entry) => {
|
|
32
|
+
setActiveEntry((prev) => prev !== null && prev.sourceId === entry.sourceId && prev.categoryKey === entry.categoryKey ? prev : entry);
|
|
33
|
+
}, []);
|
|
34
|
+
const clearActive = useCallback((sourceId) => {
|
|
35
|
+
setActiveEntry((prev) => prev !== null && prev.sourceId === sourceId ? null : prev);
|
|
36
|
+
}, []);
|
|
37
|
+
const contextValue = useMemo(() => ({
|
|
38
|
+
activeEntry,
|
|
39
|
+
setActive,
|
|
40
|
+
clearActive
|
|
41
|
+
}), [
|
|
42
|
+
activeEntry,
|
|
43
|
+
setActive,
|
|
44
|
+
clearActive
|
|
45
|
+
]);
|
|
46
|
+
return /* @__PURE__ */ jsx(DashboardContext.Provider, {
|
|
47
|
+
value: contextValue,
|
|
48
|
+
children
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { DashboardContext, DashboardProvider, DashboardProvider as default };
|
package/dist/charts/LineChart.js
CHANGED
|
@@ -68,6 +68,7 @@ var LineChart = ({ series, lines, categories, width, height, fillWidth, fillHeig
|
|
|
68
68
|
const interaction = useChartInteraction({
|
|
69
69
|
categoryCount: geometry.columns.length,
|
|
70
70
|
seriesKeys: legendKeys,
|
|
71
|
+
categoryKeys: geometry.categories,
|
|
71
72
|
disabled: noTooltip || isLoading || isEmpty,
|
|
72
73
|
isLoading
|
|
73
74
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Fill color. Signals what the progress *means* — neutral, healthy, at risk. */
|
|
1
2
|
export declare enum ProgressBarVariant {
|
|
2
3
|
PRIMARY = "PRIMARY",
|
|
3
4
|
SECONDARY = "SECONDARY",
|
|
@@ -6,12 +7,23 @@ export declare enum ProgressBarVariant {
|
|
|
6
7
|
WARNING = "WARNING",
|
|
7
8
|
ERROR = "ERROR"
|
|
8
9
|
}
|
|
9
|
-
interface ProgressBarProps {
|
|
10
|
+
export interface ProgressBarProps {
|
|
11
|
+
/** Fill, 0–100. Values outside that range render empty rather than clamping. */
|
|
10
12
|
percentage: number;
|
|
13
|
+
/** @default ProgressBarVariant.PRIMARY */
|
|
11
14
|
variant?: ProgressBarVariant;
|
|
15
|
+
/** Bar thickness in px. @default 4 */
|
|
12
16
|
height?: number;
|
|
17
|
+
/** Render 0% as truly empty instead of the default hairline sliver. */
|
|
13
18
|
noSliverOnZero?: boolean;
|
|
19
|
+
/** Drop the pulse on the fill. */
|
|
14
20
|
noAnimation?: boolean;
|
|
15
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* A horizontal completion bar.
|
|
24
|
+
*
|
|
25
|
+
* At 0% it leaves a 0.5px sliver so the track still reads as a bar rather than
|
|
26
|
+
* an empty box — set `noSliverOnZero` when exact emptiness matters.
|
|
27
|
+
*/
|
|
16
28
|
declare const ProgressBar: ({ percentage, variant, height, noSliverOnZero, noAnimation, }: ProgressBarProps) => import("react").JSX.Element;
|
|
17
29
|
export default ProgressBar;
|
|
@@ -5,6 +5,7 @@ import { match } from "ts-pattern";
|
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/charts/ProgressBar.tsx
|
|
8
|
+
/** Fill color. Signals what the progress *means* — neutral, healthy, at risk. */
|
|
8
9
|
var ProgressBarVariant = /* @__PURE__ */ function(ProgressBarVariant) {
|
|
9
10
|
ProgressBarVariant["PRIMARY"] = "PRIMARY";
|
|
10
11
|
ProgressBarVariant["SECONDARY"] = "SECONDARY";
|
|
@@ -40,6 +41,12 @@ var ProgressBarFill = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
40
41
|
"p1sc05jm-2": [_exp6()]
|
|
41
42
|
}
|
|
42
43
|
}));
|
|
44
|
+
/**
|
|
45
|
+
* A horizontal completion bar.
|
|
46
|
+
*
|
|
47
|
+
* At 0% it leaves a 0.5px sliver so the track still reads as a bar rather than
|
|
48
|
+
* an empty box — set `noSliverOnZero` when exact emptiness matters.
|
|
49
|
+
*/
|
|
43
50
|
var ProgressBar = ({ percentage, variant = "PRIMARY", height = 4, noSliverOnZero = false, noAnimation = false }) => {
|
|
44
51
|
return /* @__PURE__ */ jsx(StyledProgressBar, {
|
|
45
52
|
$height: height,
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
/** Surface treatment of the stat tile. */
|
|
2
3
|
export declare enum StatChartVariant {
|
|
3
4
|
BASE = "BASE",
|
|
4
5
|
PRIMARY = "PRIMARY",
|
|
5
6
|
SECONDARY = "SECONDARY",
|
|
6
7
|
TERTIARY = "TERTIARY"
|
|
7
8
|
}
|
|
8
|
-
interface StatChartProps {
|
|
9
|
+
export interface StatChartProps {
|
|
10
|
+
/** What the number means. Rendered small and secondary above the value. */
|
|
9
11
|
label: string;
|
|
12
|
+
/** The headline figure. A node, so it can carry a unit or a trend indicator. */
|
|
10
13
|
value: ReactNode;
|
|
14
|
+
/** @default StatChartVariant.PRIMARY */
|
|
11
15
|
variant?: StatChartVariant;
|
|
16
|
+
/** Drop the hairline border — for tiles inside an already-bordered container. */
|
|
12
17
|
noBorder?: boolean;
|
|
13
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A single-number stat tile — the KPI card. Fixed 140px minimum width so a row
|
|
21
|
+
* of them lines up without you setting widths.
|
|
22
|
+
*/
|
|
14
23
|
declare const StatChart: ({ label, value, variant, noBorder, }: StatChartProps) => import("react").JSX.Element;
|
|
15
24
|
export default StatChart;
|
package/dist/charts/StatChart.js
CHANGED
|
@@ -6,6 +6,7 @@ import { styled } from "@linaria/react";
|
|
|
6
6
|
import { match } from "ts-pattern";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/charts/StatChart.tsx
|
|
9
|
+
/** Surface treatment of the stat tile. */
|
|
9
10
|
var StatChartVariant = /* @__PURE__ */ function(StatChartVariant) {
|
|
10
11
|
StatChartVariant["BASE"] = "BASE";
|
|
11
12
|
StatChartVariant["PRIMARY"] = "PRIMARY";
|
|
@@ -24,6 +25,10 @@ var StatChartWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
|
24
25
|
"slaxlp8-1": [_exp2()]
|
|
25
26
|
}
|
|
26
27
|
}));
|
|
28
|
+
/**
|
|
29
|
+
* A single-number stat tile — the KPI card. Fixed 140px minimum width so a row
|
|
30
|
+
* of them lines up without you setting widths.
|
|
31
|
+
*/
|
|
27
32
|
var StatChart = ({ label, value, variant = "PRIMARY", noBorder }) => {
|
|
28
33
|
return /* @__PURE__ */ jsx(StatChartWrapper, {
|
|
29
34
|
$variant: variant,
|
|
@@ -159,27 +159,13 @@ export declare const AGGREGATED_SLICE_KEY = "__other__";
|
|
|
159
159
|
/** Margin around a pie, which needs no axis gutters. */
|
|
160
160
|
export declare const PIE_CHART_MARGIN: ChartMargin;
|
|
161
161
|
/**
|
|
162
|
-
* Duration in ms for
|
|
162
|
+
* Duration in ms for the tooltip's fade and glide.
|
|
163
163
|
*
|
|
164
|
-
* Sits inside the 75–150ms band the DLS uses everywhere else.
|
|
165
|
-
*
|
|
166
|
-
*
|
|
164
|
+
* Sits inside the 75–150ms band the DLS uses everywhere else. Only the tooltip
|
|
165
|
+
* transitions — mark and legend emphasis snaps, because emphasis is feedback
|
|
166
|
+
* and feedback that eases in reads as lag.
|
|
167
167
|
*/
|
|
168
168
|
export declare const CHART_TRANSITION_MS = 100;
|
|
169
|
-
/**
|
|
170
|
-
* Delay in ms before marks return to full strength after the pointer leaves.
|
|
171
|
-
*
|
|
172
|
-
* Restoring immediately makes the whole chart flash while the pointer sweeps
|
|
173
|
-
* across categories. Highlighting stays instant (no delay) — only the
|
|
174
|
-
* *un*-highlight waits, so a sweep reads as one continuous gesture.
|
|
175
|
-
*
|
|
176
|
-
* Kept short because it does less work than it looks: while the pointer is
|
|
177
|
-
* anywhere in the plot the chart is still engaged, so `ChartPlotGroup` and
|
|
178
|
-
* `ChartLegendRow` zero this out and category-to-category sweeping is already
|
|
179
|
-
* instant. All this actually covers is the moment the pointer leaves entirely,
|
|
180
|
-
* where a long delay just feels like lag.
|
|
181
|
-
*/
|
|
182
|
-
export declare const CHART_RESTORE_DELAY_MS = 200;
|
|
183
169
|
/**
|
|
184
170
|
* Opacity ramp for the mark states.
|
|
185
171
|
*
|
package/dist/charts/constants.js
CHANGED
|
@@ -169,28 +169,14 @@ var PIE_CHART_MARGIN = {
|
|
|
169
169
|
left: 8
|
|
170
170
|
};
|
|
171
171
|
/**
|
|
172
|
-
* Duration in ms for
|
|
172
|
+
* Duration in ms for the tooltip's fade and glide.
|
|
173
173
|
*
|
|
174
|
-
* Sits inside the 75–150ms band the DLS uses everywhere else.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
174
|
+
* Sits inside the 75–150ms band the DLS uses everywhere else. Only the tooltip
|
|
175
|
+
* transitions — mark and legend emphasis snaps, because emphasis is feedback
|
|
176
|
+
* and feedback that eases in reads as lag.
|
|
177
177
|
*/
|
|
178
178
|
var CHART_TRANSITION_MS = 100;
|
|
179
179
|
/**
|
|
180
|
-
* Delay in ms before marks return to full strength after the pointer leaves.
|
|
181
|
-
*
|
|
182
|
-
* Restoring immediately makes the whole chart flash while the pointer sweeps
|
|
183
|
-
* across categories. Highlighting stays instant (no delay) — only the
|
|
184
|
-
* *un*-highlight waits, so a sweep reads as one continuous gesture.
|
|
185
|
-
*
|
|
186
|
-
* Kept short because it does less work than it looks: while the pointer is
|
|
187
|
-
* anywhere in the plot the chart is still engaged, so `ChartPlotGroup` and
|
|
188
|
-
* `ChartLegendRow` zero this out and category-to-category sweeping is already
|
|
189
|
-
* instant. All this actually covers is the moment the pointer leaves entirely,
|
|
190
|
-
* where a long delay just feels like lag.
|
|
191
|
-
*/
|
|
192
|
-
var CHART_RESTORE_DELAY_MS = 200;
|
|
193
|
-
/**
|
|
194
180
|
* Opacity ramp for the mark states.
|
|
195
181
|
*
|
|
196
182
|
* The grammar is inherited from the reference charts and is the opposite of the
|
|
@@ -280,4 +266,4 @@ var CHART_PALETTE_ORDER = [
|
|
|
280
266
|
ChartPalette.RED
|
|
281
267
|
];
|
|
282
268
|
//#endregion
|
|
283
|
-
export { AGGREGATED_SLICE_KEY, AUTO_MARGIN_LEFT_STEP, AXIS_TITLE_BAND, AXIS_TITLE_GAP, BAR_GAP_COMFORTABLE, BAR_GAP_MEDIUM, BAR_GAP_TIGHT, BAR_RADIUS, BAR_RADIUS_NARROW, BAR_WIDTH_RATIO, CAPTION_CHAR_WIDTH_PX, CATEGORY_AXIS_LABEL_GAP, CATEGORY_AXIS_LABEL_HEIGHT, CHART_LEGEND_COLUMN_GAP, CHART_LEGEND_OVERFLOW_MAX_HEIGHT, CHART_LEGEND_SIDE_GAP, CHART_LEGEND_VERTICAL_GAP, CHART_MARK_OPACITY_ACTIVE, CHART_MARK_OPACITY_MUTED, CHART_PALETTE_ORDER,
|
|
269
|
+
export { AGGREGATED_SLICE_KEY, AUTO_MARGIN_LEFT_STEP, AXIS_TITLE_BAND, AXIS_TITLE_GAP, BAR_GAP_COMFORTABLE, BAR_GAP_MEDIUM, BAR_GAP_TIGHT, BAR_RADIUS, BAR_RADIUS_NARROW, BAR_WIDTH_RATIO, CAPTION_CHAR_WIDTH_PX, CATEGORY_AXIS_LABEL_GAP, CATEGORY_AXIS_LABEL_HEIGHT, CHART_LEGEND_COLUMN_GAP, CHART_LEGEND_OVERFLOW_MAX_HEIGHT, CHART_LEGEND_SIDE_GAP, CHART_LEGEND_VERTICAL_GAP, CHART_MARK_OPACITY_ACTIVE, CHART_MARK_OPACITY_MUTED, CHART_PALETTE_ORDER, CHART_TOOLTIP_MAX_WIDTH, CHART_TOOLTIP_MIN_WIDTH, CHART_TOOLTIP_OFFSET, CHART_TRANSITION_MS, DEFAULT_CHART_MARGIN, DEFAULT_LINE_STROKE_WIDTH, DEFAULT_VALUE_TICK_COUNT, GRID_LINE_BLEED, GROUP_GAP_COMFORTABLE, GROUP_GAP_MEDIUM, GROUP_GAP_TIGHT, LINE_AREA_OPACITY, LINE_POINT_RADIUS, MAX_AUTO_MARGIN_LEFT, MAX_BAR_WIDTH, MAX_GAP_SHARE, MIN_AUTO_MARGIN_LEFT, MIN_BARS_FOR_TIGHT_SPACING, MIN_BAR_LENGTH, MIN_CATEGORY_LABEL_GAP, NARROW_BAR_WIDTH, PIE_CHART_MARGIN, PIE_CORNER_RADIUS, PIE_DONUT_INNER_RATIO, PIE_MAX_AUTO_INNER_RATIO, PIE_MAX_INSET_SHARE, PIE_MIN_SLICE_SHARE, PIE_PAD_ANGLE, PIE_TOOLTIP_ANCHOR_INSET, STACK_SEGMENT_GAP, VALUE_AXIS_LABEL_HEIGHT, VALUE_AXIS_TICK_GAP, WIDTH_FOR_MEDIUM_SPACING, WIDTH_FOR_TIGHT_SPACING };
|
|
@@ -9,10 +9,13 @@ import { ChartMarkState } from "./types";
|
|
|
9
9
|
* - **Series** — a legend key. Hovering (or focusing) a legend entry isolates
|
|
10
10
|
* that series.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* Plus one read-only source: inside a `DashboardProvider`, a chart that
|
|
13
|
+
* supplies {@link UseChartInteractionOptions.categoryKeys} follows the category
|
|
14
|
+
* hovered in a sibling chart, matched by raw label. Following emphasizes — it
|
|
15
|
+
* never opens the tooltip, which is what {@link ChartInteraction.hasLocalHover}
|
|
16
|
+
* distinguishes. The series axis deliberately does not sync: series keys are
|
|
17
|
+
* chart-local vocabulary, and isolating "Delivered" in a chart that happens to
|
|
18
|
+
* share the name would correlate nothing.
|
|
16
19
|
*
|
|
17
20
|
* Deliberately no click layer. Clicking used to pin the hover so it survived
|
|
18
21
|
* the pointer leaving, and it read as the chart getting stuck — the emphasis
|
|
@@ -23,6 +26,13 @@ interface UseChartInteractionOptions {
|
|
|
23
26
|
categoryCount: number;
|
|
24
27
|
/** Legend keys currently rendered. A key that disappears clears stale hover. */
|
|
25
28
|
seriesKeys?: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Raw category labels, index-aligned with {@link categoryCount}. Supplying
|
|
31
|
+
* them opts the chart into `DashboardProvider` crosshair sync; omit (as
|
|
32
|
+
* PieChart does) to stay out. Raw labels, never `labelFormatter` output —
|
|
33
|
+
* two charts formatting the same label differently must still match.
|
|
34
|
+
*/
|
|
35
|
+
categoryKeys?: string[];
|
|
26
36
|
/** Suppress all interaction — used while loading and when the tooltip is off. */
|
|
27
37
|
disabled?: boolean;
|
|
28
38
|
/**
|
|
@@ -43,11 +53,18 @@ interface MarkStateArgs {
|
|
|
43
53
|
seriesKey?: string;
|
|
44
54
|
}
|
|
45
55
|
export interface ChartInteraction {
|
|
46
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The active category — this chart's own hover, or failing that the category
|
|
58
|
+
* a `DashboardProvider` sibling is hovering, resolved to a local index.
|
|
59
|
+
*/
|
|
47
60
|
activeIndex: number | null;
|
|
61
|
+
/**
|
|
62
|
+
* True when {@link activeIndex} comes from this chart's own pointer rather
|
|
63
|
+
* than a synced sibling. Gates the tooltip: only the chart under the pointer
|
|
64
|
+
* opens one.
|
|
65
|
+
*/
|
|
66
|
+
hasLocalHover: boolean;
|
|
48
67
|
hoveredSeriesKey: string | null;
|
|
49
|
-
/** True while *either* axis is engaged; cancels the mark restore delay. */
|
|
50
|
-
isEngaged: boolean;
|
|
51
68
|
/**
|
|
52
69
|
* Emphasis for one mark, composed from both axes.
|
|
53
70
|
*
|
|
@@ -65,5 +82,5 @@ export interface ChartInteraction {
|
|
|
65
82
|
onSeriesEnter: (seriesKey: string) => void;
|
|
66
83
|
onSeriesLeave: () => void;
|
|
67
84
|
}
|
|
68
|
-
export declare function useChartInteraction({ categoryCount, seriesKeys, disabled, isLoading, }: UseChartInteractionOptions): ChartInteraction;
|
|
85
|
+
export declare function useChartInteraction({ categoryCount, seriesKeys, categoryKeys, disabled, isLoading, }: UseChartInteractionOptions): ChartInteraction;
|
|
69
86
|
export {};
|