@redsift/charts 13.0.2 → 13.0.4
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/_internal/BarChart2.js +1 -1
- package/_internal/BarChart2.js.map +1 -1
- package/_internal/Legend3.js +9 -6
- package/_internal/Legend3.js.map +1 -1
- package/_internal/LegendItem.js +1 -1
- package/_internal/LegendItem2.js +95 -27
- package/_internal/LegendItem2.js.map +1 -1
- package/_internal/LineChart2.js +1 -1
- package/_internal/LineChart2.js.map +1 -1
- package/_internal/PieChart2.js +1 -1
- package/_internal/PieChart2.js.map +1 -1
- package/_internal/ScatterPlot2.js +1 -1
- package/_internal/ScatterPlot2.js.map +1 -1
- package/index.d.ts +4 -2
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -5170,7 +5170,7 @@ declare const StyledChartContainerCaption: styled_components_dist_types.IStyledC
|
|
|
5170
5170
|
/**
|
|
5171
5171
|
* Component props.
|
|
5172
5172
|
*/
|
|
5173
|
-
interface LegendItemProps extends Pick<DataPointProps<LegendItemDatum>, 'color' | 'data' | 'dataset' | 'id' | 'index' | 'isSelected' | 'labelDecorator' | 'onClick' | 'previousData' | 'role' | 'tooltipVariant'>, Omit<ComponentProps<'li'>, 'onClick' | 'role'> {
|
|
5173
|
+
interface LegendItemProps extends Pick<DataPointProps<LegendItemDatum>, 'anchorProps' | 'color' | 'data' | 'dataset' | 'id' | 'index' | 'isSelected' | 'labelDecorator' | 'onClick' | 'previousData' | 'role' | 'tooltipVariant'>, Omit<ComponentProps<'li'>, 'onClick' | 'role'> {
|
|
5174
5174
|
/** Method modifying what's displayed within the legend when the variant is "custom". */
|
|
5175
5175
|
legendDecorator?: (datum: LegendItemDatum, props?: {
|
|
5176
5176
|
index?: number;
|
|
@@ -5196,6 +5196,8 @@ interface LegendProps extends Omit<ComponentProps<'ul'>, 'onClick' | 'children'>
|
|
|
5196
5196
|
data?: (Statistic & {
|
|
5197
5197
|
color: string;
|
|
5198
5198
|
})[];
|
|
5199
|
+
/** Method used to define the anchor props to use when a legend item is a navigation link. The item then renders a native link, without the `button` wiring or the selection state of `onLegendItemClick`, which still runs on activation. */
|
|
5200
|
+
getLegendItemAnchorProps?: (datum: LegendItemDatum) => AnchorProps;
|
|
5199
5201
|
/** Method to determine whether a legend is selected or not. */
|
|
5200
5202
|
isLegendItemSelected?: (datum: LegendItemDatum) => void;
|
|
5201
5203
|
/** Method to override the data labels. */
|
|
@@ -5212,7 +5214,7 @@ interface LegendProps extends Omit<ComponentProps<'ul'>, 'onClick' | 'children'>
|
|
|
5212
5214
|
}) => string | ReactElement;
|
|
5213
5215
|
/** Method to be called on a click on a legend item. */
|
|
5214
5216
|
onLegendItemClick?: (datum: LegendItemDatum, data: LegendItemDatum[]) => void;
|
|
5215
|
-
/** LegendItem role. Used to indicate that legend items are to be considered buttons or links. If an onClick is provided, the legend items will have the role `button` unless specifically set to `link` with this prop. */
|
|
5217
|
+
/** LegendItem role. Used to indicate that legend items are to be considered buttons or links. If an onClick is provided, the legend items will have the role `button` unless specifically set to `link` with this prop. A legend item that is a navigation link (see `getLegendItemAnchorProps`) ignores it: the link carries its own semantics and has no selection state. */
|
|
5216
5218
|
legendItemRole?: LegendItemProps['role'];
|
|
5217
5219
|
/** Variant. */
|
|
5218
5220
|
variant?: LegendVariant;
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"test:coverage": "TZ=UTC vitest run --coverage"
|
|
30
30
|
},
|
|
31
31
|
"types": "index.d.ts",
|
|
32
|
-
"version": "13.0.
|
|
32
|
+
"version": "13.0.4",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@emotion/react": "^11.10.4",
|
|
35
35
|
"@emotion/styled": "^11.10.4",
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
"vitest": "^5.0.2"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@redsift/design-system": "^13.0.
|
|
85
|
-
"@redsift/popovers": "^13.0.
|
|
84
|
+
"@redsift/design-system": "^13.0.4-0",
|
|
85
|
+
"@redsift/popovers": "^13.0.4-0",
|
|
86
86
|
"react": ">=17",
|
|
87
87
|
"react-dom": ">=17",
|
|
88
88
|
"styled-components": "^6.4.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "ffaec0bf4fea6ba2b41fe1858e9f1a003240cc50"
|
|
91
91
|
}
|