@heyramzi/ui 2.19.0 → 2.19.1
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/charts/index.js +1 -0
- package/dist/charts/motion.js +1 -1
- package/package.json +1 -1
- package/src/charts/area-chart.svelte +1 -0
- package/src/charts/bar-chart.svelte +1 -0
- package/src/charts/chart-tokens.css +36 -0
- package/src/charts/charts.css +0 -32
- package/src/charts/donut-chart.svelte +1 -0
- package/src/charts/figure.svelte +1 -0
- package/src/charts/gauge-chart.svelte +1 -0
- package/src/charts/index.ts +1 -0
- package/src/charts/legend.svelte +1 -0
- package/src/charts/line-chart.svelte +1 -0
- package/src/charts/motion.ts +1 -1
- package/src/charts/number-chart.svelte +1 -0
- package/src/charts/ring-chart.svelte +1 -0
- package/src/charts/sparkline.svelte +1 -0
- package/src/charts/stat-card.svelte +1 -0
- package/src/charts/time-series-chart.svelte +1 -0
package/dist/charts/index.js
CHANGED
package/dist/charts/motion.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cubicInOut } from "svelte/easing";
|
|
2
|
-
/** Mirrors `--chart-motion-reveal` in
|
|
2
|
+
/** Mirrors `--chart-motion-reveal` in chart-tokens.css, for when no element is mounted to read it from. */
|
|
3
3
|
export const REVEAL_MS = 1100;
|
|
4
4
|
/** Rescales the axes when the data changes; the first render never animates. */
|
|
5
5
|
export const DOMAIN_MOTION = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyramzi/ui",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.1",
|
|
4
4
|
"description": "Svelte 5 UI for apps: primitives, effects and animations, plus work (tasks and docs), charts, slides, an editor, onboarding and a canvas as subpaths.",
|
|
5
5
|
"homepage": "https://ui.heyramzi.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// =========================
|
|
3
3
|
// IMPORTS
|
|
4
4
|
// =========================
|
|
5
|
+
import "./chart-tokens.css";
|
|
5
6
|
import "./area-chart.css";
|
|
6
7
|
import { Area, Axis, Chart, Highlight, LinearGradient, Spline, Svg, Tooltip } from "layerchart";
|
|
7
8
|
import { curveMonotoneX } from "d3-shape";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Each chart imports these beside its own stylesheet, so a deep import such as
|
|
2
|
+
`@heyramzi/ui/charts/dashboard` keeps its card edge without the barrel. */
|
|
3
|
+
|
|
4
|
+
/* Shared chart tokens, held at zero specificity by `:where()`. The reveal pair
|
|
5
|
+
is the entrance every chart shares; motion.ts mirrors its duration. */
|
|
6
|
+
:where(
|
|
7
|
+
.hr-area-chart,
|
|
8
|
+
.hr-bar-chart,
|
|
9
|
+
.hr-line-chart,
|
|
10
|
+
.hr-sparkline,
|
|
11
|
+
.hr-number-chart,
|
|
12
|
+
.hr-stat-card,
|
|
13
|
+
.hr-legend,
|
|
14
|
+
.hr-ts-chart,
|
|
15
|
+
.hr-donut-chart,
|
|
16
|
+
.hr-ring,
|
|
17
|
+
.hr-gauge
|
|
18
|
+
) {
|
|
19
|
+
--chart-label: var(--muted-foreground, oklch(0.5 0.01 286));
|
|
20
|
+
--chart-grid: color-mix(in srgb, var(--border, oklch(0.5 0.01 286)) 50%, transparent);
|
|
21
|
+
--chart-ease-out: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
|
|
22
|
+
--chart-motion-fast: var(--duration-quick, 150ms);
|
|
23
|
+
--chart-motion: var(--duration-fast, 250ms);
|
|
24
|
+
--chart-motion-slow: 800ms;
|
|
25
|
+
--chart-motion-reveal: 1100ms;
|
|
26
|
+
--chart-ease-reveal: cubic-bezier(0.85, 0, 0.15, 1);
|
|
27
|
+
--chart-stagger: 30ms;
|
|
28
|
+
--chart-crosshair: color-mix(
|
|
29
|
+
in srgb,
|
|
30
|
+
var(--muted-foreground, oklch(0.5 0.01 286)) 60%,
|
|
31
|
+
transparent
|
|
32
|
+
);
|
|
33
|
+
/* The card step draws its own hairline, so a chart card carries no border of its own. */
|
|
34
|
+
--chart-card-shadow: var(--elev-card);
|
|
35
|
+
--chart-card-shadow-hover: var(--elev-card-hover);
|
|
36
|
+
}
|
package/src/charts/charts.css
CHANGED
|
@@ -67,38 +67,6 @@
|
|
|
67
67
|
font-variant-numeric: tabular-nums;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
/* Shared chart tokens, held at zero specificity by `:where()`. The reveal pair
|
|
71
|
-
is the entrance every chart shares; motion.ts mirrors its duration. */
|
|
72
|
-
:where(
|
|
73
|
-
.hr-area-chart,
|
|
74
|
-
.hr-bar-chart,
|
|
75
|
-
.hr-line-chart,
|
|
76
|
-
.hr-sparkline,
|
|
77
|
-
.hr-number-chart,
|
|
78
|
-
.hr-stat-card,
|
|
79
|
-
.hr-legend,
|
|
80
|
-
.hr-ts-chart,
|
|
81
|
-
.hr-donut-chart,
|
|
82
|
-
.hr-ring,
|
|
83
|
-
.hr-gauge
|
|
84
|
-
) {
|
|
85
|
-
--chart-label: var(--muted-foreground, oklch(0.5 0.01 286));
|
|
86
|
-
--chart-grid: color-mix(in srgb, var(--border, oklch(0.5 0.01 286)) 65%, transparent);
|
|
87
|
-
--chart-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
|
88
|
-
--chart-motion-fast: 150ms;
|
|
89
|
-
--chart-motion: 250ms;
|
|
90
|
-
--chart-motion-slow: 800ms;
|
|
91
|
-
--chart-motion-reveal: 1100ms;
|
|
92
|
-
--chart-ease-reveal: cubic-bezier(0.85, 0, 0.15, 1);
|
|
93
|
-
--chart-stagger: 30ms;
|
|
94
|
-
--chart-crosshair: color-mix(
|
|
95
|
-
in srgb,
|
|
96
|
-
var(--muted-foreground, oklch(0.5 0.01 286)) 60%,
|
|
97
|
-
transparent
|
|
98
|
-
);
|
|
99
|
-
--chart-card-shadow: 0 1px 2px 0 oklch(0 0 0 / 0.04), 0 1px 3px 0 oklch(0 0 0 / 0.06);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
70
|
/* Axis labels, grid rules and hover highlights for every chart, defined once.
|
|
103
71
|
`:where()` keeps specificity at 0 so a component can still override them. */
|
|
104
72
|
:where(
|
package/src/charts/figure.svelte
CHANGED
package/src/charts/index.ts
CHANGED
package/src/charts/legend.svelte
CHANGED
package/src/charts/motion.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cubicInOut } from "svelte/easing";
|
|
2
2
|
|
|
3
|
-
/** Mirrors `--chart-motion-reveal` in
|
|
3
|
+
/** Mirrors `--chart-motion-reveal` in chart-tokens.css, for when no element is mounted to read it from. */
|
|
4
4
|
export const REVEAL_MS = 1100;
|
|
5
5
|
|
|
6
6
|
/** Rescales the axes when the data changes; the first render never animates. */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// =========================
|
|
3
3
|
// IMPORTS
|
|
4
4
|
// =========================
|
|
5
|
+
import "./chart-tokens.css";
|
|
5
6
|
import "./sparkline.css";
|
|
6
7
|
import { Area, Chart, Highlight, LinearGradient, Points, Spline, Svg, Tooltip } from "layerchart";
|
|
7
8
|
import { curveMonotoneX } from "d3-shape";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// =========================
|
|
3
3
|
// IMPORTS
|
|
4
4
|
// =========================
|
|
5
|
+
import "./chart-tokens.css";
|
|
5
6
|
import "./stat-card.css";
|
|
6
7
|
import { Area, Bars, Chart, Highlight, LinearGradient, Spline, Svg, Tooltip } from "layerchart";
|
|
7
8
|
import { scaleBand } from "d3-scale";
|