@react-magma/charts 16.0.0-v6-next.4 → 16.0.0-v6-next.6
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/charts.js +2 -1
- package/dist/charts.js.map +1 -1
- package/dist/charts.modern.module.js +2 -1
- package/dist/charts.modern.module.js.map +1 -1
- package/dist/charts.umd.js +116 -48
- package/dist/charts.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CarbonChart/CarbonChart.test.js +6 -2
- package/src/components/ChartTable/ChartMoreOptionsButton.tsx +10 -7
- package/src/components/ChartTable/ChartTable.test.js +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/charts",
|
|
3
|
-
"version": "16.0.0-v6-next.
|
|
3
|
+
"version": "16.0.0-v6-next.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"identity-obj-proxy": "^3.0.0",
|
|
48
48
|
"react": "^17.0.2",
|
|
49
49
|
"react-dom": "^17.0.2",
|
|
50
|
-
"react-magma-dom": "^6.1.0-v6-next.
|
|
50
|
+
"react-magma-dom": "^6.1.0-v6-next.21",
|
|
51
51
|
"react-magma-icons": "^3.3.1",
|
|
52
52
|
"rollup": "^4.52.4",
|
|
53
53
|
"rollup-plugin-postcss": "^4.0.2"
|
|
@@ -1161,7 +1161,9 @@ describe('CarbonChart', () => {
|
|
|
1161
1161
|
|
|
1162
1162
|
expect(wrapper).not.toHaveClass('has-magma-toolbar');
|
|
1163
1163
|
|
|
1164
|
-
|
|
1164
|
+
act(() => {
|
|
1165
|
+
jest.runOnlyPendingTimers();
|
|
1166
|
+
});
|
|
1165
1167
|
expect(wrapper).toHaveClass('has-magma-toolbar');
|
|
1166
1168
|
} finally {
|
|
1167
1169
|
jest.useRealTimers();
|
|
@@ -1188,7 +1190,9 @@ describe('CarbonChart', () => {
|
|
|
1188
1190
|
expect(exportToJPG).toHaveBeenCalledTimes(1);
|
|
1189
1191
|
expect(wrapper).not.toHaveClass('has-magma-toolbar');
|
|
1190
1192
|
|
|
1191
|
-
|
|
1193
|
+
act(() => {
|
|
1194
|
+
jest.runOnlyPendingTimers();
|
|
1195
|
+
});
|
|
1192
1196
|
expect(wrapper).toHaveClass('has-magma-toolbar');
|
|
1193
1197
|
} finally {
|
|
1194
1198
|
jest.useRealTimers();
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Dropdown,
|
|
7
7
|
DropdownButton,
|
|
8
8
|
DropdownContent,
|
|
9
|
+
Tooltip,
|
|
9
10
|
} from 'react-magma-dom';
|
|
10
11
|
|
|
11
12
|
import { useChartToolbarI18n } from './chartToolbarI18n';
|
|
@@ -37,13 +38,15 @@ export function ChartMoreOptionsButton({
|
|
|
37
38
|
const resolvedAriaLabel = ariaLabel ?? t.moreOptionsAriaLabel;
|
|
38
39
|
return (
|
|
39
40
|
<Dropdown isInverse={isInverse}>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
<Tooltip content={resolvedAriaLabel} isInverse={isInverse}>
|
|
42
|
+
<DropdownButton
|
|
43
|
+
aria-label={resolvedAriaLabel}
|
|
44
|
+
color={ButtonColor.subtle}
|
|
45
|
+
icon={icon}
|
|
46
|
+
variant={ButtonVariant.link}
|
|
47
|
+
testId="chart-more-options-button"
|
|
48
|
+
/>
|
|
49
|
+
</Tooltip>
|
|
47
50
|
<DropdownContent>{children}</DropdownContent>
|
|
48
51
|
</Dropdown>
|
|
49
52
|
);
|
|
@@ -364,7 +364,7 @@ describe('ChartFullscreenButton', () => {
|
|
|
364
364
|
// ChartMoreOptionsButton
|
|
365
365
|
// ---------------------------------------------------------------------------
|
|
366
366
|
describe('ChartMoreOptionsButton', () => {
|
|
367
|
-
it('renders with default "More options" label', () => {
|
|
367
|
+
it('renders with default "More options" label and tooltip', async () => {
|
|
368
368
|
render(
|
|
369
369
|
<ChartMoreOptionsButton icon={<MoreVertIcon />}>
|
|
370
370
|
<DropdownMenuItem>Download</DropdownMenuItem>
|
|
@@ -374,6 +374,11 @@ describe('ChartMoreOptionsButton', () => {
|
|
|
374
374
|
expect(
|
|
375
375
|
screen.getByRole('button', { name: 'More options' })
|
|
376
376
|
).toHaveAttribute('color', 'subtle');
|
|
377
|
+
|
|
378
|
+
fireEvent.mouseEnter(screen.getByRole('button', { name: 'More options' }));
|
|
379
|
+
await waitFor(() => {
|
|
380
|
+
expect(screen.getByText('More options')).toBeInTheDocument();
|
|
381
|
+
});
|
|
377
382
|
});
|
|
378
383
|
|
|
379
384
|
it('renders with custom aria-label', () => {
|