@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/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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilt-ui/charts",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Beautiful, key-typed React chart cards with linked hover, targets, forecasts, finance charts, and calm motion.",
5
5
  "keywords": [
6
6
  "react",