@nexub/react 4.4.0 → 4.6.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/accessibility.json +58 -1
- package/dist/components/Chart/Chart.js +11 -8
- package/dist/components/Chart/ChartToggle.d.ts +11 -0
- package/dist/components/Chart/ChartToggle.js +42 -0
- package/dist/components/Chart/MoreCharts.d.ts +47 -0
- package/dist/components/Chart/MoreCharts.js +90 -0
- package/dist/components/Chart/index.d.ts +4 -0
- package/dist/components/Chart/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -0
- package/dist/styles.css +1 -1
- package/package.json +6 -6
package/accessibility.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.
|
|
2
|
+
"version": "4.6.0",
|
|
3
3
|
"standard": "WCAG 2.2 Level AA",
|
|
4
4
|
"method": {
|
|
5
5
|
"automated": "axe-core rules tagged wcag2a, wcag2aa, wcag21a, wcag21aa and wcag22aa, run on every Storybook story in light and dark on every pull request; a new violation fails the build.",
|
|
@@ -205,6 +205,19 @@
|
|
|
205
205
|
"Decorative (`aria-hidden`). Announce the win in text, for example in a Toast or a status message."
|
|
206
206
|
]
|
|
207
207
|
},
|
|
208
|
+
{
|
|
209
|
+
"slug": "chart-toggle",
|
|
210
|
+
"name": "Chart Toggle",
|
|
211
|
+
"package": "@nexub/react",
|
|
212
|
+
"automated": "pass",
|
|
213
|
+
"exceptions": [],
|
|
214
|
+
"keyboard": [
|
|
215
|
+
"Tab / Space: Move between series and switch one on or off."
|
|
216
|
+
],
|
|
217
|
+
"screenReader": [
|
|
218
|
+
"Each series is a toggle button with `aria-pressed`. The last visible series cannot be switched off."
|
|
219
|
+
]
|
|
220
|
+
},
|
|
208
221
|
{
|
|
209
222
|
"slug": "checkbox-card",
|
|
210
223
|
"name": "Checkbox Card",
|
|
@@ -402,6 +415,28 @@
|
|
|
402
415
|
"keyboard": [],
|
|
403
416
|
"screenReader": []
|
|
404
417
|
},
|
|
418
|
+
{
|
|
419
|
+
"slug": "funnel",
|
|
420
|
+
"name": "Funnel",
|
|
421
|
+
"package": "@nexub/react",
|
|
422
|
+
"automated": "pass",
|
|
423
|
+
"exceptions": [],
|
|
424
|
+
"keyboard": [],
|
|
425
|
+
"screenReader": [
|
|
426
|
+
"The drawing is hidden from assistive tech; a visually hidden table or caption carries every value."
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"slug": "gauge",
|
|
431
|
+
"name": "Gauge",
|
|
432
|
+
"package": "@nexub/react",
|
|
433
|
+
"automated": "pass",
|
|
434
|
+
"exceptions": [],
|
|
435
|
+
"keyboard": [],
|
|
436
|
+
"screenReader": [
|
|
437
|
+
"The drawing is hidden from assistive tech; a visually hidden table or caption carries every value."
|
|
438
|
+
]
|
|
439
|
+
},
|
|
405
440
|
{
|
|
406
441
|
"slug": "gradient-divider",
|
|
407
442
|
"name": "Gradient Divider",
|
|
@@ -429,6 +464,17 @@
|
|
|
429
464
|
"keyboard": [],
|
|
430
465
|
"screenReader": []
|
|
431
466
|
},
|
|
467
|
+
{
|
|
468
|
+
"slug": "heatmap",
|
|
469
|
+
"name": "Heatmap",
|
|
470
|
+
"package": "@nexub/react",
|
|
471
|
+
"automated": "pass",
|
|
472
|
+
"exceptions": [],
|
|
473
|
+
"keyboard": [],
|
|
474
|
+
"screenReader": [
|
|
475
|
+
"The drawing is hidden from assistive tech; a visually hidden table or caption carries every value."
|
|
476
|
+
]
|
|
477
|
+
},
|
|
432
478
|
{
|
|
433
479
|
"slug": "helper-text",
|
|
434
480
|
"name": "Helper Text",
|
|
@@ -481,6 +527,17 @@
|
|
|
481
527
|
"keyboard": [],
|
|
482
528
|
"screenReader": []
|
|
483
529
|
},
|
|
530
|
+
{
|
|
531
|
+
"slug": "kpi-tile",
|
|
532
|
+
"name": "KPI Tile",
|
|
533
|
+
"package": "@nexub/react",
|
|
534
|
+
"automated": "pass",
|
|
535
|
+
"exceptions": [],
|
|
536
|
+
"keyboard": [],
|
|
537
|
+
"screenReader": [
|
|
538
|
+
"The drawing is hidden from assistive tech; a visually hidden table or caption carries every value."
|
|
539
|
+
]
|
|
540
|
+
},
|
|
484
541
|
{
|
|
485
542
|
"slug": "label",
|
|
486
543
|
"name": "Label",
|
|
@@ -69,14 +69,17 @@ function Frame({
|
|
|
69
69
|
/* @__PURE__ */ jsx("line", { x1: "0", x2: VB_W, y1: zero, y2: zero, strokeWidth: "1", vectorEffect: "non-scaling-stroke", className: "stroke-[var(--color-outline)]" }),
|
|
70
70
|
children
|
|
71
71
|
] }),
|
|
72
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 grid auto-cols-fr grid-flow-col", children: data.map((row, i) => /* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */ jsx("
|
|
74
|
-
|
|
75
|
-
/* @__PURE__ */ jsx("
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 grid auto-cols-fr grid-flow-col", children: data.map((row, i) => /* @__PURE__ */ jsxs("div", { className: "group/col relative rounded-shape-tooltip transition-colors hover:bg-[color-mix(in_oklab,var(--color-on-surface)_6%,transparent)]", children: [
|
|
73
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 start-1/2 w-px bg-[var(--color-outline)] opacity-0 transition-opacity group-hover/col:opacity-100" }),
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: "pointer-events-none absolute top-1 start-1/2 z-10 min-w-max -translate-x-1/2 rounded-shape-tooltip bg-[var(--color-inverse-surface)] px-3 py-2 text-label-md text-[var(--color-inverse-on-surface)] opacity-0 shadow-elevation-2 transition-opacity group-hover/col:opacity-100 rtl:translate-x-1/2", children: [
|
|
75
|
+
/* @__PURE__ */ jsx("div", { className: "mb-1 font-semibold", children: String(row[index]) }),
|
|
76
|
+
series.map((s, j) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 tabular-nums", children: [
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: cn("size-2 shrink-0 rounded-full", BG[colorIndex(s.color, j)]) }),
|
|
78
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: labels[j] }),
|
|
79
|
+
/* @__PURE__ */ jsx("span", { className: "ps-3", children: valueFormat(valueOf(row, s.key)) })
|
|
80
|
+
] }, s.key))
|
|
81
|
+
] })
|
|
82
|
+
] }, i)) })
|
|
80
83
|
] }),
|
|
81
84
|
/* @__PURE__ */ jsx("div", { className: "grid auto-cols-fr grid-flow-col text-center text-label-sm text-[var(--color-on-surface-muted)]", children: data.map((row, i) => /* @__PURE__ */ jsx("span", { className: "truncate px-0.5", children: String(row[index]) }, i)) })
|
|
82
85
|
] })
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ChartSeries } from './Chart.js';
|
|
3
|
+
export interface ChartToggleProps {
|
|
4
|
+
series: ChartSeries[];
|
|
5
|
+
/** Renders the chart with the series that are switched on. */
|
|
6
|
+
children: (visible: ChartSeries[]) => React.ReactNode;
|
|
7
|
+
/** Accessible name for the group of toggles. @default 'Series' */
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChartToggle({ series, children, label, className }: ChartToggleProps): React.JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
const BG = ["bg-chart-1", "bg-chart-2", "bg-chart-3", "bg-chart-4", "bg-chart-5", "bg-chart-6", "bg-chart-7", "bg-chart-8"];
|
|
6
|
+
function ChartToggle({ series, children, label = "Series", className }) {
|
|
7
|
+
const [hidden, setHidden] = React.useState(() => /* @__PURE__ */ new Set());
|
|
8
|
+
const coloured = series.map((s, i) => ({ ...s, color: s.color ?? i % 8 + 1 }));
|
|
9
|
+
const visible = coloured.filter((s) => !hidden.has(s.key));
|
|
10
|
+
const toggle = (key) => setHidden((prev) => {
|
|
11
|
+
const next = new Set(prev);
|
|
12
|
+
if (next.has(key)) next.delete(key);
|
|
13
|
+
else if (series.length - next.size > 1) next.add(key);
|
|
14
|
+
return next;
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
17
|
+
/* @__PURE__ */ jsx("div", { role: "group", "aria-label": label, className: "flex flex-wrap gap-2", children: coloured.map((s) => {
|
|
18
|
+
const on = !hidden.has(s.key);
|
|
19
|
+
return /* @__PURE__ */ jsxs(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
type: "button",
|
|
23
|
+
"aria-pressed": on,
|
|
24
|
+
onClick: () => toggle(s.key),
|
|
25
|
+
className: cn(
|
|
26
|
+
"nx-state-layer inline-flex h-control-xs items-center gap-1.5 rounded-full border px-2.5 text-label-md",
|
|
27
|
+
on ? "border-[var(--color-outline-variant)] text-[var(--color-on-surface)]" : "border-dashed border-[var(--color-outline-variant)] text-[var(--color-on-surface-variant)] line-through"
|
|
28
|
+
),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("size-2.5 rounded-full", on ? BG[(s.color - 1) % 8] : "bg-[var(--color-outline-variant)]") }),
|
|
31
|
+
s.label ?? s.key
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
s.key
|
|
35
|
+
);
|
|
36
|
+
}) }),
|
|
37
|
+
children(visible)
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
ChartToggle
|
|
42
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartColor } from './Chart.js';
|
|
3
|
+
export interface GaugeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'color'> {
|
|
4
|
+
value: number;
|
|
5
|
+
/** @default 100 */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Accessible name, e.g. "Storage used". */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Shown in the middle; defaults to the percentage. */
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
color?: ChartColor;
|
|
12
|
+
}
|
|
13
|
+
/** Progress toward a target on a 270° arc. */
|
|
14
|
+
export declare function Gauge({ value, max, title, label, color, className, ...props }: GaugeProps): React.JSX.Element;
|
|
15
|
+
export interface HeatmapProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
16
|
+
/** Rows of values, e.g. one row per weekday, one column per week. */
|
|
17
|
+
data: number[][];
|
|
18
|
+
rowLabels: string[];
|
|
19
|
+
columnLabels?: string[];
|
|
20
|
+
title: string;
|
|
21
|
+
valueFormat?: (value: number) => string;
|
|
22
|
+
}
|
|
23
|
+
/** Intensity over a grid (activity by day and week, load by hour). Seven steps of the sequential palette. */
|
|
24
|
+
export declare function Heatmap({ data, rowLabels, columnLabels, title, valueFormat, className, ...props }: HeatmapProps): React.JSX.Element;
|
|
25
|
+
export interface FunnelProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title' | 'color'> {
|
|
26
|
+
data: {
|
|
27
|
+
label: string;
|
|
28
|
+
value: number;
|
|
29
|
+
}[];
|
|
30
|
+
title: string;
|
|
31
|
+
valueFormat?: (value: number) => string;
|
|
32
|
+
color?: ChartColor;
|
|
33
|
+
}
|
|
34
|
+
/** Drop-off through ordered steps, with the conversion from the first step. */
|
|
35
|
+
export declare function Funnel({ data, title, valueFormat, color, className, ...props }: FunnelProps): React.JSX.Element;
|
|
36
|
+
export interface KpiTileProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
37
|
+
label: string;
|
|
38
|
+
value: React.ReactNode;
|
|
39
|
+
/** Change versus the previous period, e.g. 0.114 for +11.4%. */
|
|
40
|
+
change?: number;
|
|
41
|
+
/** For metrics where down is good (churn, costs). */
|
|
42
|
+
invert?: boolean;
|
|
43
|
+
/** Recent values for the sparkline, oldest first. */
|
|
44
|
+
trend?: number[];
|
|
45
|
+
}
|
|
46
|
+
/** A headline number with its change and a trend line. The change text carries good/bad colour; the trend stays the accent. */
|
|
47
|
+
export declare function KpiTile({ label, value, change, invert, trend, className, ...props }: KpiTileProps): React.JSX.Element;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
import { Sparkline } from "./Chart.js";
|
|
5
|
+
const FILL = ["fill-chart-1", "fill-chart-2", "fill-chart-3", "fill-chart-4", "fill-chart-5", "fill-chart-6", "fill-chart-7", "fill-chart-8"];
|
|
6
|
+
const STROKE = ["stroke-chart-1", "stroke-chart-2", "stroke-chart-3", "stroke-chart-4", "stroke-chart-5", "stroke-chart-6", "stroke-chart-7", "stroke-chart-8"];
|
|
7
|
+
const SEQ = ["fill-chart-seq-1", "fill-chart-seq-2", "fill-chart-seq-3", "fill-chart-seq-4", "fill-chart-seq-5", "fill-chart-seq-6", "fill-chart-seq-7"];
|
|
8
|
+
const ci = (c) => ((c ?? 1) - 1) % 8;
|
|
9
|
+
const fmt = (n) => n.toLocaleString();
|
|
10
|
+
function Gauge({ value, max = 100, title, label, color = 1, className, ...props }) {
|
|
11
|
+
const pct = Math.max(0, Math.min(1, value / max));
|
|
12
|
+
const r = 15.9155;
|
|
13
|
+
return /* @__PURE__ */ jsxs("figure", { "aria-label": title, className: cn("m-0 inline-flex flex-col items-center", className), ...props, children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("div", { "aria-hidden": "true", className: "relative size-36", children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 42 42", className: "size-full rotate-[135deg]", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("circle", { cx: "21", cy: "21", r, fill: "none", strokeWidth: "4", strokeLinecap: "round", strokeDasharray: "75 25", className: "stroke-[var(--color-surface-container-high)]" }),
|
|
17
|
+
/* @__PURE__ */ jsx("circle", { cx: "21", cy: "21", r, fill: "none", strokeWidth: "4", strokeLinecap: "round", strokeDasharray: `${pct * 75} ${100 - pct * 75}`, className: STROKE[ci(color)] })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-title-lg tabular-nums text-[var(--color-on-surface)]", children: label ?? `${Math.round(pct * 100)}%` })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ jsx("figcaption", { className: "sr-only", children: `${title}: ${fmt(value)} of ${fmt(max)} (${Math.round(pct * 100)}%)` })
|
|
22
|
+
] });
|
|
23
|
+
}
|
|
24
|
+
function Heatmap({ data, rowLabels, columnLabels, title, valueFormat = fmt, className, ...props }) {
|
|
25
|
+
const flat = data.flat();
|
|
26
|
+
const lo = Math.min(...flat);
|
|
27
|
+
const span = Math.max(...flat) - lo || 1;
|
|
28
|
+
const step = (v) => Math.min(SEQ.length - 1, Math.floor((v - lo) / span * SEQ.length));
|
|
29
|
+
const cols = Math.max(...data.map((r) => r.length));
|
|
30
|
+
return /* @__PURE__ */ jsxs("figure", { "aria-label": title, className: cn("m-0 flex gap-2", className), ...props, children: [
|
|
31
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "flex flex-col justify-around text-label-sm text-[var(--color-on-surface-muted)]", children: rowLabels.map((l) => /* @__PURE__ */ jsx("span", { children: l }, l)) }),
|
|
32
|
+
/* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: `0 0 ${cols * 12} ${data.length * 12}`, className: "h-auto min-w-0 flex-1 rtl:-scale-x-100", children: data.map(
|
|
33
|
+
(row, y) => row.map((v, x) => /* @__PURE__ */ jsx("rect", { x: x * 12 + 1, y: y * 12 + 1, width: "10", height: "10", rx: "2", className: SEQ[step(v)], children: /* @__PURE__ */ jsx("title", { children: `${rowLabels[y]}${columnLabels?.[x] ? `, ${columnLabels[x]}` : ""}: ${valueFormat(v)}` }) }, `${x}-${y}`))
|
|
34
|
+
) }),
|
|
35
|
+
/* @__PURE__ */ jsxs("table", { className: "sr-only", children: [
|
|
36
|
+
/* @__PURE__ */ jsx("caption", { children: title }),
|
|
37
|
+
/* @__PURE__ */ jsx("tbody", { children: data.map((row, y) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
38
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: rowLabels[y] }),
|
|
39
|
+
row.map((v, x) => /* @__PURE__ */ jsx("td", { children: valueFormat(v) }, x))
|
|
40
|
+
] }, y)) })
|
|
41
|
+
] })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
function Funnel({ data, title, valueFormat = fmt, color = 1, className, ...props }) {
|
|
45
|
+
const top = Math.max(1, data[0]?.value ?? 1);
|
|
46
|
+
return /* @__PURE__ */ jsxs("figure", { "aria-label": title, className: cn("m-0 flex flex-col gap-2", className), ...props, children: [
|
|
47
|
+
data.map((d) => {
|
|
48
|
+
const pct = Math.max(0, d.value) / top;
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", { "aria-hidden": "true", className: "grid grid-cols-[8rem_1fr_4rem] items-center gap-3 text-body-sm", children: [
|
|
50
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-[var(--color-on-surface-variant)]", children: d.label }),
|
|
51
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 100 10", preserveAspectRatio: "none", className: "h-7 w-full", children: /* @__PURE__ */ jsx("rect", { x: (100 - pct * 100) / 2, y: "0", width: pct * 100, height: "10", rx: "1.5", className: FILL[ci(color)] }) }),
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: "text-end tabular-nums text-[var(--color-on-surface)]", children: valueFormat(d.value) })
|
|
53
|
+
] }, d.label);
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsxs("table", { className: "sr-only", children: [
|
|
56
|
+
/* @__PURE__ */ jsx("caption", { children: title }),
|
|
57
|
+
/* @__PURE__ */ jsx("tbody", { children: data.map((d) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
58
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: d.label }),
|
|
59
|
+
/* @__PURE__ */ jsx("td", { children: valueFormat(d.value) }),
|
|
60
|
+
/* @__PURE__ */ jsxs("td", { children: [
|
|
61
|
+
Math.round(Math.max(0, d.value) / top * 100),
|
|
62
|
+
"% of ",
|
|
63
|
+
data[0]?.label
|
|
64
|
+
] })
|
|
65
|
+
] }, d.label)) })
|
|
66
|
+
] })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
function KpiTile({ label, value, change, invert = false, trend, className, ...props }) {
|
|
70
|
+
const good = change === void 0 ? void 0 : invert ? change < 0 : change > 0;
|
|
71
|
+
const pct = change === void 0 ? "" : `${change > 0 ? "+" : change < 0 ? "\u2212" : ""}${Math.abs(change * 100).toFixed(1)}%`;
|
|
72
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-end justify-between gap-4 rounded-shape-container border border-[var(--color-outline-variant)] bg-[var(--color-surface-elevated)] p-4", className), ...props, children: [
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "text-label-md text-[var(--color-on-surface-variant)]", children: label }),
|
|
75
|
+
/* @__PURE__ */ jsx("span", { className: "text-headline-sm tabular-nums text-[var(--color-on-surface)]", children: value }),
|
|
76
|
+
change !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-label-md tabular-nums", good ? "text-[var(--color-success)]" : change === 0 ? "text-[var(--color-on-surface-variant)]" : "text-[var(--color-error)]"), children: [
|
|
77
|
+
pct,
|
|
78
|
+
" ",
|
|
79
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "versus last period" })
|
|
80
|
+
] })
|
|
81
|
+
] }),
|
|
82
|
+
trend && trend.length > 1 && /* @__PURE__ */ jsx(Sparkline, { values: trend, area: true, color: 1, className: "h-10 w-28 shrink-0" })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
Funnel,
|
|
87
|
+
Gauge,
|
|
88
|
+
Heatmap,
|
|
89
|
+
KpiTile
|
|
90
|
+
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { BarChart, LineChart, DonutChart, Sparkline, ChartLegend, niceMax, niceDomain } from './Chart.js';
|
|
2
|
+
export { Gauge, Heatmap, Funnel, KpiTile } from './MoreCharts.js';
|
|
3
|
+
export { ChartToggle } from './ChartToggle.js';
|
|
4
|
+
export type { ChartToggleProps } from './ChartToggle.js';
|
|
5
|
+
export type { GaugeProps, HeatmapProps, FunnelProps, KpiTileProps } from './MoreCharts.js';
|
|
2
6
|
export type { BarChartProps, LineChartProps, DonutChartProps, SparklineProps, ChartLegendProps, ChartSeries, ChartColor } from './Chart.js';
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { BarChart, LineChart, DonutChart, Sparkline, ChartLegend, niceMax, niceDomain } from "./Chart.js";
|
|
2
|
+
import { Gauge, Heatmap, Funnel, KpiTile } from "./MoreCharts.js";
|
|
3
|
+
import { ChartToggle } from "./ChartToggle.js";
|
|
2
4
|
export {
|
|
3
5
|
BarChart,
|
|
4
6
|
ChartLegend,
|
|
7
|
+
ChartToggle,
|
|
5
8
|
DonutChart,
|
|
9
|
+
Funnel,
|
|
10
|
+
Gauge,
|
|
11
|
+
Heatmap,
|
|
12
|
+
KpiTile,
|
|
6
13
|
LineChart,
|
|
7
14
|
Sparkline,
|
|
8
15
|
niceDomain,
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ export type { CelebrateProps } from './components/Celebrate/index.js';
|
|
|
47
47
|
export { Aurora } from './components/Aurora/index.js';
|
|
48
48
|
export type { AuroraProps } from './components/Aurora/index.js';
|
|
49
49
|
export { BarChart, LineChart, DonutChart, Sparkline, ChartLegend, niceMax, niceDomain } from './components/Chart/index.js';
|
|
50
|
+
export { Gauge, Heatmap, Funnel, KpiTile } from './components/Chart/index.js';
|
|
51
|
+
export { ChartToggle } from './components/Chart/index.js';
|
|
52
|
+
export type { ChartToggleProps } from './components/Chart/index.js';
|
|
53
|
+
export type { GaugeProps, HeatmapProps, FunnelProps, KpiTileProps } from './components/Chart/index.js';
|
|
50
54
|
export type { BarChartProps, LineChartProps, DonutChartProps, SparklineProps, ChartLegendProps, ChartSeries, ChartColor } from './components/Chart/index.js';
|
|
51
55
|
export type { AmountProps } from './components/Amount/index.js';
|
|
52
56
|
export { NumberTicker } from './components/NumberTicker/index.js';
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,8 @@ import { FloatingInput } from "./components/FloatingInput/index.js";
|
|
|
27
27
|
import { Celebrate } from "./components/Celebrate/index.js";
|
|
28
28
|
import { Aurora } from "./components/Aurora/index.js";
|
|
29
29
|
import { BarChart, LineChart, DonutChart, Sparkline, ChartLegend, niceMax, niceDomain } from "./components/Chart/index.js";
|
|
30
|
+
import { Gauge, Heatmap, Funnel, KpiTile } from "./components/Chart/index.js";
|
|
31
|
+
import { ChartToggle } from "./components/Chart/index.js";
|
|
30
32
|
import { NumberTicker } from "./components/NumberTicker/index.js";
|
|
31
33
|
import { SearchInput } from "./components/SearchInput/index.js";
|
|
32
34
|
import { PasswordInput } from "./components/PasswordInput/index.js";
|
|
@@ -137,6 +139,7 @@ export {
|
|
|
137
139
|
CardLink,
|
|
138
140
|
Celebrate,
|
|
139
141
|
ChartLegend,
|
|
142
|
+
ChartToggle,
|
|
140
143
|
CheckList,
|
|
141
144
|
CheckListItem,
|
|
142
145
|
Checkbox,
|
|
@@ -170,15 +173,19 @@ export {
|
|
|
170
173
|
FloatingInput,
|
|
171
174
|
FormError,
|
|
172
175
|
FormField,
|
|
176
|
+
Funnel,
|
|
177
|
+
Gauge,
|
|
173
178
|
GradientDivider,
|
|
174
179
|
Grid,
|
|
175
180
|
Heading,
|
|
181
|
+
Heatmap,
|
|
176
182
|
HelperText,
|
|
177
183
|
HoverCard,
|
|
178
184
|
IconButton,
|
|
179
185
|
Input,
|
|
180
186
|
Kbd,
|
|
181
187
|
KeyboardShortcut,
|
|
188
|
+
KpiTile,
|
|
182
189
|
Label,
|
|
183
190
|
LineChart,
|
|
184
191
|
Link,
|