import type { StyleProp, View, ViewStyle } from 'react-native'; import { type BoxBaseProps, type BoxProps } from '../../../layout/Box'; import type { LegendShape } from '../utils/chart'; export type LegendShapeProps = { /** * Color of the legend shape. * @default theme.color.fgPrimary */ color?: string; /** * Shape to display. Can be a preset shape or a custom ReactNode. * @default 'circle' */ shape?: LegendShape; /** * Custom styles for the shape element. */ style?: StyleProp; }; export type LegendShapeComponent = React.FC; export type LegendEntryProps = { /** * Id of the series. */ seriesId: string; /** * Label of the series. * If a ReactNode is provided, it replaces the default Text component. */ label: React.ReactNode; /** * Color of the series. * @default theme.color.fgPrimary */ color?: string; /** * Shape of the series. */ shape?: LegendShape; /** * Custom component to render the legend shape. * @default DefaultLegendShape */ ShapeComponent?: LegendShapeComponent; /** * Custom styles for the root element. */ style?: StyleProp; /** * Custom styles for the component parts. */ styles?: { /** * Custom styles for the root element. */ root?: StyleProp; /** * Custom styles for the shape element. */ shape?: StyleProp; /** * Custom styles for the label element. * @note not applied when label is a ReactNode. */ label?: StyleProp; }; }; export type LegendEntryComponent = React.FC; export type LegendBaseProps = Omit & { /** * Array of series IDs to display in the legend. * By default, all series will be displayed. */ seriesIds?: string[]; /** * Custom component to render each legend entry. * @default DefaultLegendEntry */ EntryComponent?: LegendEntryComponent; /** * Custom component to render the legend shape within each entry. * Only used when EntryComponent is not provided or is DefaultLegendEntry. * @default DefaultLegendShape */ ShapeComponent?: LegendShapeComponent; /** * Accessibility label for the legend group. * @default 'Legend' */ accessibilityLabel?: string; }; export type LegendProps = Omit & LegendBaseProps & { /** * Custom styles for the component parts. */ styles?: { /** * Custom styles for the root element. */ root?: StyleProp; /** * Custom styles for each entry element. */ entry?: StyleProp; /** * Custom styles for the shape element within each entry. */ entryShape?: StyleProp; /** * Custom styles for the label element within each entry. * @note not applied when label is a ReactNode. */ entryLabel?: StyleProp; }; }; export declare const Legend: import('react').MemoExoticComponent< ({ ref, flexDirection, justifyContent, alignItems, flexWrap, rowGap, columnGap, seriesIds, EntryComponent, ShapeComponent, accessibilityLabel, style, styles, ...props }: LegendProps & { ref?: React.Ref; }) => import('react/jsx-runtime').JSX.Element | undefined >; //# sourceMappingURL=Legend.d.ts.map