@lilt-ui/charts 0.10.0 → 0.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.
@@ -0,0 +1,29 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { ChartEmptyLook, ChartEmptyState } from '../types';
3
+ /** The outline a chart family lays behind its empty message with the `shape` look. */
4
+ export type ChartEmptyShape = 'wave' | 'bars' | 'rows' | 'ring' | 'points' | 'tiles' | 'web' | 'flow';
5
+ /** Set by a card around its chart, so the chart's empty slot draws the family's own outline. */
6
+ export declare const EmptyShapeContext: import('react').Context<ChartEmptyShape>;
7
+ export interface ChartEmptyProps {
8
+ /** `dots` (default) or the chart's own `shape`. */
9
+ look?: ChartEmptyLook;
10
+ /** The message. Defaults to the chart's own, e.g. "No data for this period". */
11
+ children?: ReactNode;
12
+ }
13
+ /**
14
+ * Lilt's empty state: a still look and one quiet line. Pass it to a chart's `empty` prop with your
15
+ * own words, e.g. `empty={<ChartEmpty>No visits yet</ChartEmpty>}`; inside a chart it takes the
16
+ * chart's shape and message.
17
+ */
18
+ export declare function ChartEmpty({ look, children }: ChartEmptyProps): ReactElement;
19
+ /**
20
+ * Where a chart's empty state sits. Over a plot it fills the plot area; in place of a card's body
21
+ * (`block`) it holds the body's height, so an empty card keeps its size. The outline defaults to
22
+ * the one the card around it names.
23
+ */
24
+ export declare function EmptySlot({ state, shape: ownShape, message, block, }: {
25
+ state?: ChartEmptyState;
26
+ shape?: ChartEmptyShape;
27
+ message?: string;
28
+ block?: boolean;
29
+ }): ReactElement | null;