@automattic/charts 0.56.4 → 0.56.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/CHANGELOG.md +16 -0
- package/dist/charts/bar-chart/index.cjs +6 -6
- package/dist/charts/bar-chart/index.css +1 -4
- package/dist/charts/bar-chart/index.css.map +1 -1
- package/dist/charts/bar-chart/index.d.cts +2 -8
- package/dist/charts/bar-chart/index.d.ts +2 -8
- package/dist/charts/bar-chart/index.js +5 -5
- package/dist/charts/bar-list-chart/index.cjs +7 -7
- package/dist/charts/bar-list-chart/index.css +1 -4
- package/dist/charts/bar-list-chart/index.css.map +1 -1
- package/dist/charts/bar-list-chart/index.d.cts +2 -2
- package/dist/charts/bar-list-chart/index.d.ts +2 -2
- package/dist/charts/bar-list-chart/index.js +6 -6
- package/dist/charts/conversion-funnel-chart/index.cjs +5 -5
- package/dist/charts/conversion-funnel-chart/index.css +1 -4
- package/dist/charts/conversion-funnel-chart/index.css.map +1 -1
- package/dist/charts/conversion-funnel-chart/index.d.cts +2 -1
- package/dist/charts/conversion-funnel-chart/index.d.ts +2 -1
- package/dist/charts/conversion-funnel-chart/index.js +4 -4
- package/dist/charts/geo-chart/index.cjs +4 -4
- package/dist/charts/geo-chart/index.css +1 -4
- package/dist/charts/geo-chart/index.css.map +1 -1
- package/dist/charts/geo-chart/index.d.cts +2 -1
- package/dist/charts/geo-chart/index.d.ts +2 -1
- package/dist/charts/geo-chart/index.js +3 -3
- package/dist/charts/leaderboard-chart/index.cjs +5 -5
- package/dist/charts/leaderboard-chart/index.css +1 -4
- package/dist/charts/leaderboard-chart/index.css.map +1 -1
- package/dist/charts/leaderboard-chart/index.d.cts +3 -2
- package/dist/charts/leaderboard-chart/index.d.ts +3 -2
- package/dist/charts/leaderboard-chart/index.js +4 -4
- package/dist/charts/line-chart/index.cjs +6 -6
- package/dist/charts/line-chart/index.css +1 -4
- package/dist/charts/line-chart/index.css.map +1 -1
- package/dist/charts/line-chart/index.d.cts +2 -8
- package/dist/charts/line-chart/index.d.ts +2 -8
- package/dist/charts/line-chart/index.js +5 -5
- package/dist/charts/pie-chart/index.cjs +6 -4
- package/dist/charts/pie-chart/index.cjs.map +1 -1
- package/dist/charts/pie-chart/index.css +13 -7
- package/dist/charts/pie-chart/index.css.map +1 -1
- package/dist/charts/pie-chart/index.d.cts +2 -1
- package/dist/charts/pie-chart/index.d.ts +2 -1
- package/dist/charts/pie-chart/index.js +5 -3
- package/dist/charts/pie-semi-circle-chart/index.cjs +6 -4
- package/dist/charts/pie-semi-circle-chart/index.cjs.map +1 -1
- package/dist/charts/pie-semi-circle-chart/index.css +12 -13
- package/dist/charts/pie-semi-circle-chart/index.css.map +1 -1
- package/dist/charts/pie-semi-circle-chart/index.d.cts +5 -2
- package/dist/charts/pie-semi-circle-chart/index.d.ts +5 -2
- package/dist/charts/pie-semi-circle-chart/index.js +5 -3
- package/dist/charts/sparkline/index.cjs +7 -7
- package/dist/charts/sparkline/index.css +1 -4
- package/dist/charts/sparkline/index.css.map +1 -1
- package/dist/charts/sparkline/index.js +6 -6
- package/dist/{chunk-ZXEFMKVP.cjs → chunk-3EXJP67N.cjs} +7 -7
- package/dist/{chunk-ZXEFMKVP.cjs.map → chunk-3EXJP67N.cjs.map} +1 -1
- package/dist/{chunk-HNEG3EFJ.cjs → chunk-55ZCOYDF.cjs} +117 -132
- package/dist/chunk-55ZCOYDF.cjs.map +1 -0
- package/dist/{chunk-KKPZ4MVF.js → chunk-7FDQGBY7.js} +145 -119
- package/dist/chunk-7FDQGBY7.js.map +1 -0
- package/dist/{chunk-7QDEU3KN.cjs → chunk-ASLARV7L.cjs} +6 -6
- package/dist/chunk-ASLARV7L.cjs.map +1 -0
- package/dist/chunk-BXFD7JIG.cjs +401 -0
- package/dist/chunk-BXFD7JIG.cjs.map +1 -0
- package/dist/{chunk-KMYJJTSR.cjs → chunk-CAFJRZPZ.cjs} +12 -12
- package/dist/{chunk-KMYJJTSR.cjs.map → chunk-CAFJRZPZ.cjs.map} +1 -1
- package/dist/{chunk-WMWAUOQ4.js → chunk-E62LCBGD.js} +4 -4
- package/dist/{chunk-ZY4FXLMM.js → chunk-GWBS65VC.js} +3 -3
- package/dist/{chunk-MEIVKY4K.js → chunk-IS5YYLTV.js} +18 -18
- package/dist/{chunk-MEIVKY4K.js.map → chunk-IS5YYLTV.js.map} +1 -1
- package/dist/{chunk-5N77S5N3.cjs → chunk-K6TGILHX.cjs} +8 -8
- package/dist/{chunk-5N77S5N3.cjs.map → chunk-K6TGILHX.cjs.map} +1 -1
- package/dist/{chunk-EBDUXL5K.js → chunk-KHQPN77E.js} +3 -3
- package/dist/{chunk-SEKPIG5K.js → chunk-KNIMXN6Z.js} +2 -2
- package/dist/{chunk-SEKPIG5K.js.map → chunk-KNIMXN6Z.js.map} +1 -1
- package/dist/{chunk-M7PRGJFE.js → chunk-MDRCAGKZ.js} +4 -4
- package/dist/{chunk-RSYD434G.cjs → chunk-NQJE2CC7.cjs} +120 -98
- package/dist/chunk-NQJE2CC7.cjs.map +1 -0
- package/dist/{chunk-66BXSWMW.cjs → chunk-O2JIANHK.cjs} +25 -25
- package/dist/chunk-O2JIANHK.cjs.map +1 -0
- package/dist/{chunk-R23BFDIW.js → chunk-OMS5QIJN.js} +6 -6
- package/dist/chunk-OMS5QIJN.js.map +1 -0
- package/dist/{chunk-TYIH5LMV.js → chunk-OP6PHB2U.js} +6 -6
- package/dist/chunk-OP6PHB2U.js.map +1 -0
- package/dist/{chunk-AWNCAKZY.js → chunk-RFSHE3HL.js} +60 -16
- package/dist/chunk-RFSHE3HL.js.map +1 -0
- package/dist/{chunk-FZYJM5PN.js → chunk-SSFFCBCF.js} +6 -6
- package/dist/chunk-SSFFCBCF.js.map +1 -0
- package/dist/{chunk-I5467ZJ5.cjs → chunk-SUDERBUA.cjs} +2 -2
- package/dist/{chunk-I5467ZJ5.cjs.map → chunk-SUDERBUA.cjs.map} +1 -1
- package/dist/{chunk-SH32YSZO.cjs → chunk-UFRBUT2D.cjs} +19 -19
- package/dist/{chunk-SH32YSZO.cjs.map → chunk-UFRBUT2D.cjs.map} +1 -1
- package/dist/{chunk-CMHPXSCI.js → chunk-VPAEBI2F.js} +109 -87
- package/dist/chunk-VPAEBI2F.js.map +1 -0
- package/dist/{chunk-CERFRCXD.cjs → chunk-X7JL2NYJ.cjs} +24 -24
- package/dist/chunk-X7JL2NYJ.cjs.map +1 -0
- package/dist/{chunk-PGJAZN2H.js → chunk-XD2HV7M5.js} +77 -92
- package/dist/chunk-XD2HV7M5.js.map +1 -0
- package/dist/{chunk-GBDFC74U.cjs → chunk-YAXY5L7I.cjs} +7 -7
- package/dist/{chunk-GBDFC74U.cjs.map → chunk-YAXY5L7I.cjs.map} +1 -1
- package/dist/{chunk-LSV7F26B.cjs → chunk-YDVHT7GS.cjs} +77 -33
- package/dist/chunk-YDVHT7GS.cjs.map +1 -0
- package/dist/components/legend/index.cjs +2 -2
- package/dist/components/legend/index.css +1 -4
- package/dist/components/legend/index.css.map +1 -1
- package/dist/components/legend/index.d.cts +2 -1
- package/dist/components/legend/index.d.ts +2 -1
- package/dist/components/legend/index.js +1 -1
- package/dist/components/tooltip/index.d.cts +2 -1
- package/dist/components/tooltip/index.d.ts +2 -1
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.css +1 -4
- package/dist/hooks/index.css.map +1 -1
- package/dist/hooks/index.d.cts +10 -7
- package/dist/hooks/index.d.ts +10 -7
- package/dist/hooks/index.js +3 -3
- package/dist/index.cjs +14 -14
- package/dist/index.css +24 -16
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -13
- package/dist/{leaderboard-chart-B5gWcqe7.d.ts → leaderboard-chart-BSgEw_Um.d.ts} +1 -1
- package/dist/{leaderboard-chart-C_6QDcqj.d.cts → leaderboard-chart-COtgamhe.d.cts} +1 -1
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.css +1 -4
- package/dist/providers/index.css.map +1 -1
- package/dist/providers/index.d.cts +3 -2
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +1 -1
- package/dist/{themes-BDVaIfBz.d.cts → themes-CVR5rmIs.d.cts} +1 -1
- package/dist/{themes-mcS8QNkQ.d.ts → themes-DQzmaSze.d.ts} +1 -1
- package/dist/{types-BCFQlzTM.d.cts → types-CzdN7rUe.d.cts} +12 -3
- package/dist/{types-BCFQlzTM.d.ts → types-CzdN7rUe.d.ts} +12 -3
- package/dist/utils/index.d.cts +2 -1
- package/dist/utils/index.d.ts +2 -1
- package/package.json +10 -10
- package/src/charts/bar-chart/bar-chart.tsx +2 -9
- package/src/charts/bar-chart/test/bar-chart.test.tsx +3 -3
- package/src/charts/line-chart/line-chart.tsx +2 -2
- package/src/charts/line-chart/test/line-chart.test.tsx +3 -3
- package/src/charts/line-chart/types.ts +0 -7
- package/src/charts/pie-chart/pie-chart.module.scss +14 -3
- package/src/charts/pie-chart/pie-chart.tsx +172 -148
- package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +17 -11
- package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +147 -119
- package/src/charts/pie-semi-circle-chart/test/pie-semi-circle-chart.test.tsx +46 -6
- package/src/charts/private/with-responsive/test/with-responsive.test.tsx +5 -5
- package/src/charts/private/with-responsive/with-responsive.tsx +8 -7
- package/src/hooks/index.ts +1 -1
- package/src/hooks/test/use-chart-margin.test.tsx +44 -0
- package/src/hooks/test/{use-element-height.test.tsx → use-element-size.test.tsx} +45 -36
- package/src/hooks/use-chart-margin.tsx +92 -6
- package/src/hooks/use-element-size.ts +43 -0
- package/src/hooks/use-tooltip-portal-relocator.module.scss +1 -4
- package/src/hooks/use-tooltip-portal-relocator.ts +11 -0
- package/src/types.ts +13 -3
- package/dist/chunk-4YYROZDJ.cjs +0 -375
- package/dist/chunk-4YYROZDJ.cjs.map +0 -1
- package/dist/chunk-66BXSWMW.cjs.map +0 -1
- package/dist/chunk-7QDEU3KN.cjs.map +0 -1
- package/dist/chunk-AWNCAKZY.js.map +0 -1
- package/dist/chunk-CERFRCXD.cjs.map +0 -1
- package/dist/chunk-CMHPXSCI.js.map +0 -1
- package/dist/chunk-FZYJM5PN.js.map +0 -1
- package/dist/chunk-HNEG3EFJ.cjs.map +0 -1
- package/dist/chunk-KKPZ4MVF.js.map +0 -1
- package/dist/chunk-LSV7F26B.cjs.map +0 -1
- package/dist/chunk-PGJAZN2H.js.map +0 -1
- package/dist/chunk-R23BFDIW.js.map +0 -1
- package/dist/chunk-RSYD434G.cjs.map +0 -1
- package/dist/chunk-TYIH5LMV.js.map +0 -1
- package/src/hooks/use-element-height.ts +0 -37
- /package/dist/{chunk-WMWAUOQ4.js.map → chunk-E62LCBGD.js.map} +0 -0
- /package/dist/{chunk-ZY4FXLMM.js.map → chunk-GWBS65VC.js.map} +0 -0
- /package/dist/{chunk-EBDUXL5K.js.map → chunk-KHQPN77E.js.map} +0 -0
- /package/dist/{chunk-M7PRGJFE.js.map → chunk-MDRCAGKZ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LeaderboardChart,
|
|
3
3
|
LeaderboardChartResponsive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XD2HV7M5.js";
|
|
5
5
|
import {
|
|
6
6
|
PieChart,
|
|
7
7
|
PieChartResponsive
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7FDQGBY7.js";
|
|
9
9
|
import "./chunk-NFRB2POF.js";
|
|
10
10
|
import {
|
|
11
11
|
PieSemiCircleChart,
|
|
12
12
|
PieSemiCircleChartResponsive
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VPAEBI2F.js";
|
|
14
14
|
import "./chunk-KXRWNFQJ.js";
|
|
15
15
|
import "./chunk-6CCZL2JJ.js";
|
|
16
16
|
import {
|
|
17
17
|
Sparkline,
|
|
18
18
|
SparklineUnresponsive
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E62LCBGD.js";
|
|
20
20
|
import {
|
|
21
21
|
LineChart,
|
|
22
22
|
LineChartResponsive
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OMS5QIJN.js";
|
|
24
24
|
import {
|
|
25
25
|
TrendIndicator
|
|
26
26
|
} from "./chunk-XWYZIFZW.js";
|
|
27
27
|
import {
|
|
28
28
|
BarListChart,
|
|
29
29
|
BarListChartResponsive
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MDRCAGKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
BarChart,
|
|
33
33
|
BarChartResponsive
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SSFFCBCF.js";
|
|
35
35
|
import {
|
|
36
36
|
BaseTooltip
|
|
37
37
|
} from "./chunk-BPYKWMI7.js";
|
|
38
38
|
import {
|
|
39
39
|
ConversionFunnelChartWithProvider
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-KHQPN77E.js";
|
|
41
|
+
import "./chunk-IS5YYLTV.js";
|
|
42
|
+
import "./chunk-KNIMXN6Z.js";
|
|
43
43
|
import {
|
|
44
44
|
GeoChartResponsive,
|
|
45
45
|
GeoChartWithProvider
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-GWBS65VC.js";
|
|
47
|
+
import "./chunk-OP6PHB2U.js";
|
|
48
48
|
import {
|
|
49
49
|
GlobalChartsContext,
|
|
50
50
|
GlobalChartsProvider,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
useChartLegendItems,
|
|
54
54
|
useGlobalChartsContext,
|
|
55
55
|
useGlobalChartsTheme
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-RFSHE3HL.js";
|
|
57
57
|
import "./chunk-TE63Y5PX.js";
|
|
58
58
|
import "./chunk-G3PMV62Z.js";
|
|
59
59
|
export {
|
|
@@ -3,7 +3,7 @@ import { R as ResponsiveConfig } from './with-responsive-CNfhzAUu.js';
|
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, FC } from 'react';
|
|
5
5
|
import { a as BaseLegendProps, B as BaseLegendItem } from './types-C05PdDJa.js';
|
|
6
|
-
import { B as BaseChartProps, L as LeaderboardEntry } from './types-
|
|
6
|
+
import { B as BaseChartProps, L as LeaderboardEntry } from './types-CzdN7rUe.js';
|
|
7
7
|
|
|
8
8
|
interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, 'className' | 'data' | 'showLegend' | 'legendOrientation' | 'legendPosition' | 'legendAlignment' | 'legendShape' | 'chartId' | 'width' | 'height' | 'size' | 'legendInteractive' | 'animation'> {
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@ import { R as ResponsiveConfig } from './with-responsive-CNfhzAUu.cjs';
|
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, FC } from 'react';
|
|
5
5
|
import { a as BaseLegendProps, B as BaseLegendItem } from './types-C05PdDJa.cjs';
|
|
6
|
-
import { B as BaseChartProps, L as LeaderboardEntry } from './types-
|
|
6
|
+
import { B as BaseChartProps, L as LeaderboardEntry } from './types-CzdN7rUe.cjs';
|
|
7
7
|
|
|
8
8
|
interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, 'className' | 'data' | 'showLegend' | 'legendOrientation' | 'legendPosition' | 'legendAlignment' | 'legendShape' | 'chartId' | 'width' | 'height' | 'size' | 'legendInteractive' | 'animation'> {
|
|
9
9
|
/**
|
package/dist/providers/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkYDVHT7GScjs = require('../chunk-YDVHT7GS.cjs');
|
|
10
10
|
require('../chunk-ZVGEDXDP.cjs');
|
|
11
11
|
require('../chunk-EMMSS5I5.cjs');
|
|
12
12
|
|
|
@@ -17,5 +17,5 @@ require('../chunk-EMMSS5I5.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.GlobalChartsContext =
|
|
20
|
+
exports.GlobalChartsContext = _chunkYDVHT7GScjs.GlobalChartsContext; exports.GlobalChartsProvider = _chunkYDVHT7GScjs.GlobalChartsProvider; exports.defaultTheme = _chunkYDVHT7GScjs.defaultTheme; exports.useChartId = _chunkYDVHT7GScjs.useChartId; exports.useChartRegistration = _chunkYDVHT7GScjs.useChartRegistration; exports.useGlobalChartsContext = _chunkYDVHT7GScjs.useGlobalChartsContext; exports.useGlobalChartsTheme = _chunkYDVHT7GScjs.useGlobalChartsTheme;
|
|
21
21
|
//# sourceMappingURL=index.cjs.map
|
package/dist/providers/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["esbuild-sass-plugin:css-chunk:src/hooks/use-tooltip-portal-relocator.module.scss","esbuild-sass-plugin:css-chunk:src/components/legend/private/base-legend.module.scss"],"sourcesContent":[".a8ccharts-jCw5dQ {\n position: fixed;\n
|
|
1
|
+
{"version":3,"sources":["esbuild-sass-plugin:css-chunk:src/hooks/use-tooltip-portal-relocator.module.scss","esbuild-sass-plugin:css-chunk:src/components/legend/private/base-legend.module.scss"],"sourcesContent":[".a8ccharts-jCw5dQ {\n position: fixed;\n inset: 0;\n overflow: visible;\n z-index: 1;\n pointer-events: none;\n}",".a8ccharts-AELBvX {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n}\n.a8ccharts-fX8uQe {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.a8ccharts-fX8uQe.a8ccharts-DEe0wg {\n align-items: flex-start;\n}\n.a8ccharts-fX8uQe.a8ccharts-WBKF9I {\n align-items: center;\n}\n.a8ccharts-fX8uQe.a8ccharts-JfwMng {\n align-items: flex-end;\n}\n.a8ccharts-8Y73Kh {\n position: relative;\n}\n.a8ccharts-8Y73Kh.a8ccharts-DEe0wg {\n justify-content: flex-start;\n}\n.a8ccharts-8Y73Kh.a8ccharts-WBKF9I {\n justify-content: center;\n}\n.a8ccharts-8Y73Kh.a8ccharts-JfwMng {\n justify-content: flex-end;\n}\n.a8ccharts-TVM-IY {\n position: relative;\n}\n.a8ccharts-TVM-IY.a8ccharts-DEe0wg {\n justify-content: flex-start;\n}\n.a8ccharts-TVM-IY.a8ccharts-WBKF9I {\n justify-content: center;\n}\n.a8ccharts-TVM-IY.a8ccharts-JfwMng {\n justify-content: flex-end;\n}\n\n.a8ccharts-Vflwq8 {\n display: flex;\n align-items: center;\n font-size: 0.875rem;\n}\n.a8ccharts-qGsavM {\n cursor: pointer;\n user-select: none;\n transition: opacity 0.2s ease;\n}\n.a8ccharts-qGsavM:hover {\n opacity: 0.8;\n}\n.a8ccharts-qGsavM:focus {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 4px;\n}\n.a8ccharts-qGsavM:focus:not(:focus-visible) {\n outline: none;\n}\n.a8ccharts-ZtDY-Q {\n opacity: 0.4;\n}\n.a8ccharts-ZtDY-Q .a8ccharts-2H65Kr {\n text-decoration: line-through;\n}\n\n.a8ccharts-2H65Kr {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n /* Text wrapping is handled at the text level, not the label container */\n}\n\n.a8ccharts-faSDBI {\n overflow-wrap: break-word;\n white-space: normal;\n hyphens: auto;\n}\n.a8ccharts-FISUIO {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1;\n min-width: 0;\n}\n\n.a8ccharts-DTZlT- {\n font-weight: 500;\n flex-shrink: 0;\n}"],"mappings":";AAAA,CAAC;AACC,YAAU;AACV,SAAO;AACP,YAAU;AACV,WAAS;AACT,kBAAgB;AAClB;;;ACNA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,aAAW;AACX,OAAK;AACP;AACA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AACA,CALC,gBAKgB,CAAC;AAChB,eAAa;AACf;AACA,CARC,gBAQgB,CAAC;AAChB,eAAa;AACf;AACA,CAXC,gBAWgB,CAAC;AAChB,eAAa;AACf;AACA,CAAC;AACC,YAAU;AACZ;AACA,CAHC,gBAGgB,CAZC;AAahB,mBAAiB;AACnB;AACA,CANC,gBAMgB,CAZC;AAahB,mBAAiB;AACnB;AACA,CATC,gBASgB,CAZC;AAahB,mBAAiB;AACnB;AACA,CAAC;AACC,YAAU;AACZ;AACA,CAHC,gBAGgB,CAxBC;AAyBhB,mBAAiB;AACnB;AACA,CANC,gBAMgB,CAxBC;AAyBhB,mBAAiB;AACnB;AACA,CATC,gBASgB,CAxBC;AAyBhB,mBAAiB;AACnB;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,aAAW;AACb;AACA,CAAC;AACC,UAAQ;AACR,eAAa;AACb,cAAY,QAAQ,KAAK;AAC3B;AACA,CALC,gBAKgB;AACf,WAAS;AACX;AACA,CARC,gBAQgB;AACf,WAAS,IAAI,MAAM;AACnB,kBAAgB;AAChB,iBAAe;AACjB;AACA,CAbC,gBAagB,MAAM,KAAK;AAC1B,WAAS;AACX;AACA,CAAC;AACC,WAAS;AACX;AACA,CAHC,iBAGiB,CAAC;AACjB,mBAAiB;AACnB;AAEA,CAJmB;AAKjB,WAAS;AACT,eAAa;AACb,OAAK;AAEP;AAEA,CAAC;AACC,iBAAe;AACf,eAAa;AACb,WAAS;AACX;AACA,CAAC;AACC,eAAa;AACb,YAAU;AACV,iBAAe;AACf,eAAa;AACb,aAAW;AACb;AAEA,CAAC;AACC,eAAa;AACb,eAAa;AACf;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as ChartRegistration, E as ElementStyles, c as GetElementStylesParams, G as GlobalChartsContext, e as GlobalChartsContextValue, a as GlobalChartsProvider, d as defaultTheme, u as useGlobalChartsContext, b as useGlobalChartsTheme } from '../themes-
|
|
1
|
+
export { C as ChartRegistration, E as ElementStyles, c as GetElementStylesParams, G as GlobalChartsContext, e as GlobalChartsContextValue, a as GlobalChartsProvider, d as defaultTheme, u as useGlobalChartsContext, b as useGlobalChartsTheme } from '../themes-CVR5rmIs.cjs';
|
|
2
2
|
import { B as BaseLegendItem } from '../types-C05PdDJa.cjs';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CzdN7rUe.cjs';
|
|
5
5
|
import '@visx/annotation/lib/components/CircleSubject';
|
|
6
6
|
import '@visx/annotation/lib/components/Connector';
|
|
7
7
|
import '@visx/annotation/lib/components/Label';
|
|
@@ -11,6 +11,7 @@ import '@visx/legend/lib/types';
|
|
|
11
11
|
import '@visx/scale';
|
|
12
12
|
import '@visx/text/lib/Text';
|
|
13
13
|
import '@visx/xychart';
|
|
14
|
+
import '@wordpress/theme';
|
|
14
15
|
import 'react-google-charts';
|
|
15
16
|
import '@visx/legend';
|
|
16
17
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as ChartRegistration, E as ElementStyles, c as GetElementStylesParams, G as GlobalChartsContext, e as GlobalChartsContextValue, a as GlobalChartsProvider, d as defaultTheme, u as useGlobalChartsContext, b as useGlobalChartsTheme } from '../themes-
|
|
1
|
+
export { C as ChartRegistration, E as ElementStyles, c as GetElementStylesParams, G as GlobalChartsContext, e as GlobalChartsContextValue, a as GlobalChartsProvider, d as defaultTheme, u as useGlobalChartsContext, b as useGlobalChartsTheme } from '../themes-DQzmaSze.js';
|
|
2
2
|
import { B as BaseLegendItem } from '../types-C05PdDJa.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CzdN7rUe.js';
|
|
5
5
|
import '@visx/annotation/lib/components/CircleSubject';
|
|
6
6
|
import '@visx/annotation/lib/components/Connector';
|
|
7
7
|
import '@visx/annotation/lib/components/Label';
|
|
@@ -11,6 +11,7 @@ import '@visx/legend/lib/types';
|
|
|
11
11
|
import '@visx/scale';
|
|
12
12
|
import '@visx/text/lib/Text';
|
|
13
13
|
import '@visx/xychart';
|
|
14
|
+
import '@wordpress/theme';
|
|
14
15
|
import 'react-google-charts';
|
|
15
16
|
import '@visx/legend';
|
|
16
17
|
|
package/dist/providers/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, FC } from 'react';
|
|
3
|
-
import { b as CompleteChartTheme, j as SeriesData, d as DataPointPercentage, C as ChartTheme } from './types-
|
|
3
|
+
import { b as CompleteChartTheme, j as SeriesData, d as DataPointPercentage, C as ChartTheme } from './types-CzdN7rUe.cjs';
|
|
4
4
|
import { B as BaseLegendItem } from './types-C05PdDJa.cjs';
|
|
5
5
|
import { LegendShape } from '@visx/legend/lib/types';
|
|
6
6
|
import { LineStyles, GlyphProps } from '@visx/xychart';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, FC } from 'react';
|
|
3
|
-
import { b as CompleteChartTheme, j as SeriesData, d as DataPointPercentage, C as ChartTheme } from './types-
|
|
3
|
+
import { b as CompleteChartTheme, j as SeriesData, d as DataPointPercentage, C as ChartTheme } from './types-CzdN7rUe.js';
|
|
4
4
|
import { B as BaseLegendItem } from './types-C05PdDJa.js';
|
|
5
5
|
import { LegendShape } from '@visx/legend/lib/types';
|
|
6
6
|
import { LineStyles, GlyphProps } from '@visx/xychart';
|
|
@@ -7,6 +7,7 @@ import { LegendShape } from '@visx/legend/lib/types';
|
|
|
7
7
|
import { ScaleType, ScaleInput } from '@visx/scale';
|
|
8
8
|
import { TextProps } from '@visx/text/lib/Text';
|
|
9
9
|
import { EventHandlerParams, LineStyles, GridStyles, GlyphProps } from '@visx/xychart';
|
|
10
|
+
import { GapSize } from '@wordpress/theme';
|
|
10
11
|
import { PointerEvent, ReactNode, CSSProperties } from 'react';
|
|
11
12
|
import { GoogleDataTableColumn, GoogleDataTableRow } from 'react-google-charts';
|
|
12
13
|
|
|
@@ -334,15 +335,17 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
|
|
|
334
335
|
*/
|
|
335
336
|
className?: string;
|
|
336
337
|
/**
|
|
337
|
-
* Width of the chart in pixels
|
|
338
|
+
* Width of the chart container in pixels. When omitted, the chart fills its parent's width.
|
|
338
339
|
*/
|
|
339
340
|
width?: number;
|
|
340
341
|
/**
|
|
341
|
-
* Height of the chart in pixels
|
|
342
|
+
* Height of the chart container in pixels. When omitted, the chart fills its parent's height.
|
|
342
343
|
*/
|
|
343
344
|
height?: number;
|
|
344
345
|
/**
|
|
345
|
-
*
|
|
346
|
+
* Maximum diameter of the pie in pixels (pie and donut charts only).
|
|
347
|
+
* The pie will shrink if the container is smaller than this value.
|
|
348
|
+
* When omitted, the pie fills the available space.
|
|
346
349
|
*/
|
|
347
350
|
size?: number;
|
|
348
351
|
/**
|
|
@@ -426,6 +429,12 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
|
|
|
426
429
|
* Whether to show chart animation on initial render or not
|
|
427
430
|
*/
|
|
428
431
|
animation?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Gap between chart elements (SVG, legend, children).
|
|
434
|
+
* Uses WordPress design system tokens.
|
|
435
|
+
* @default 'md'
|
|
436
|
+
*/
|
|
437
|
+
gap?: GapSize;
|
|
429
438
|
/**
|
|
430
439
|
* More options for the chart.
|
|
431
440
|
*/
|
|
@@ -7,6 +7,7 @@ import { LegendShape } from '@visx/legend/lib/types';
|
|
|
7
7
|
import { ScaleType, ScaleInput } from '@visx/scale';
|
|
8
8
|
import { TextProps } from '@visx/text/lib/Text';
|
|
9
9
|
import { EventHandlerParams, LineStyles, GridStyles, GlyphProps } from '@visx/xychart';
|
|
10
|
+
import { GapSize } from '@wordpress/theme';
|
|
10
11
|
import { PointerEvent, ReactNode, CSSProperties } from 'react';
|
|
11
12
|
import { GoogleDataTableColumn, GoogleDataTableRow } from 'react-google-charts';
|
|
12
13
|
|
|
@@ -334,15 +335,17 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
|
|
|
334
335
|
*/
|
|
335
336
|
className?: string;
|
|
336
337
|
/**
|
|
337
|
-
* Width of the chart in pixels
|
|
338
|
+
* Width of the chart container in pixels. When omitted, the chart fills its parent's width.
|
|
338
339
|
*/
|
|
339
340
|
width?: number;
|
|
340
341
|
/**
|
|
341
|
-
* Height of the chart in pixels
|
|
342
|
+
* Height of the chart container in pixels. When omitted, the chart fills its parent's height.
|
|
342
343
|
*/
|
|
343
344
|
height?: number;
|
|
344
345
|
/**
|
|
345
|
-
*
|
|
346
|
+
* Maximum diameter of the pie in pixels (pie and donut charts only).
|
|
347
|
+
* The pie will shrink if the container is smaller than this value.
|
|
348
|
+
* When omitted, the pie fills the available space.
|
|
346
349
|
*/
|
|
347
350
|
size?: number;
|
|
348
351
|
/**
|
|
@@ -426,6 +429,12 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
|
|
|
426
429
|
* Whether to show chart animation on initial render or not
|
|
427
430
|
*/
|
|
428
431
|
animation?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Gap between chart elements (SVG, legend, children).
|
|
434
|
+
* Uses WordPress design system tokens.
|
|
435
|
+
* @default 'md'
|
|
436
|
+
*/
|
|
437
|
+
gap?: GapSize;
|
|
429
438
|
/**
|
|
430
439
|
* More options for the chart.
|
|
431
440
|
*/
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { M as MetricValueType, f as formatMetricValue } from '../format-metric-value-MXm5DtQ_.cjs';
|
|
2
2
|
import { TickFormatter } from '@visx/axis';
|
|
3
3
|
import { AnyD3Scale, ScaleInput } from '@visx/scale';
|
|
4
|
-
import { j as SeriesData, C as ChartTheme, b as CompleteChartTheme } from '../types-
|
|
4
|
+
import { j as SeriesData, C as ChartTheme, b as CompleteChartTheme } from '../types-CzdN7rUe.cjs';
|
|
5
5
|
import { LegendShape } from '@visx/legend/lib/types';
|
|
6
6
|
import { LineStyles } from '@visx/xychart';
|
|
7
7
|
import '@visx/annotation/lib/components/CircleSubject';
|
|
@@ -9,6 +9,7 @@ import '@visx/annotation/lib/components/Connector';
|
|
|
9
9
|
import '@visx/annotation/lib/components/Label';
|
|
10
10
|
import '@visx/annotation/lib/components/LineSubject';
|
|
11
11
|
import '@visx/text/lib/Text';
|
|
12
|
+
import '@wordpress/theme';
|
|
12
13
|
import 'react';
|
|
13
14
|
import 'react-google-charts';
|
|
14
15
|
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { M as MetricValueType, f as formatMetricValue } from '../format-metric-value-MXm5DtQ_.js';
|
|
2
2
|
import { TickFormatter } from '@visx/axis';
|
|
3
3
|
import { AnyD3Scale, ScaleInput } from '@visx/scale';
|
|
4
|
-
import { j as SeriesData, C as ChartTheme, b as CompleteChartTheme } from '../types-
|
|
4
|
+
import { j as SeriesData, C as ChartTheme, b as CompleteChartTheme } from '../types-CzdN7rUe.js';
|
|
5
5
|
import { LegendShape } from '@visx/legend/lib/types';
|
|
6
6
|
import { LineStyles } from '@visx/xychart';
|
|
7
7
|
import '@visx/annotation/lib/components/CircleSubject';
|
|
@@ -9,6 +9,7 @@ import '@visx/annotation/lib/components/Connector';
|
|
|
9
9
|
import '@visx/annotation/lib/components/Label';
|
|
10
10
|
import '@visx/annotation/lib/components/LineSubject';
|
|
11
11
|
import '@visx/text/lib/Text';
|
|
12
|
+
import '@wordpress/theme';
|
|
12
13
|
import 'react';
|
|
13
14
|
import 'react-google-charts';
|
|
14
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/charts",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.6",
|
|
4
4
|
"description": "Display charts within Automattic products.",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/charts/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"typecheck": "tsc --noEmit"
|
|
181
181
|
},
|
|
182
182
|
"dependencies": {
|
|
183
|
-
"@automattic/number-formatters": "^1.0
|
|
183
|
+
"@automattic/number-formatters": "^1.1.0",
|
|
184
184
|
"@babel/runtime": "7.28.6",
|
|
185
185
|
"@react-spring/web": "9.7.5",
|
|
186
186
|
"@visx/annotation": "^3.12.0",
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
"@visx/vendor": "^3.12.0",
|
|
201
201
|
"@visx/xychart": "^3.12.0",
|
|
202
202
|
"@wordpress/i18n": "^6.0.0",
|
|
203
|
-
"@wordpress/theme": "0.
|
|
204
|
-
"@wordpress/ui": "0.
|
|
203
|
+
"@wordpress/theme": "0.7.0",
|
|
204
|
+
"@wordpress/ui": "0.7.0",
|
|
205
205
|
"clsx": "2.1.1",
|
|
206
206
|
"date-fns": "^4.1.0",
|
|
207
207
|
"deepmerge": "4.3.1",
|
|
@@ -215,18 +215,18 @@
|
|
|
215
215
|
"@babel/core": "7.29.0",
|
|
216
216
|
"@babel/preset-react": "7.28.5",
|
|
217
217
|
"@babel/preset-typescript": "7.28.5",
|
|
218
|
-
"@storybook/addon-docs": "10.2.
|
|
219
|
-
"@storybook/react": "10.2.
|
|
218
|
+
"@storybook/addon-docs": "10.2.11",
|
|
219
|
+
"@storybook/react": "10.2.11",
|
|
220
220
|
"@testing-library/dom": "^10.0.0",
|
|
221
221
|
"@testing-library/jest-dom": "^6.0.0",
|
|
222
222
|
"@testing-library/react": "^16.0.0",
|
|
223
223
|
"@testing-library/user-event": "^14.4.3",
|
|
224
224
|
"@types/jest": "^30.0.0",
|
|
225
|
-
"@types/react": "18.3.
|
|
225
|
+
"@types/react": "18.3.28",
|
|
226
226
|
"@types/react-dom": "18.3.7",
|
|
227
227
|
"@visx/glyph": "3.12.0",
|
|
228
|
-
"@wordpress/components": "32.
|
|
229
|
-
"@wordpress/element": "6.
|
|
228
|
+
"@wordpress/components": "32.2.0",
|
|
229
|
+
"@wordpress/element": "6.40.0",
|
|
230
230
|
"babel-jest": "30.2.0",
|
|
231
231
|
"babel-plugin-react-remove-properties": "^0.3.1",
|
|
232
232
|
"esbuild": "0.25.9",
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"react": "18.3.1",
|
|
240
240
|
"react-dom": "18.3.1",
|
|
241
241
|
"sass-embedded": "1.97.2",
|
|
242
|
-
"storybook": "10.2.
|
|
242
|
+
"storybook": "10.2.11",
|
|
243
243
|
"tsup": "8.5.1",
|
|
244
244
|
"typescript": "5.9.3"
|
|
245
245
|
},
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useChartDataTransform,
|
|
13
13
|
useZeroValueDisplay,
|
|
14
14
|
useChartMargin,
|
|
15
|
-
|
|
15
|
+
useElementSize,
|
|
16
16
|
useHasLegendChild,
|
|
17
17
|
usePrefersReducedMotion,
|
|
18
18
|
} from '../../hooks';
|
|
@@ -32,7 +32,6 @@ import { useBarChartOptions } from './private';
|
|
|
32
32
|
import type { BaseChartProps, DataPointDate, SeriesData, Optional } from '../../types';
|
|
33
33
|
import type { ResponsiveConfig } from '../private/with-responsive';
|
|
34
34
|
import type { RenderTooltipParams } from '@visx/xychart/lib/components/Tooltip';
|
|
35
|
-
import type { GapSize } from '@wordpress/theme';
|
|
36
35
|
import type { FC, ReactNode, ComponentType } from 'react';
|
|
37
36
|
|
|
38
37
|
export interface BarChartProps extends BaseChartProps< SeriesData[] > {
|
|
@@ -42,12 +41,6 @@ export interface BarChartProps extends BaseChartProps< SeriesData[] > {
|
|
|
42
41
|
showZeroValues?: boolean;
|
|
43
42
|
legendInteractive?: boolean;
|
|
44
43
|
children?: ReactNode;
|
|
45
|
-
/**
|
|
46
|
-
* Gap between chart elements (SVG, legend, children).
|
|
47
|
-
* Uses WordPress design system tokens.
|
|
48
|
-
* @default 'md'
|
|
49
|
-
*/
|
|
50
|
-
gap?: GapSize;
|
|
51
44
|
}
|
|
52
45
|
|
|
53
46
|
// Base props type with optional responsive properties
|
|
@@ -125,7 +118,7 @@ const BarChartInternal: FC< BarChartProps > = ( {
|
|
|
125
118
|
const legendItems = useChartLegendItems( dataSorted );
|
|
126
119
|
const chartOptions = useBarChartOptions( dataWithVisibleZeros, horizontal, options );
|
|
127
120
|
const defaultMargin = useChartMargin( height, chartOptions, dataSorted, theme, horizontal );
|
|
128
|
-
const [ svgWrapperRef, svgWrapperHeight ] =
|
|
121
|
+
const [ svgWrapperRef, , svgWrapperHeight ] = useElementSize< HTMLDivElement >();
|
|
129
122
|
const chartRef = useRef< HTMLDivElement >( null );
|
|
130
123
|
|
|
131
124
|
// Check if children contain a Legend component (composition pattern)
|
|
@@ -3,10 +3,10 @@ import userEvent from '@testing-library/user-event';
|
|
|
3
3
|
import { GlobalChartsProvider } from '../../../providers';
|
|
4
4
|
import BarChart from '../bar-chart';
|
|
5
5
|
|
|
6
|
-
// Mock
|
|
6
|
+
// Mock useElementSize to return non-zero dimensions in jsdom so charts render
|
|
7
7
|
const mockRefCallback = jest.fn();
|
|
8
|
-
jest.mock( '../../../hooks/use-element-
|
|
9
|
-
|
|
8
|
+
jest.mock( '../../../hooks/use-element-size', () => ( {
|
|
9
|
+
useElementSize: () => [ mockRefCallback, 500, 300 ],
|
|
10
10
|
} ) );
|
|
11
11
|
|
|
12
12
|
describe( 'BarChart', () => {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useXYChartTheme,
|
|
15
15
|
useChartDataTransform,
|
|
16
16
|
useChartMargin,
|
|
17
|
-
|
|
17
|
+
useElementSize,
|
|
18
18
|
useHasLegendChild,
|
|
19
19
|
usePrefersReducedMotion,
|
|
20
20
|
} from '../../hooks';
|
|
@@ -288,7 +288,7 @@ const LineChartInternal = forwardRef< SingleChartRef, LineChartProps >(
|
|
|
288
288
|
const providerTheme = useGlobalChartsTheme();
|
|
289
289
|
const theme = useXYChartTheme( data );
|
|
290
290
|
const chartId = useChartId( providedChartId );
|
|
291
|
-
const [ svgWrapperRef, svgWrapperHeight ] =
|
|
291
|
+
const [ svgWrapperRef, , svgWrapperHeight ] = useElementSize< HTMLDivElement >();
|
|
292
292
|
const chartRef = useRef< HTMLDivElement >( null );
|
|
293
293
|
const [ selectedIndex, setSelectedIndex ] = useState< number | undefined >( undefined );
|
|
294
294
|
const [ isNavigating, setIsNavigating ] = useState( false );
|
|
@@ -8,10 +8,10 @@ import { GlobalChartsProvider, defaultTheme } from '../../../providers';
|
|
|
8
8
|
import LineChart, { LineChartUnresponsive } from '../line-chart';
|
|
9
9
|
import type { SingleChartRef } from '../../private/single-chart-context';
|
|
10
10
|
|
|
11
|
-
// Mock
|
|
11
|
+
// Mock useElementSize to return non-zero dimensions in jsdom so charts render
|
|
12
12
|
const mockRefCallback = jest.fn();
|
|
13
|
-
jest.mock( '../../../hooks/use-element-
|
|
14
|
-
|
|
13
|
+
jest.mock( '../../../hooks/use-element-size', () => ( {
|
|
14
|
+
useElementSize: () => [ mockRefCallback, 500, 300 ],
|
|
15
15
|
} ) );
|
|
16
16
|
|
|
17
17
|
const customTheme = {
|
|
@@ -7,7 +7,6 @@ import type {
|
|
|
7
7
|
} from '../../types';
|
|
8
8
|
import type { GlyphProps } from '@visx/xychart';
|
|
9
9
|
import type { RenderTooltipParams } from '@visx/xychart/lib/components/Tooltip';
|
|
10
|
-
import type { GapSize } from '@wordpress/theme';
|
|
11
10
|
import type { ReactNode, SVGProps, FC } from 'react';
|
|
12
11
|
|
|
13
12
|
export type LineChartAnnotationProps = {
|
|
@@ -44,12 +43,6 @@ export interface LineChartProps extends BaseChartProps< SeriesData[] > {
|
|
|
44
43
|
};
|
|
45
44
|
legendInteractive?: boolean;
|
|
46
45
|
children?: ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* Gap between chart elements (SVG, legend, children).
|
|
49
|
-
* Uses WordPress design system tokens.
|
|
50
|
-
* @default 'md'
|
|
51
|
-
*/
|
|
52
|
-
gap?: GapSize;
|
|
53
46
|
}
|
|
54
47
|
|
|
55
48
|
export type TooltipDatum = {
|
|
@@ -3,9 +3,20 @@
|
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
align-items: center;
|
|
6
|
-
gap: 20px;
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// Fill parent when no explicit width/height provided
|
|
8
|
+
&--responsive {
|
|
9
|
+
height: 100%;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__svg-wrapper {
|
|
14
|
+
flex: 1;
|
|
15
|
+
min-height: 0; // Required for flex shrinking
|
|
16
|
+
min-width: 0; // Required for flex shrinking
|
|
17
|
+
width: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
10
21
|
}
|
|
11
22
|
}
|