@automattic/charts 1.10.2 → 1.11.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.
- package/CHANGELOG.md +16 -0
- package/TOKENS.md +72 -0
- package/dist/index.cjs +149 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +60 -47
- package/dist/index.d.cts +17 -7
- package/dist/index.d.ts +17 -7
- package/dist/index.js +150 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +7 -7
- package/src/charts/heatmap-chart/heatmap-chart.module.scss +18 -13
- package/src/charts/heatmap-chart/heatmap-chart.tsx +11 -7
- package/src/charts/heatmap-chart/private/heatmap-legend.tsx +3 -3
- package/src/charts/heatmap-chart/test/heatmap-chart.test.tsx +13 -7
- package/src/charts/leaderboard-chart/hooks/index.ts +1 -0
- package/src/charts/leaderboard-chart/hooks/use-fitted-row-count.ts +115 -0
- package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +47 -20
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +72 -16
- package/src/charts/leaderboard-chart/test/leaderboard-chart-fit-rows.test.tsx +365 -0
- package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +73 -2
- package/src/charts/leaderboard-chart/types.ts +12 -0
- package/src/charts/line-chart/line-chart.module.scss +2 -2
- package/src/charts/private/grid-control/grid-control.module.scss +1 -1
- package/src/charts/private/svg-empty-state/svg-empty-state.module.scss +1 -1
- package/src/charts/private/x-zoom.module.scss +12 -10
- package/src/components/tooltip/base-tooltip.module.scss +3 -2
- package/src/components/trend-indicator/trend-indicator.module.scss +6 -5
- package/src/providers/chart-context/themes.ts +33 -19
- package/src/types.ts +2 -2
package/dist/index.css
CHANGED
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
}
|
|
55
55
|
.a8ccharts--zY0xG-tooltip {
|
|
56
56
|
padding: var(--wpds-dimension-padding-sm, 8px);
|
|
57
|
+
background-color: var(--a8c-charts-color-tooltip-surface, #000000d9);
|
|
57
58
|
color: #fff;
|
|
58
59
|
border-radius: var(--wpds-border-radius-md, 4px);
|
|
59
60
|
font-size: var(--wpds-typography-font-size-md, 13px);
|
|
60
61
|
box-shadow: var(--wpds-elevation-sm, 0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005);
|
|
61
62
|
pointer-events: none;
|
|
62
|
-
background-color: #000000d9;
|
|
63
63
|
position: absolute;
|
|
64
64
|
transform: translate(-50%, -100%);
|
|
65
65
|
}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
.a8ccharts-udGPVq-svg-empty-state {
|
|
80
80
|
text-align: center;
|
|
81
81
|
font-size: var(--wpds-typography-font-size-md, 13px);
|
|
82
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
82
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
83
83
|
}
|
|
84
84
|
.a8ccharts-sP1gHa-container {
|
|
85
85
|
width: 100%;
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
min-height: 0;
|
|
101
101
|
}
|
|
102
102
|
.a8ccharts-y6bXNq-x-zoom__selection {
|
|
103
|
-
fill:
|
|
104
|
-
stroke:
|
|
103
|
+
fill: #3858e929;
|
|
104
|
+
stroke: #3858e9a6;
|
|
105
105
|
stroke-width: var(--wpds-border-width-xs, 1px);
|
|
106
106
|
pointer-events: none;
|
|
107
107
|
}
|
|
@@ -110,14 +110,14 @@
|
|
|
110
110
|
top: var(--wpds-dimension-gap-sm, 8px);
|
|
111
111
|
right: var(--wpds-dimension-gap-sm, 8px);
|
|
112
112
|
z-index: 2;
|
|
113
|
-
background: var(--charts-zoom-reset-bg, #ffffffeb);
|
|
114
113
|
width: 28px;
|
|
115
114
|
height: 28px;
|
|
116
|
-
color: var(--
|
|
117
|
-
border: var(--wpds-border-width-xs, 1px) solid
|
|
115
|
+
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
116
|
+
border: var(--wpds-border-width-xs, 1px) solid #00000029;
|
|
118
117
|
border-radius: var(--wpds-border-radius-md, 4px);
|
|
119
118
|
cursor: pointer;
|
|
120
119
|
box-shadow: var(--wpds-elevation-xs, 0 1px 1px 0 #00000008, 0 1px 2px 0 #00000005, 0 3px 3px 0 #00000005, 0 4px 4px 0 #00000003);
|
|
120
|
+
background: #ffffffeb;
|
|
121
121
|
justify-content: center;
|
|
122
122
|
align-items: center;
|
|
123
123
|
padding: 0;
|
|
@@ -126,11 +126,11 @@
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.a8ccharts-y6bXNq-x-zoom__reset:hover {
|
|
129
|
-
background:
|
|
129
|
+
background: #fff;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.a8ccharts-y6bXNq-x-zoom__reset:focus-visible {
|
|
133
|
-
outline: 2px solid var(--charts-
|
|
133
|
+
outline: 2px solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, #3858e9));
|
|
134
134
|
outline-offset: 1px;
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.a8ccharts-inuQka-line-chart__tooltip, .a8ccharts-inuQka-line-chart__annotation-label-popover {
|
|
157
|
-
background: var(--wpds-color-background-surface-neutral-strong, #fff);
|
|
158
|
-
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
157
|
+
background: var(--a8c-charts-color-background, var(--wpds-color-background-surface-neutral-strong, #fff));
|
|
158
|
+
color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
159
159
|
padding: var(--wpds-dimension-padding-sm, 8px);
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
.a8ccharts-mGEVca-main-rate {
|
|
303
|
-
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
303
|
+
color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
304
304
|
text-overflow: ellipsis;
|
|
305
305
|
font-size: var(--wpds-typography-font-size-xl, 18px);
|
|
306
306
|
font-style: normal;
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
.a8ccharts-mGEVca-step-label {
|
|
344
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
344
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
345
345
|
font-size: var(--wpds-typography-font-size-sm, 12px);
|
|
346
346
|
font-weight: var(--wpds-typography-font-weight-regular, 400);
|
|
347
347
|
line-height: var(--wpds-typography-line-height-xs, 16px);
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
.a8ccharts-mGEVca-step-rate {
|
|
354
|
-
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
354
|
+
color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
355
355
|
font-size: var(--wpds-typography-font-size-md, 13px);
|
|
356
356
|
font-weight: var(--wpds-typography-font-weight-medium, 499);
|
|
357
357
|
line-height: var(--wpds-typography-line-height-xs, 16px);
|
|
@@ -384,14 +384,14 @@
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
.a8ccharts-mGEVca-tooltip-wrapper {
|
|
387
|
-
background: var(--wpds-color-background-surface-neutral-strong, #fff);
|
|
387
|
+
background: var(--a8c-charts-color-background, var(--wpds-color-background-surface-neutral-strong, #fff));
|
|
388
388
|
border-radius: var(--wpds-border-radius-md, 4px) !important;
|
|
389
389
|
padding: var(--wpds-dimension-padding-md, 12px) !important;
|
|
390
390
|
box-shadow: var(--wpds-elevation-sm, 0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005) !important;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
.a8ccharts-mGEVca-tooltip-title {
|
|
394
|
-
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
394
|
+
color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
395
395
|
font-size: var(--wpds-typography-font-size-sm, 12px);
|
|
396
396
|
font-style: normal;
|
|
397
397
|
font-weight: var(--wpds-typography-font-weight-regular, 400);
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
.a8ccharts-mGEVca-tooltip-content {
|
|
402
|
-
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
402
|
+
color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
403
403
|
font-size: var(--wpds-typography-font-size-md, 13px);
|
|
404
404
|
font-style: normal;
|
|
405
405
|
font-weight: var(--wpds-typography-font-weight-medium, 499);
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
|
|
409
409
|
.a8ccharts-mGEVca-empty-state {
|
|
410
410
|
text-align: center;
|
|
411
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
411
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
412
412
|
font-size: var(--wpds-typography-font-size-lg, 16px);
|
|
413
413
|
}
|
|
414
414
|
.a8ccharts-8hS2IW-container {
|
|
@@ -427,11 +427,11 @@
|
|
|
427
427
|
|
|
428
428
|
.a8ccharts-O3YMOW-heatmap-chart__empty {
|
|
429
429
|
padding: var(--wpds-dimension-padding-lg, 16px);
|
|
430
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
430
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
.a8ccharts-O3YMOW-heatmap-chart__grid {
|
|
434
|
-
gap: var(--heatmap-cell-gap, var(--wpds-dimension-gap-xs, 4px));
|
|
434
|
+
gap: var(--a8c-charts-dimension-heatmap-cell-gap, var(--wpds-dimension-gap-xs, 4px));
|
|
435
435
|
flex: 1 1 0;
|
|
436
436
|
width: 100%;
|
|
437
437
|
min-height: 0;
|
|
@@ -439,7 +439,7 @@
|
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
.a8ccharts-O3YMOW-heatmap-chart__grid:focus-visible {
|
|
442
|
-
outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
|
|
442
|
+
outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
443
443
|
outline-offset: 2px;
|
|
444
444
|
border-radius: var(--wpds-border-radius-sm, 2px);
|
|
445
445
|
}
|
|
@@ -462,7 +462,7 @@
|
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
.a8ccharts-O3YMOW-heatmap-chart__col-label, .a8ccharts-O3YMOW-heatmap-chart__row-label {
|
|
465
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
465
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
466
466
|
font-size: var(--wpds-typography-font-size-xs, 11px);
|
|
467
467
|
white-space: nowrap;
|
|
468
468
|
overflow: visible;
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
|
|
482
482
|
.a8ccharts-O3YMOW-heatmap-chart__cell {
|
|
483
483
|
border-radius: var(--wpds-border-radius-sm, 2px);
|
|
484
|
-
background: var(--wpds-color-background-track-neutral-weak, #f0f0f0);
|
|
484
|
+
background: var(--a8c-charts-color-track, var(--wpds-color-background-track-neutral-weak, #f0f0f0));
|
|
485
485
|
justify-content: center;
|
|
486
486
|
align-items: center;
|
|
487
487
|
min-width: 0;
|
|
@@ -495,28 +495,28 @@
|
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
.a8ccharts-O3YMOW-heatmap-chart__cell--filled {
|
|
498
|
-
background: color-mix(in sRGB, var(--heatmap-primary) calc((.15 + .85 * var(--intensity)) * 100%), var(--heatmap-
|
|
498
|
+
background: color-mix(in sRGB, var(--a8c-charts-color-heatmap-primary) calc((.15 + .85 * var(--a8c-charts-heatmap-cell-intensity)) * 100%), var(--a8c-charts-color-heatmap-background, #fff));
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
.a8ccharts-O3YMOW-heatmap-chart__cell--selected {
|
|
502
|
-
outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
|
|
502
|
+
outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
503
503
|
outline-offset: calc(-1 * var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)));
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
.a8ccharts-O3YMOW-heatmap-chart__cell-value {
|
|
507
|
-
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
507
|
+
color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
508
508
|
font-size: var(--wpds-typography-font-size-md, 13px);
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
.a8ccharts-O3YMOW-heatmap-chart__cell--strong .a8ccharts-O3YMOW-heatmap-chart__cell-value {
|
|
512
|
-
color: var(--wpds-color-foreground-interactive-neutral-strong, #f0f0f0);
|
|
512
|
+
color: var(--a8c-charts-color-label-inverse, var(--wpds-color-foreground-interactive-neutral-strong, #f0f0f0));
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
.a8ccharts-O3YMOW-heatmap-chart__legend-swatch {
|
|
516
516
|
width: var(--wpds-dimension-size-3xs, 12px);
|
|
517
517
|
height: var(--wpds-dimension-size-3xs, 12px);
|
|
518
518
|
border-radius: var(--wpds-border-radius-sm, 2px);
|
|
519
|
-
background: color-mix(in sRGB, var(--heatmap-primary) calc((.15 + .85 * var(--intensity)) * 100%), var(--heatmap-
|
|
519
|
+
background: color-mix(in sRGB, var(--a8c-charts-color-heatmap-primary) calc((.15 + .85 * var(--a8c-charts-heatmap-cell-intensity)) * 100%), var(--a8c-charts-color-heatmap-background, #fff));
|
|
520
520
|
}
|
|
521
521
|
.a8ccharts-GovfoW-leaderboardChart {
|
|
522
522
|
transition: opacity var(--wpds-motion-duration-lg, .3s) var(--wpds-motion-easing-subtle, cubic-bezier(.15, 0, .15, 1));
|
|
@@ -537,6 +537,11 @@
|
|
|
537
537
|
overflow: auto;
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
+
.a8ccharts-GovfoW-leaderboardChart__content--fit {
|
|
541
|
+
position: relative;
|
|
542
|
+
overflow: hidden;
|
|
543
|
+
}
|
|
544
|
+
|
|
540
545
|
.a8ccharts-GovfoW-barWithLabelContainer {
|
|
541
546
|
isolation: isolate;
|
|
542
547
|
grid-template-columns: 1fr;
|
|
@@ -562,7 +567,7 @@
|
|
|
562
567
|
height: 100%;
|
|
563
568
|
min-height: 6px;
|
|
564
569
|
min-width: var(--wpds-dimension-size-5xs, 4px);
|
|
565
|
-
border-radius: var(--a8c--charts--leaderboard--bar--border-radius, 9999px);
|
|
570
|
+
border-radius: var(--a8c-charts-border-radius-leaderboard-bar, var(--a8c--charts--leaderboard--bar--border-radius, 9999px));
|
|
566
571
|
z-index: -1;
|
|
567
572
|
}
|
|
568
573
|
|
|
@@ -602,28 +607,36 @@
|
|
|
602
607
|
.a8ccharts-GovfoW-emptyState {
|
|
603
608
|
padding: var(--wpds-dimension-padding-3xl, 32px) var(--wpds-dimension-padding-lg, 16px);
|
|
604
609
|
text-align: center;
|
|
605
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
610
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
606
611
|
font-size: var(--wpds-typography-font-size-md, 13px);
|
|
607
612
|
font-style: italic;
|
|
608
613
|
}
|
|
609
614
|
|
|
610
|
-
.a8ccharts-GovfoW-
|
|
611
|
-
|
|
615
|
+
.a8ccharts-GovfoW-fitEmptyState {
|
|
616
|
+
justify-content: center;
|
|
617
|
+
align-items: center;
|
|
618
|
+
padding-block: 0;
|
|
619
|
+
display: flex;
|
|
620
|
+
position: absolute;
|
|
621
|
+
inset: 0;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.a8ccharts-GovfoW-row {
|
|
612
625
|
grid-column: 1 / -1;
|
|
613
626
|
grid-template-columns: subgrid;
|
|
614
|
-
|
|
627
|
+
padding: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
|
|
628
|
+
align-items: center;
|
|
629
|
+
display: grid;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.a8ccharts-GovfoW-interactiveRow {
|
|
615
633
|
appearance: none;
|
|
616
|
-
width: 100%;
|
|
617
|
-
padding: var(--focus-ring-width);
|
|
618
634
|
color: inherit;
|
|
619
635
|
font: inherit;
|
|
620
636
|
text-align: inherit;
|
|
621
637
|
cursor: pointer;
|
|
622
638
|
background: none;
|
|
623
639
|
border: 0;
|
|
624
|
-
align-items: center;
|
|
625
|
-
margin: 0;
|
|
626
|
-
display: grid;
|
|
627
640
|
position: relative;
|
|
628
641
|
}
|
|
629
642
|
|
|
@@ -636,7 +649,7 @@
|
|
|
636
649
|
}
|
|
637
650
|
|
|
638
651
|
.a8ccharts-GovfoW-interactiveRow:hover, .a8ccharts-GovfoW-interactiveRow:focus-visible {
|
|
639
|
-
--a8c
|
|
652
|
+
--a8c-charts-dimension-leaderboard-bar-hover-inset: var(--wpds-dimension-gap-2xl, 32px);
|
|
640
653
|
}
|
|
641
654
|
|
|
642
655
|
.a8ccharts-GovfoW-interactiveRow:hover .a8ccharts-GovfoW-bar, .a8ccharts-GovfoW-interactiveRow:focus-visible .a8ccharts-GovfoW-bar {
|
|
@@ -644,7 +657,7 @@
|
|
|
644
657
|
}
|
|
645
658
|
|
|
646
659
|
.a8ccharts-GovfoW-interactiveRow:hover .a8ccharts-GovfoW-valueContainer, .a8ccharts-GovfoW-interactiveRow:focus-visible .a8ccharts-GovfoW-valueContainer {
|
|
647
|
-
transform: translateX(calc(var(--a8c
|
|
660
|
+
transform: translateX(calc(var(--a8c-charts-dimension-leaderboard-bar-hover-inset) * -1));
|
|
648
661
|
}
|
|
649
662
|
|
|
650
663
|
.a8ccharts-GovfoW-interactiveRow:hover .a8ccharts-GovfoW-chevron, .a8ccharts-GovfoW-interactiveRow:focus-visible .a8ccharts-GovfoW-chevron {
|
|
@@ -652,19 +665,19 @@
|
|
|
652
665
|
}
|
|
653
666
|
|
|
654
667
|
[dir="rtl"] .a8ccharts-GovfoW-interactiveRow:hover .a8ccharts-GovfoW-valueContainer, [dir="rtl"] .a8ccharts-GovfoW-interactiveRow:focus-visible .a8ccharts-GovfoW-valueContainer {
|
|
655
|
-
transform: translateX(var(--a8c
|
|
668
|
+
transform: translateX(var(--a8c-charts-dimension-leaderboard-bar-hover-inset));
|
|
656
669
|
}
|
|
657
670
|
|
|
658
671
|
.a8ccharts-GovfoW-interactiveRow:focus-visible {
|
|
659
672
|
border-radius: var(--wpds-border-radius-sm, 2px);
|
|
660
|
-
outline: var(--focus-
|
|
661
|
-
outline-offset: calc(-1 * var(--focus-
|
|
673
|
+
outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
674
|
+
outline-offset: calc(-1 * var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)));
|
|
662
675
|
}
|
|
663
676
|
|
|
664
677
|
.a8ccharts-GovfoW-chevron {
|
|
665
678
|
inset-inline-end: var(--wpds-dimension-padding-xs, 4px);
|
|
666
679
|
opacity: 0;
|
|
667
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
680
|
+
color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
668
681
|
transition: opacity var(--wpds-motion-duration-sm, .1s) var(--wpds-motion-easing-subtle, cubic-bezier(.15, 0, .15, 1));
|
|
669
682
|
pointer-events: none;
|
|
670
683
|
margin-block: auto;
|
|
@@ -731,15 +744,15 @@
|
|
|
731
744
|
}
|
|
732
745
|
|
|
733
746
|
.a8ccharts-zR7F7G-trend-indicator--up {
|
|
734
|
-
color: var(--charts-trend-up-color, var(--wpds-color-foreground-content-success-weak, #008030));
|
|
747
|
+
color: var(--a8c-charts-color-trend-up, var(--charts-trend-up-color, var(--wpds-color-foreground-content-success-weak, #008030)));
|
|
735
748
|
}
|
|
736
749
|
|
|
737
750
|
.a8ccharts-zR7F7G-trend-indicator--down {
|
|
738
|
-
color: var(--charts-trend-down-color, var(--wpds-color-foreground-content-error-weak, #cc1818));
|
|
751
|
+
color: var(--a8c-charts-color-trend-down, var(--charts-trend-down-color, var(--wpds-color-foreground-content-error-weak, #cc1818)));
|
|
739
752
|
}
|
|
740
753
|
|
|
741
754
|
.a8ccharts-zR7F7G-trend-indicator--neutral {
|
|
742
|
-
color: var(--charts-trend-neutral-color, var(--wpds-color-foreground-content-neutral-weak, #707070));
|
|
755
|
+
color: var(--a8c-charts-color-trend-neutral, var(--charts-trend-neutral-color, var(--wpds-color-foreground-content-neutral-weak, #707070)));
|
|
743
756
|
}
|
|
744
757
|
|
|
745
758
|
.a8ccharts-zR7F7G-trend-indicator__icon {
|
package/dist/index.d.cts
CHANGED
|
@@ -152,8 +152,8 @@ type LeaderboardEntry = {
|
|
|
152
152
|
*/
|
|
153
153
|
previousShare?: number;
|
|
154
154
|
/**
|
|
155
|
-
* Delta of the entry. Omit when
|
|
156
|
-
* value.
|
|
155
|
+
* Delta of the entry. Omit when the percentage change is unavailable, such
|
|
156
|
+
* as when the row has no comparison value or its previous value is zero.
|
|
157
157
|
*/
|
|
158
158
|
delta?: number;
|
|
159
159
|
/**
|
|
@@ -946,7 +946,7 @@ declare const BarListChartResponsive: ({
|
|
|
946
946
|
width,
|
|
947
947
|
height,
|
|
948
948
|
...chartProps
|
|
949
|
-
}: Omit<BarListChartProps, "
|
|
949
|
+
}: Omit<BarListChartProps, "height" | "size" | "width"> & {
|
|
950
950
|
width?: number;
|
|
951
951
|
height?: number;
|
|
952
952
|
size?: number;
|
|
@@ -1100,7 +1100,7 @@ declare const GeoChartResponsive: ({
|
|
|
1100
1100
|
width,
|
|
1101
1101
|
height,
|
|
1102
1102
|
...chartProps
|
|
1103
|
-
}: Omit<GeoChartProps, "
|
|
1103
|
+
}: Omit<GeoChartProps, "height" | "size" | "width"> & {
|
|
1104
1104
|
width?: number;
|
|
1105
1105
|
height?: number;
|
|
1106
1106
|
size?: number;
|
|
@@ -1231,10 +1231,20 @@ interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, '
|
|
|
1231
1231
|
* Whether the chart is in loading state
|
|
1232
1232
|
*/
|
|
1233
1233
|
loading?: boolean;
|
|
1234
|
+
/**
|
|
1235
|
+
* Show only complete rows that fit the chart height instead of scrolling.
|
|
1236
|
+
*
|
|
1237
|
+
* Requires a container that constrains the chart's height; otherwise every
|
|
1238
|
+
* row fits. Refits are debounced with the parent resize on the responsive
|
|
1239
|
+
* export, so `LeaderboardChartUnresponsive` tracks a live drag more closely.
|
|
1240
|
+
* @default false
|
|
1241
|
+
*/
|
|
1242
|
+
fitRows?: boolean;
|
|
1234
1243
|
/**
|
|
1235
1244
|
* Custom styling for the chart container
|
|
1236
1245
|
*/
|
|
1237
1246
|
style?: React.CSSProperties & {
|
|
1247
|
+
'--a8c-charts-border-radius-leaderboard-bar'?: string; /** @deprecated Use `--a8c-charts-border-radius-leaderboard-bar`. */
|
|
1238
1248
|
'--a8c--charts--leaderboard--bar--border-radius'?: string;
|
|
1239
1249
|
};
|
|
1240
1250
|
/**
|
|
@@ -1271,7 +1281,7 @@ declare const LeaderboardChartResponsive: (({
|
|
|
1271
1281
|
width,
|
|
1272
1282
|
height,
|
|
1273
1283
|
...chartProps
|
|
1274
|
-
}: Omit<LeaderboardChartProps, "
|
|
1284
|
+
}: Omit<LeaderboardChartProps, "height" | "size" | "width"> & {
|
|
1275
1285
|
width?: number;
|
|
1276
1286
|
height?: number;
|
|
1277
1287
|
size?: number;
|
|
@@ -1804,7 +1814,7 @@ declare const Sparkline: ({
|
|
|
1804
1814
|
width,
|
|
1805
1815
|
height,
|
|
1806
1816
|
...chartProps
|
|
1807
|
-
}: Omit<SparklineProps, "
|
|
1817
|
+
}: Omit<SparklineProps, "height" | "size" | "width"> & {
|
|
1808
1818
|
width?: number;
|
|
1809
1819
|
height?: number;
|
|
1810
1820
|
size?: number;
|
|
@@ -1852,7 +1862,7 @@ declare const BaseTooltip: ({
|
|
|
1852
1862
|
className,
|
|
1853
1863
|
style,
|
|
1854
1864
|
renderContainer
|
|
1855
|
-
}: BaseTooltipProps) => string | number | true |
|
|
1865
|
+
}: BaseTooltipProps) => string | number | true | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode>;
|
|
1856
1866
|
//#endregion
|
|
1857
1867
|
//#region src/components/tooltip/accessible-tooltip.d.ts
|
|
1858
1868
|
type FlattenedTooltipData = {
|
package/dist/index.d.ts
CHANGED
|
@@ -152,8 +152,8 @@ type LeaderboardEntry = {
|
|
|
152
152
|
*/
|
|
153
153
|
previousShare?: number;
|
|
154
154
|
/**
|
|
155
|
-
* Delta of the entry. Omit when
|
|
156
|
-
* value.
|
|
155
|
+
* Delta of the entry. Omit when the percentage change is unavailable, such
|
|
156
|
+
* as when the row has no comparison value or its previous value is zero.
|
|
157
157
|
*/
|
|
158
158
|
delta?: number;
|
|
159
159
|
/**
|
|
@@ -946,7 +946,7 @@ declare const BarListChartResponsive: ({
|
|
|
946
946
|
width,
|
|
947
947
|
height,
|
|
948
948
|
...chartProps
|
|
949
|
-
}: Omit<BarListChartProps, "
|
|
949
|
+
}: Omit<BarListChartProps, "height" | "size" | "width"> & {
|
|
950
950
|
width?: number;
|
|
951
951
|
height?: number;
|
|
952
952
|
size?: number;
|
|
@@ -1100,7 +1100,7 @@ declare const GeoChartResponsive: ({
|
|
|
1100
1100
|
width,
|
|
1101
1101
|
height,
|
|
1102
1102
|
...chartProps
|
|
1103
|
-
}: Omit<GeoChartProps, "
|
|
1103
|
+
}: Omit<GeoChartProps, "height" | "size" | "width"> & {
|
|
1104
1104
|
width?: number;
|
|
1105
1105
|
height?: number;
|
|
1106
1106
|
size?: number;
|
|
@@ -1231,10 +1231,20 @@ interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, '
|
|
|
1231
1231
|
* Whether the chart is in loading state
|
|
1232
1232
|
*/
|
|
1233
1233
|
loading?: boolean;
|
|
1234
|
+
/**
|
|
1235
|
+
* Show only complete rows that fit the chart height instead of scrolling.
|
|
1236
|
+
*
|
|
1237
|
+
* Requires a container that constrains the chart's height; otherwise every
|
|
1238
|
+
* row fits. Refits are debounced with the parent resize on the responsive
|
|
1239
|
+
* export, so `LeaderboardChartUnresponsive` tracks a live drag more closely.
|
|
1240
|
+
* @default false
|
|
1241
|
+
*/
|
|
1242
|
+
fitRows?: boolean;
|
|
1234
1243
|
/**
|
|
1235
1244
|
* Custom styling for the chart container
|
|
1236
1245
|
*/
|
|
1237
1246
|
style?: React.CSSProperties & {
|
|
1247
|
+
'--a8c-charts-border-radius-leaderboard-bar'?: string; /** @deprecated Use `--a8c-charts-border-radius-leaderboard-bar`. */
|
|
1238
1248
|
'--a8c--charts--leaderboard--bar--border-radius'?: string;
|
|
1239
1249
|
};
|
|
1240
1250
|
/**
|
|
@@ -1271,7 +1281,7 @@ declare const LeaderboardChartResponsive: (({
|
|
|
1271
1281
|
width,
|
|
1272
1282
|
height,
|
|
1273
1283
|
...chartProps
|
|
1274
|
-
}: Omit<LeaderboardChartProps, "
|
|
1284
|
+
}: Omit<LeaderboardChartProps, "height" | "size" | "width"> & {
|
|
1275
1285
|
width?: number;
|
|
1276
1286
|
height?: number;
|
|
1277
1287
|
size?: number;
|
|
@@ -1804,7 +1814,7 @@ declare const Sparkline: ({
|
|
|
1804
1814
|
width,
|
|
1805
1815
|
height,
|
|
1806
1816
|
...chartProps
|
|
1807
|
-
}: Omit<SparklineProps, "
|
|
1817
|
+
}: Omit<SparklineProps, "height" | "size" | "width"> & {
|
|
1808
1818
|
width?: number;
|
|
1809
1819
|
height?: number;
|
|
1810
1820
|
size?: number;
|
|
@@ -1852,7 +1862,7 @@ declare const BaseTooltip: ({
|
|
|
1852
1862
|
className,
|
|
1853
1863
|
style,
|
|
1854
1864
|
renderContainer
|
|
1855
|
-
}: BaseTooltipProps) => string | number | true |
|
|
1865
|
+
}: BaseTooltipProps) => string | number | true | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode>;
|
|
1856
1866
|
//#endregion
|
|
1857
1867
|
//#region src/components/tooltip/accessible-tooltip.d.ts
|
|
1858
1868
|
type FlattenedTooltipData = {
|