@foris/avocado-not-front 8.0.3 → 8.2.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/dist/avocado-not-front/src/components/chart/Chart.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/chart.constants.d.ts +6 -2
- package/dist/avocado-not-front/src/components/chart/chart.types.d.ts +4 -3
- package/dist/avocado-not-front/src/components/chart/chart.util.d.ts +7 -0
- package/dist/avocado-not-front/src/components/chart/charts/BarChart.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/charts/DonutChart.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/charts/barChart.util.d.ts +3 -0
- package/dist/avocado-not-front/src/components/chart/charts/barChart.util.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/charts/donutChart.util.d.ts +4 -0
- package/dist/avocado-not-front/src/components/chart/charts/donutChart.util.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/charts/index.d.ts +1 -1
- package/dist/avocado-not-front/src/components/chart/charts/line-chart/LineChart.d.ts +3 -0
- package/dist/avocado-not-front/src/components/chart/charts/line-chart/LineChart.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/charts/line-chart/index.d.ts +1 -0
- package/dist/avocado-not-front/src/components/chart/components/Tooltip.d.ts +1 -6
- package/dist/avocado-not-front/src/components/chart/components/{ChartScrollViewport.d.ts → chart-scroll-viewport/ChartScrollViewport.d.ts} +1 -2
- package/dist/avocado-not-front/src/components/chart/components/chart-scroll-viewport/index.d.ts +2 -0
- package/dist/avocado-not-front/src/types/components.type.d.ts +6 -6
- package/dist/avocado-not-front.es.js +2132 -2211
- package/dist/avocado-not-front.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +9 -9
- package/dist/avocado-not-front/src/components/chart/charts/LineChart.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export { chartColors } from '../../../../avocado-suite';
|
|
1
2
|
import type { ChartTheme, ChartType } from './chart.types';
|
|
2
3
|
export declare const CHART_HEIGHT = 400;
|
|
4
|
+
export declare const BAR_CHART_LABEL = "Bar chart";
|
|
5
|
+
/** Keeps the legacy ring size: outerRadius 120 → 240px. */
|
|
6
|
+
export declare const CHART_DONUT_MAX_DIAMETER = 240;
|
|
7
|
+
export declare const CHART_DONUT_LEGEND_RESERVE = 48;
|
|
3
8
|
export declare const CHART_CATEGORY_WIDTH_PX = 56;
|
|
4
9
|
export declare const CHART_CATEGORY_HEIGHT_PX = 28;
|
|
5
10
|
export declare const CHART_Y_AXIS_MIN_WIDTH_PX = 100;
|
|
@@ -11,9 +16,8 @@ export declare const chartRegistry: {
|
|
|
11
16
|
composed: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
12
17
|
donut: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
13
18
|
horizontalBar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
line: (
|
|
19
|
+
line: ({ data, xKey, yKeys, yKeyLabels, series: seriesConfig, tooltipKey, showLegend, chartHeight, }: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
15
20
|
mixBar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
16
21
|
pie: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
17
22
|
};
|
|
18
|
-
export declare const chartColors: string[];
|
|
19
23
|
export declare const chartBaseTheme: ChartTheme;
|
|
@@ -6,6 +6,7 @@ export interface ChartSeriesConfig {
|
|
|
6
6
|
type?: ComposedSeriesType;
|
|
7
7
|
stackId?: string;
|
|
8
8
|
label?: string;
|
|
9
|
+
/** Series color. `line` accepts design-system color tokens only, e.g. `'palette-4-80'`. */
|
|
9
10
|
color?: string;
|
|
10
11
|
/** Links series to a Y axis (`composed` with dual axis). */
|
|
11
12
|
yAxisId?: string;
|
|
@@ -55,11 +56,11 @@ export interface ChartConfig {
|
|
|
55
56
|
yAxisWidth?: number;
|
|
56
57
|
/** Y-axis definitions for dual-axis composed charts. */
|
|
57
58
|
yAxes?: ChartYAxisConfig[];
|
|
58
|
-
/**
|
|
59
|
+
/** @deprecated Ignored for `donut`: the ring sizes itself (max 240 px). */
|
|
59
60
|
innerRadius?: number | string;
|
|
60
|
-
/**
|
|
61
|
+
/** @deprecated Ignored for `donut`: the ring sizes itself (max 240 px). */
|
|
61
62
|
outerRadius?: number;
|
|
62
|
-
/** Hover
|
|
63
|
+
/** Hover shows a callout and the slice label in the center (`donut` only). `false` shows the Chart tooltip instead. Default `true`. */
|
|
63
64
|
activeShape?: boolean;
|
|
64
65
|
/** Initial highlighted slice index (`donut` only). */
|
|
65
66
|
defaultIndex?: number;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ChartColor } from '../../../../avocado-suite';
|
|
2
|
+
import type { ChartSeriesConfig } from './chart.types';
|
|
1
3
|
/**
|
|
2
4
|
* Returns the pixel width the chart content should occupy.
|
|
3
5
|
*
|
|
@@ -28,3 +30,8 @@ export declare function getChartContentHeight(dataLength: number, minCategoryHei
|
|
|
28
30
|
* Uses the longest label in `data` when no fixed width is provided.
|
|
29
31
|
*/
|
|
30
32
|
export declare function getCategoryAxisWidth(data: unknown[], xKey: string, fixedWidth?: number): number;
|
|
33
|
+
/**
|
|
34
|
+
* Color token configured for `key` in the JSON `series`, for Suite charts. Values that are not
|
|
35
|
+
* design-system tokens (a hex, for example) are ignored, so the series keeps its palette color.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getSeriesColorToken(series: readonly ChartSeriesConfig[] | undefined, key: string): ChartColor | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DonutProps, DonutSegment } from '../../../../../avocado-suite';
|
|
2
|
+
import type { ChartConfig } from '../chart.types';
|
|
3
|
+
export declare const mapDonutSegments: (data: ChartConfig['data'], xKey: string, valueKey?: string) => DonutSegment[];
|
|
4
|
+
export declare const mapDonutActiveShape: (activeShape: boolean) => Pick<DonutProps, 'interactive' | 'showCallout' | 'centerMode' | 'showCenter'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { BarChart } from './BarChart';
|
|
|
3
3
|
import { ComposedChart } from './ComposedChart';
|
|
4
4
|
import { DonutChart } from './DonutChart';
|
|
5
5
|
import { HorizontalBarChart } from './HorizontalBarChart';
|
|
6
|
-
import { LineChart } from './
|
|
6
|
+
import { LineChart } from './line-chart';
|
|
7
7
|
import { MixBarChart } from './MixBarChart';
|
|
8
8
|
import { PieChart } from './PieChart';
|
|
9
9
|
export { AreaChart, BarChart, ComposedChart, DonutChart, HorizontalBarChart, MixBarChart, LineChart, PieChart, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ChartConfig } from '../../chart.types';
|
|
2
|
+
/** Maps existing JSON fields to Suite; the chart wrapper owns requests and scrolling. */
|
|
3
|
+
export declare const LineChart: ({ data, xKey, yKeys, yKeyLabels, series: seriesConfig, tooltipKey, showLegend, chartHeight, }: ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LineChart } from './LineChart';
|
|
@@ -4,11 +4,6 @@ interface TooltipProps {
|
|
|
4
4
|
tooltipCoverage?: TooltipCoverageConfig;
|
|
5
5
|
/** Initial highlighted item index before user interaction. */
|
|
6
6
|
defaultIndex?: number;
|
|
7
|
-
/**
|
|
8
|
-
* Keep Tooltip mounted for slice activation but render no floating box.
|
|
9
|
-
* Use with donut `activeShape` so hover drives the active slice renderer.
|
|
10
|
-
*/
|
|
11
|
-
hideContent?: boolean;
|
|
12
7
|
}
|
|
13
|
-
export declare const Tooltip: ({ tooltipKey, tooltipCoverage, defaultIndex,
|
|
8
|
+
export declare const Tooltip: ({ tooltipKey, tooltipCoverage, defaultIndex, }?: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface ChartScrollViewportProps {
|
|
2
|
+
export interface ChartScrollViewportProps {
|
|
3
3
|
dataLength: number;
|
|
4
4
|
minCategoryWidth?: number;
|
|
5
5
|
children: (width: number) => React.ReactNode;
|
|
@@ -10,4 +10,3 @@ interface ChartScrollViewportProps {
|
|
|
10
10
|
* content width to the render-prop child.
|
|
11
11
|
*/
|
|
12
12
|
export declare const ChartScrollViewport: ({ dataLength, minCategoryWidth, children, }: ChartScrollViewportProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, ContextualNavigationItem, DataCardPaletteIndex, DataCardV2HeaderStyle, DataCardV2Status, DividerProps, DrawerProps, DropzoneUploadStatus, FileUploadProps, HeadingProps, HeaderNavigationVisual, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableColumn, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
|
|
1
|
+
import type { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, ContextualNavigationItem, DataCardPaletteIndex, DataCardV2HeaderStyle, DataCardV2Status, DividerProps, DrawerProps, DropzoneUploadStatus, FileUploadProps, HeadingProps, HeaderNavigationBackground, HeaderNavigationVisual, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableColumn, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
|
|
2
2
|
import type { AiAgentTheme, ChatPanelTranslations, SuggestionType, SupportedLocale } from '../../../ai-agent';
|
|
3
3
|
import type { TooltipCoverageConfig } from '../components/chart/chart.types';
|
|
4
4
|
import type { ChartSeriesConfig, ChartYAxisConfig } from '../components/chart/chart.types';
|
|
@@ -38,7 +38,7 @@ export interface HeaderNavigationNotFrontProps extends NotFrontBaseProps {
|
|
|
38
38
|
component: 'headerNavigation';
|
|
39
39
|
title: string;
|
|
40
40
|
description?: string;
|
|
41
|
-
background?:
|
|
41
|
+
background?: HeaderNavigationBackground;
|
|
42
42
|
leadingVisual?: HeaderNavigationVisual;
|
|
43
43
|
pattern?: boolean | string;
|
|
44
44
|
menuLabel?: string;
|
|
@@ -93,11 +93,11 @@ export interface ChartNotFrontProps extends NotFrontBaseProps {
|
|
|
93
93
|
yAxisWidth?: number;
|
|
94
94
|
/** Y-axis definitions for dual-axis `composed` charts. */
|
|
95
95
|
yAxes?: ChartYAxisConfig[];
|
|
96
|
-
/**
|
|
96
|
+
/** @deprecated Ignored for `donut`: the ring sizes itself (max 240 px). */
|
|
97
97
|
innerRadius?: number | string;
|
|
98
|
-
/**
|
|
98
|
+
/** @deprecated Ignored for `donut`: the ring sizes itself (max 240 px). */
|
|
99
99
|
outerRadius?: number;
|
|
100
|
-
/** Hover
|
|
100
|
+
/** Hover shows a callout and the slice label in the center (`donut` only). `false` shows the Chart tooltip instead. Default `true`. */
|
|
101
101
|
activeShape?: boolean;
|
|
102
102
|
/** Initial highlighted slice index (`donut` only). */
|
|
103
103
|
defaultIndex?: number;
|
|
@@ -1040,7 +1040,7 @@ export interface StepperNotFrontProps extends NotFrontBaseProps {
|
|
|
1040
1040
|
itemActive: number;
|
|
1041
1041
|
darkMode?: boolean;
|
|
1042
1042
|
}
|
|
1043
|
-
/** Suite `
|
|
1043
|
+
/** Suite `SegmentedProgress`: segmented completion display. */
|
|
1044
1044
|
export interface ProgressBarNotFrontProps extends NotFrontBaseProps {
|
|
1045
1045
|
component: 'progressBar';
|
|
1046
1046
|
total: number;
|