@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.
- package/CHANGELOG.md +8 -0
- package/dist/cards/activity-ring-card.d.ts +7 -2
- package/dist/cards/cartesian-card.d.ts +10 -2
- package/dist/cards/funnel-chart-card.d.ts +7 -2
- package/dist/cards/heatmap-chart-card.d.ts +7 -2
- package/dist/cards/horizontal-bar-chart-card.d.ts +7 -2
- package/dist/cards/observations-card.d.ts +7 -2
- package/dist/cards/radar-chart-card.d.ts +7 -2
- package/dist/cards/radial-chart-card.d.ts +7 -2
- package/dist/cards/sankey-chart-card.d.ts +7 -2
- package/dist/cards/scatter-chart-card.d.ts +7 -2
- package/dist/cards/slope-chart-card.d.ts +7 -2
- package/dist/cards/stat-card.d.ts +7 -2
- package/dist/chart.d.ts +1 -1
- package/dist/finance/cards/depth-chart-card.d.ts +7 -2
- package/dist/finance/order-book.d.ts +7 -2
- package/dist/finance.js +334 -327
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2702 -2647
- package/dist/lifecycle/chart-empty.d.ts +29 -0
- package/dist/{skeleton-block-C8gOUsxn.js → skeleton-block-CPaKI7op.js} +1696 -1571
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
|
@@ -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;
|