@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
package/dist/types.d.ts
CHANGED
|
@@ -174,6 +174,8 @@ interface ChartCommonProps<T> {
|
|
|
174
174
|
status?: ChartStatus;
|
|
175
175
|
/** How the skeleton moves while `status` is loading. Defaults to `shimmer`. */
|
|
176
176
|
loadingStyle?: ChartLoadingStyle;
|
|
177
|
+
/** What the plot shows when there is no data: `dots` (default), `shape`, an element, or `null`. */
|
|
178
|
+
empty?: ChartEmptyState;
|
|
177
179
|
error?: string;
|
|
178
180
|
renderRetry?: () => ReactNode;
|
|
179
181
|
motion?: ChartMotion;
|
|
@@ -528,6 +530,18 @@ export interface ChartLegendValue {
|
|
|
528
530
|
* Moving skeletons on a page share one clock, so they move in step.
|
|
529
531
|
*/
|
|
530
532
|
export type ChartLoadingStyle = 'shimmer' | 'draw' | 'breathe';
|
|
533
|
+
/**
|
|
534
|
+
* How a chart with nothing to draw looks: `dots` (the default) gathers a quiet dot field around
|
|
535
|
+
* the message, and `shape` lays the chart's own outline behind it at a whisper. Both stay still
|
|
536
|
+
* and always say so, so an empty chart never reads as loading.
|
|
537
|
+
*/
|
|
538
|
+
export type ChartEmptyLook = 'dots' | 'shape';
|
|
539
|
+
/**
|
|
540
|
+
* What a chart shows when the period has no data: a built-in look, your own element (for example
|
|
541
|
+
* `<ChartEmpty>No visits yet</ChartEmpty>`, or any component), or `null` for nothing at all. The
|
|
542
|
+
* chart places it in the plot area; what it says and draws is yours.
|
|
543
|
+
*/
|
|
544
|
+
export type ChartEmptyState = ChartEmptyLook | ReactElement | null;
|
|
531
545
|
/**
|
|
532
546
|
* How a legend lays out its entries: value `cards` (the default), compact `inline` labels, `list`
|
|
533
547
|
* rows with values aligned right, color-tinted `pills`, or `bars` where each value also draws a
|