iryx-ui 0.14.0 → 0.16.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/README.md +3 -1
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/AppShell.vue.d.ts +31 -6
- package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +68 -28
- package/dist/components/BarChart.vue.d.ts +10 -0
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +170 -152
- package/dist/components/DonutChart.js +5 -0
- package/dist/components/DonutChart.vue.d.ts +96 -0
- package/dist/components/DonutChart.vue_vue_type_script_setup_true_lang.js +234 -0
- package/dist/components/Drawer.vue.d.ts +1 -1
- package/dist/components/LineChart.vue.d.ts +26 -0
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +205 -139
- package/dist/components/Popover.vue.d.ts +1 -1
- package/dist/components/Sparkline.vue.d.ts +9 -0
- package/dist/components/Sparkline.vue_vue_type_script_setup_true_lang.js +90 -53
- package/dist/components/Stat.vue.d.ts +1 -1
- package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +140 -138
- package/dist/composables/cartesian.d.ts +17 -2
- package/dist/composables/cartesian.js +6 -1
- package/dist/composables/chart-reveal.d.ts +45 -0
- package/dist/composables/chart-reveal.js +93 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +147 -144
- package/dist/theme/app-shell.d.ts +42 -0
- package/dist/theme/app-shell.js +13 -1
- package/dist/theme/bar-chart.js +1 -1
- package/dist/theme/button.d.ts +2 -2
- package/dist/theme/button.js +1 -1
- package/dist/theme/command-palette.d.ts +3 -3
- package/dist/theme/donut-chart.d.ts +104 -0
- package/dist/theme/donut-chart.js +17 -0
- package/dist/theme/form.js +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/line-chart.js +2 -2
- package/dist/theme/sidebar.js +1 -1
- package/dist/theme/sparkline.js +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { extent as t, linearScale as n } from "../composables/scale.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useChartAnimation as r, useChartReveal as i } from "../composables/chart-reveal.js";
|
|
4
|
+
import { sparklineTheme as a } from "../theme/sparkline.js";
|
|
5
|
+
import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, openBlock as m, renderList as h, useId as g } from "vue";
|
|
5
6
|
//#region src/components/Sparkline.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
7
|
+
var _ = [
|
|
7
8
|
"viewBox",
|
|
8
9
|
"height",
|
|
9
10
|
"role",
|
|
10
11
|
"aria-label",
|
|
11
12
|
"aria-hidden"
|
|
12
|
-
],
|
|
13
|
+
], v = ["clip-path"], y = ["d", "fill"], b = ["d"], x = ["d"], S = ["d"], C = 100, w = /*@__PURE__*/ d({
|
|
13
14
|
__name: "Sparkline",
|
|
14
15
|
props: {
|
|
15
16
|
data: { default: () => [] },
|
|
@@ -21,6 +22,10 @@ var m = [
|
|
|
21
22
|
muted: { type: Boolean },
|
|
22
23
|
label: {},
|
|
23
24
|
height: { default: 32 },
|
|
25
|
+
animate: {
|
|
26
|
+
type: [Boolean, Object],
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
24
29
|
unstyled: {
|
|
25
30
|
type: Boolean,
|
|
26
31
|
default: void 0
|
|
@@ -28,83 +33,115 @@ var m = [
|
|
|
28
33
|
class: {},
|
|
29
34
|
ui: {}
|
|
30
35
|
},
|
|
31
|
-
setup(
|
|
32
|
-
let
|
|
33
|
-
let e =
|
|
36
|
+
setup(d) {
|
|
37
|
+
let w = d, T = e(), E = s(() => w.unstyled ?? T.unstyled), D = s(() => w.endDot ? 6 : 1), O = s(() => Math.max(w.height - D.value * 2, 1)), k = s(() => {
|
|
38
|
+
let e = w.data, r = t(e);
|
|
34
39
|
if (!r) return [];
|
|
35
|
-
let [i, a] = r, o =
|
|
40
|
+
let [i, a] = r, o = w.min ?? i, s = w.max ?? a, c = n([0, Math.max(e.length - 1, 0)], [0, C]), l = n([o, s], [C, 0]), u = [], d = [];
|
|
36
41
|
return e.forEach((e, t) => {
|
|
37
42
|
if (typeof e != "number" || !Number.isFinite(e)) {
|
|
38
43
|
d.length && u.push(d), d = [];
|
|
39
44
|
return;
|
|
40
45
|
}
|
|
41
46
|
d.push({
|
|
42
|
-
x:
|
|
43
|
-
y:
|
|
47
|
+
x: A(c(t)),
|
|
48
|
+
y: A(l(e))
|
|
44
49
|
});
|
|
45
50
|
}), d.length && u.push(d), u;
|
|
46
51
|
});
|
|
47
|
-
function
|
|
52
|
+
function A(e) {
|
|
48
53
|
return Math.round(e * 100) / 100;
|
|
49
54
|
}
|
|
50
|
-
function
|
|
55
|
+
function j(e) {
|
|
51
56
|
return e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x} ${e.y}`).join(" ");
|
|
52
57
|
}
|
|
53
|
-
let
|
|
54
|
-
let e = t(
|
|
55
|
-
if (!e) return
|
|
56
|
-
let r =
|
|
57
|
-
return
|
|
58
|
+
let M = s(() => {
|
|
59
|
+
let e = t(w.data);
|
|
60
|
+
if (!e) return C;
|
|
61
|
+
let r = w.min ?? e[0], i = w.max ?? e[1];
|
|
62
|
+
return w.baseline === "zero" && r <= 0 && i >= 0 ? A(n([r, i], [C, 0])(0)) : C;
|
|
58
63
|
});
|
|
59
|
-
function
|
|
64
|
+
function N(e) {
|
|
60
65
|
let t = e[0], n = e[e.length - 1];
|
|
61
|
-
return `${
|
|
66
|
+
return `${j(e)} L${n.x} ${M.value} L${t.x} ${M.value} Z`;
|
|
62
67
|
}
|
|
63
|
-
let
|
|
64
|
-
|
|
68
|
+
let P = r(s(() => w.animate)), { revealed: F } = i(s(() => k.value.length > 0), P), I = s(() => ({
|
|
69
|
+
transform: `scaleX(${+!!F.value})`,
|
|
70
|
+
transformOrigin: "0px 0px",
|
|
71
|
+
transition: `transform ${P.value.duration}ms ${P.value.css}`
|
|
72
|
+
})), L = s(() => ({
|
|
73
|
+
opacity: +!!F.value,
|
|
74
|
+
transition: `opacity ${Math.round(P.value.duration * .3)}ms ${P.value.css}`,
|
|
75
|
+
transitionDelay: `${Math.round(P.value.duration * .8)}ms`
|
|
76
|
+
})), R = `iryx-spark-clip-${g()}`, z = `iryx-spark-area-${g()}`, B = s(() => {
|
|
77
|
+
let e = k.value[k.value.length - 1];
|
|
65
78
|
return e?.[e.length - 1];
|
|
66
|
-
}),
|
|
67
|
-
function
|
|
68
|
-
let n =
|
|
69
|
-
return
|
|
79
|
+
}), V = s(() => a({ muted: w.muted }));
|
|
80
|
+
function H(e, t) {
|
|
81
|
+
let n = w.ui?.[e];
|
|
82
|
+
return E.value ? [n, t] : V.value[e]({ class: [n, t] });
|
|
70
83
|
}
|
|
71
|
-
return (e, t) => (
|
|
72
|
-
class:
|
|
73
|
-
style:
|
|
74
|
-
}, [(
|
|
75
|
-
viewBox: `0 0 ${
|
|
84
|
+
return (e, t) => (m(), l("span", {
|
|
85
|
+
class: f(H("root", w.class)),
|
|
86
|
+
style: p({ padding: `${D.value}px` })
|
|
87
|
+
}, [(m(), l("svg", {
|
|
88
|
+
viewBox: `0 0 ${C} ${C}`,
|
|
76
89
|
preserveAspectRatio: "none",
|
|
77
|
-
height:
|
|
78
|
-
style:
|
|
79
|
-
role:
|
|
80
|
-
"aria-label":
|
|
81
|
-
"aria-hidden":
|
|
82
|
-
class:
|
|
90
|
+
height: O.value,
|
|
91
|
+
style: p({ height: `${O.value}px` }),
|
|
92
|
+
role: w.label ? "img" : void 0,
|
|
93
|
+
"aria-label": w.label,
|
|
94
|
+
"aria-hidden": w.label ? void 0 : !0,
|
|
95
|
+
class: f(H("plot"))
|
|
83
96
|
}, [
|
|
84
|
-
|
|
97
|
+
u("defs", null, [u("linearGradient", {
|
|
98
|
+
id: z,
|
|
99
|
+
gradientUnits: "userSpaceOnUse",
|
|
100
|
+
x1: 0,
|
|
101
|
+
y1: 0,
|
|
102
|
+
x2: 0,
|
|
103
|
+
y2: C
|
|
104
|
+
}, [...t[0] ||= [u("stop", {
|
|
105
|
+
offset: "0%",
|
|
106
|
+
"stop-color": "currentColor",
|
|
107
|
+
"stop-opacity": "0.35"
|
|
108
|
+
}, null, -1), u("stop", {
|
|
109
|
+
offset: "100%",
|
|
110
|
+
"stop-color": "currentColor",
|
|
111
|
+
"stop-opacity": "0"
|
|
112
|
+
}, null, -1)]]), u("clipPath", { id: R }, [u("rect", {
|
|
113
|
+
x: "0",
|
|
114
|
+
y: "0",
|
|
115
|
+
width: C,
|
|
116
|
+
height: C,
|
|
117
|
+
style: p(I.value)
|
|
118
|
+
}, null, 4)])]),
|
|
119
|
+
u("g", { "clip-path": `url(#${R})` }, [(m(!0), l(o, null, h(w.variant === "area" ? k.value : [], (e, t) => (m(), l("path", {
|
|
85
120
|
key: `area-${t}`,
|
|
86
|
-
d:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
(
|
|
121
|
+
d: N(e),
|
|
122
|
+
fill: `url(#${z})`,
|
|
123
|
+
class: f(H("area"))
|
|
124
|
+
}, null, 10, y))), 128)), (m(!0), l(o, null, h(k.value, (e, t) => (m(), l("path", {
|
|
90
125
|
key: `line-${t}`,
|
|
91
|
-
d:
|
|
126
|
+
d: j(e),
|
|
92
127
|
"vector-effect": "non-scaling-stroke",
|
|
93
|
-
class:
|
|
94
|
-
}, null, 10,
|
|
95
|
-
|
|
96
|
-
d: `M${
|
|
128
|
+
class: f(H("line"))
|
|
129
|
+
}, null, 10, b))), 128))], 8, v),
|
|
130
|
+
w.endDot && B.value ? (m(), l(o, { key: 0 }, [u("path", {
|
|
131
|
+
d: `M${B.value.x} ${B.value.y} L${B.value.x} ${B.value.y}`,
|
|
97
132
|
"stroke-width": "12",
|
|
98
133
|
"vector-effect": "non-scaling-stroke",
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
134
|
+
style: p(L.value),
|
|
135
|
+
class: f(H("ring"))
|
|
136
|
+
}, null, 14, x), u("path", {
|
|
137
|
+
d: `M${B.value.x} ${B.value.y} L${B.value.x} ${B.value.y}`,
|
|
102
138
|
"stroke-width": "8",
|
|
103
139
|
"vector-effect": "non-scaling-stroke",
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
140
|
+
style: p(L.value),
|
|
141
|
+
class: f(H("dot"))
|
|
142
|
+
}, null, 14, S)], 64)) : c("", !0)
|
|
143
|
+
], 14, _))], 6));
|
|
107
144
|
}
|
|
108
145
|
});
|
|
109
146
|
//#endregion
|
|
110
|
-
export {
|
|
147
|
+
export { w as default };
|
|
@@ -24,35 +24,35 @@ var x = /*@__PURE__*/ u({
|
|
|
24
24
|
ui: {}
|
|
25
25
|
},
|
|
26
26
|
setup(u) {
|
|
27
|
-
let x = u, S = r(() => x.
|
|
27
|
+
let x = u, S = r(() => x.delta == null || x.delta === 0 ? "neutral" : x.delta > 0 ? "up" : "down"), C = r(() => x.trend ?? S.value), w = r(() => ({
|
|
28
28
|
up: y,
|
|
29
29
|
down: _,
|
|
30
30
|
neutral: v
|
|
31
|
-
})[S.value]),
|
|
31
|
+
})[S.value]), T = r(() => {
|
|
32
32
|
if (x.delta != null) return x.formatDelta ? x.formatDelta(x.delta) : `${x.delta > 0 ? "+" : ""}${x.delta}%`;
|
|
33
|
-
}),
|
|
33
|
+
}), E = e(), D = r(() => x.unstyled ?? E.unstyled), O = r(() => n({
|
|
34
34
|
size: x.size,
|
|
35
|
-
trend:
|
|
36
|
-
})),
|
|
35
|
+
trend: C.value
|
|
36
|
+
})), k = r(() => D.value ? [x.ui?.root, x.class] : O.value.root({ class: [x.ui?.root, x.class] })), A = r(() => D.value ? x.ui?.label : O.value.label({ class: x.ui?.label })), j = r(() => D.value ? x.ui?.value : O.value.value({ class: x.ui?.value })), M = r(() => D.value ? x.ui?.delta : O.value.delta({ class: x.ui?.delta })), N = r(() => D.value ? x.ui?.hint : O.value.hint({ class: x.ui?.hint })), P = r(() => D.value ? x.ui?.row : O.value.row({ class: x.ui?.row }));
|
|
37
37
|
return (e, n) => (f(), i(h(b), {
|
|
38
38
|
as: x.as,
|
|
39
|
-
class: d(
|
|
39
|
+
class: d(k.value)
|
|
40
40
|
}, {
|
|
41
41
|
default: g(() => [
|
|
42
42
|
x.label || e.$slots.label ? (f(), o("span", {
|
|
43
43
|
key: 0,
|
|
44
|
-
class: d(
|
|
44
|
+
class: d(A.value)
|
|
45
45
|
}, [p(e.$slots, "label", {}, () => [c(m(x.label), 1)])], 2)) : a("", !0),
|
|
46
|
-
s("span", { class: d(
|
|
46
|
+
s("span", { class: d(P.value) }, [s("span", { class: d(j.value) }, [p(e.$slots, "default", {}, () => [c(m(x.value), 1)])], 2), T.value || e.$slots.delta ? (f(), o("span", {
|
|
47
47
|
key: 0,
|
|
48
|
-
class: d(
|
|
49
|
-
}, [p(e.$slots, "delta", { trend:
|
|
50
|
-
icon:
|
|
48
|
+
class: d(M.value)
|
|
49
|
+
}, [p(e.$slots, "delta", { trend: C.value }, () => [l(t, {
|
|
50
|
+
icon: w.value,
|
|
51
51
|
"data-icon": "inline-start"
|
|
52
|
-
}, null, 8, ["icon"]), c(" " + m(
|
|
52
|
+
}, null, 8, ["icon"]), c(" " + m(T.value), 1)])], 2)) : a("", !0)], 2),
|
|
53
53
|
x.hint || e.$slots.hint ? (f(), o("span", {
|
|
54
54
|
key: 1,
|
|
55
|
-
class: d(
|
|
55
|
+
class: d(N.value)
|
|
56
56
|
}, [p(e.$slots, "hint", {}, () => [c(m(x.hint), 1)])], 2)) : a("", !0)
|
|
57
57
|
]),
|
|
58
58
|
_: 3
|
|
@@ -24,6 +24,7 @@ export { default as ContextMenu } from './ContextMenu.vue';
|
|
|
24
24
|
export { default as DatePicker } from './DatePicker.vue';
|
|
25
25
|
export { default as DateRangePicker } from './DateRangePicker.vue';
|
|
26
26
|
export { default as Dialog } from './Dialog.vue';
|
|
27
|
+
export { default as DonutChart } from './DonutChart.vue';
|
|
27
28
|
export { default as Drawer } from './Drawer.vue';
|
|
28
29
|
export { default as DropdownMenu } from './DropdownMenu.vue';
|
|
29
30
|
export { default as EmptyState } from './EmptyState.vue';
|
package/dist/components/index.js
CHANGED
|
@@ -3,148 +3,150 @@ import t from "./Icon.js";
|
|
|
3
3
|
import n from "./Accordion.js";
|
|
4
4
|
import r from "./Alert.js";
|
|
5
5
|
import i from "./App.js";
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
8
|
-
import s from "./
|
|
9
|
-
import c from "./
|
|
10
|
-
import l from "./
|
|
11
|
-
import u from "./
|
|
12
|
-
import d from "./
|
|
13
|
-
import f from "./
|
|
14
|
-
import p from "./
|
|
15
|
-
import m from "./
|
|
16
|
-
import h from "./
|
|
17
|
-
import g from "./
|
|
18
|
-
import _ from "./
|
|
19
|
-
import v from "./
|
|
20
|
-
import y from "./
|
|
21
|
-
import b from "./
|
|
22
|
-
import x from "./
|
|
23
|
-
import S from "./
|
|
24
|
-
import C from "./
|
|
25
|
-
import w from "./
|
|
26
|
-
import T from "./
|
|
27
|
-
import E from "./
|
|
28
|
-
import D from "./
|
|
29
|
-
import O from "./
|
|
30
|
-
import k from "./
|
|
31
|
-
import A from "./
|
|
32
|
-
import j from "./
|
|
33
|
-
import M from "./
|
|
34
|
-
import N from "./
|
|
35
|
-
import P from "./
|
|
36
|
-
import F from "./
|
|
37
|
-
import I from "./
|
|
38
|
-
import L from "./
|
|
39
|
-
import R from "./
|
|
40
|
-
import z from "./
|
|
41
|
-
import B from "./
|
|
42
|
-
import V from "./
|
|
43
|
-
import H from "./
|
|
44
|
-
import U from "./
|
|
45
|
-
import W from "./
|
|
46
|
-
import G from "./
|
|
47
|
-
import K from "./
|
|
48
|
-
import q from "./
|
|
49
|
-
import J from "./
|
|
50
|
-
import Y from "./
|
|
51
|
-
import X from "./
|
|
52
|
-
import Z from "./
|
|
53
|
-
import Q from "./
|
|
54
|
-
import $ from "./
|
|
55
|
-
import ee from "./
|
|
56
|
-
import te from "./
|
|
57
|
-
import ne from "./
|
|
58
|
-
import re from "./
|
|
59
|
-
import ie from "./
|
|
60
|
-
import ae from "./
|
|
61
|
-
import oe from "./
|
|
62
|
-
import se from "./
|
|
63
|
-
import ce from "./
|
|
64
|
-
import le from "./
|
|
65
|
-
import ue from "./
|
|
66
|
-
import de from "./
|
|
67
|
-
import fe from "./
|
|
68
|
-
import pe from "./
|
|
69
|
-
import me from "./
|
|
70
|
-
import he from "./
|
|
71
|
-
import ge from "./
|
|
72
|
-
import _e from "./
|
|
73
|
-
import ve from "./
|
|
6
|
+
import a from "./Drawer.js";
|
|
7
|
+
import o from "./AppShell.js";
|
|
8
|
+
import s from "./AspectRatio.js";
|
|
9
|
+
import c from "./Avatar.js";
|
|
10
|
+
import l from "./AvatarGroup.js";
|
|
11
|
+
import u from "./Badge.js";
|
|
12
|
+
import d from "./Banner.js";
|
|
13
|
+
import f from "./ChartLegend.js";
|
|
14
|
+
import p from "./BarChart.js";
|
|
15
|
+
import m from "./Breadcrumb.js";
|
|
16
|
+
import h from "./Button.js";
|
|
17
|
+
import g from "./ButtonGroup.js";
|
|
18
|
+
import _ from "./Card.js";
|
|
19
|
+
import v from "./Checkbox.js";
|
|
20
|
+
import y from "./Collapsible.js";
|
|
21
|
+
import b from "./ColorPicker.js";
|
|
22
|
+
import x from "./Combobox.js";
|
|
23
|
+
import S from "./Kbd.js";
|
|
24
|
+
import C from "./CommandPalette.js";
|
|
25
|
+
import w from "./Dialog.js";
|
|
26
|
+
import T from "./ConfirmDialog.js";
|
|
27
|
+
import E from "./Container.js";
|
|
28
|
+
import D from "./ContextMenu.js";
|
|
29
|
+
import O from "./DatePicker.js";
|
|
30
|
+
import k from "./DateRangePicker.js";
|
|
31
|
+
import A from "./DonutChart.js";
|
|
32
|
+
import j from "./DropdownMenu.js";
|
|
33
|
+
import M from "./EmptyState.js";
|
|
34
|
+
import N from "./FileUpload.js";
|
|
35
|
+
import P from "./Form.js";
|
|
36
|
+
import F from "./Label.js";
|
|
37
|
+
import I from "./FormField.js";
|
|
38
|
+
import L from "./Input.js";
|
|
39
|
+
import R from "./LineChart.js";
|
|
40
|
+
import z from "./Menubar.js";
|
|
41
|
+
import B from "./NavigationMenu.js";
|
|
42
|
+
import V from "./NumberInput.js";
|
|
43
|
+
import H from "./PageHeader.js";
|
|
44
|
+
import U from "./Pagination.js";
|
|
45
|
+
import W from "./PasswordInput.js";
|
|
46
|
+
import G from "./PinInput.js";
|
|
47
|
+
import K from "./Popover.js";
|
|
48
|
+
import q from "./Progress.js";
|
|
49
|
+
import J from "./RadioGroup.js";
|
|
50
|
+
import Y from "./ScrollArea.js";
|
|
51
|
+
import X from "./ScrollFade.js";
|
|
52
|
+
import Z from "./Select.js";
|
|
53
|
+
import Q from "./Separator.js";
|
|
54
|
+
import $ from "./Sidebar.js";
|
|
55
|
+
import ee from "./SignaturePad.js";
|
|
56
|
+
import te from "./Skeleton.js";
|
|
57
|
+
import ne from "./Slider.js";
|
|
58
|
+
import re from "./Sparkline.js";
|
|
59
|
+
import ie from "./Splitter.js";
|
|
60
|
+
import ae from "./Stat.js";
|
|
61
|
+
import oe from "./Stepper.js";
|
|
62
|
+
import se from "./Switch.js";
|
|
63
|
+
import ce from "./Table.js";
|
|
64
|
+
import le from "./Tabs.js";
|
|
65
|
+
import ue from "./TagsInput.js";
|
|
66
|
+
import de from "./Textarea.js";
|
|
67
|
+
import fe from "./TimeField.js";
|
|
68
|
+
import pe from "./Timeline.js";
|
|
69
|
+
import me from "./Toaster.js";
|
|
70
|
+
import he from "./Toggle.js";
|
|
71
|
+
import ge from "./ToggleGroup.js";
|
|
72
|
+
import _e from "./Toolbar.js";
|
|
73
|
+
import ve from "./Tooltip.js";
|
|
74
|
+
import ye from "./Tree.js";
|
|
74
75
|
//#region src/components/index.ts
|
|
75
|
-
var
|
|
76
|
+
var be = /* @__PURE__ */ e({
|
|
76
77
|
Accordion: () => n,
|
|
77
78
|
Alert: () => r,
|
|
78
79
|
App: () => i,
|
|
79
|
-
AppShell: () =>
|
|
80
|
-
AspectRatio: () =>
|
|
81
|
-
Avatar: () =>
|
|
82
|
-
AvatarGroup: () =>
|
|
83
|
-
Badge: () =>
|
|
84
|
-
Banner: () =>
|
|
85
|
-
BarChart: () =>
|
|
86
|
-
Breadcrumb: () =>
|
|
87
|
-
Button: () =>
|
|
88
|
-
ButtonGroup: () =>
|
|
89
|
-
Card: () =>
|
|
90
|
-
ChartLegend: () =>
|
|
91
|
-
Checkbox: () =>
|
|
92
|
-
Collapsible: () =>
|
|
93
|
-
ColorPicker: () =>
|
|
94
|
-
Combobox: () =>
|
|
95
|
-
CommandPalette: () =>
|
|
96
|
-
ConfirmDialog: () =>
|
|
97
|
-
Container: () =>
|
|
98
|
-
ContextMenu: () =>
|
|
99
|
-
DatePicker: () =>
|
|
100
|
-
DateRangePicker: () =>
|
|
101
|
-
Dialog: () =>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
80
|
+
AppShell: () => o,
|
|
81
|
+
AspectRatio: () => s,
|
|
82
|
+
Avatar: () => c,
|
|
83
|
+
AvatarGroup: () => l,
|
|
84
|
+
Badge: () => u,
|
|
85
|
+
Banner: () => d,
|
|
86
|
+
BarChart: () => p,
|
|
87
|
+
Breadcrumb: () => m,
|
|
88
|
+
Button: () => h,
|
|
89
|
+
ButtonGroup: () => g,
|
|
90
|
+
Card: () => _,
|
|
91
|
+
ChartLegend: () => f,
|
|
92
|
+
Checkbox: () => v,
|
|
93
|
+
Collapsible: () => y,
|
|
94
|
+
ColorPicker: () => b,
|
|
95
|
+
Combobox: () => x,
|
|
96
|
+
CommandPalette: () => C,
|
|
97
|
+
ConfirmDialog: () => T,
|
|
98
|
+
Container: () => E,
|
|
99
|
+
ContextMenu: () => D,
|
|
100
|
+
DatePicker: () => O,
|
|
101
|
+
DateRangePicker: () => k,
|
|
102
|
+
Dialog: () => w,
|
|
103
|
+
DonutChart: () => A,
|
|
104
|
+
Drawer: () => a,
|
|
105
|
+
DropdownMenu: () => j,
|
|
106
|
+
EmptyState: () => M,
|
|
107
|
+
FileUpload: () => N,
|
|
108
|
+
Form: () => P,
|
|
109
|
+
FormField: () => I,
|
|
108
110
|
Icon: () => t,
|
|
109
|
-
Input: () =>
|
|
110
|
-
Kbd: () =>
|
|
111
|
-
Label: () =>
|
|
112
|
-
LineChart: () =>
|
|
113
|
-
Menubar: () =>
|
|
114
|
-
NavigationMenu: () =>
|
|
115
|
-
NumberInput: () =>
|
|
116
|
-
PageHeader: () =>
|
|
117
|
-
Pagination: () =>
|
|
118
|
-
PasswordInput: () =>
|
|
119
|
-
PinInput: () =>
|
|
120
|
-
Popover: () =>
|
|
121
|
-
Progress: () =>
|
|
122
|
-
RadioGroup: () =>
|
|
123
|
-
ScrollArea: () =>
|
|
124
|
-
ScrollFade: () =>
|
|
125
|
-
Select: () =>
|
|
126
|
-
Separator: () =>
|
|
127
|
-
Sidebar: () =>
|
|
128
|
-
SignaturePad: () =>
|
|
129
|
-
Skeleton: () =>
|
|
130
|
-
Slider: () =>
|
|
131
|
-
Sparkline: () =>
|
|
132
|
-
Splitter: () =>
|
|
133
|
-
Stat: () =>
|
|
134
|
-
Stepper: () =>
|
|
135
|
-
Switch: () =>
|
|
136
|
-
Table: () =>
|
|
137
|
-
Tabs: () =>
|
|
138
|
-
TagsInput: () =>
|
|
139
|
-
Textarea: () =>
|
|
140
|
-
TimeField: () =>
|
|
141
|
-
Timeline: () =>
|
|
142
|
-
Toaster: () =>
|
|
143
|
-
Toggle: () =>
|
|
144
|
-
ToggleGroup: () =>
|
|
145
|
-
Toolbar: () =>
|
|
146
|
-
Tooltip: () =>
|
|
147
|
-
Tree: () =>
|
|
111
|
+
Input: () => L,
|
|
112
|
+
Kbd: () => S,
|
|
113
|
+
Label: () => F,
|
|
114
|
+
LineChart: () => R,
|
|
115
|
+
Menubar: () => z,
|
|
116
|
+
NavigationMenu: () => B,
|
|
117
|
+
NumberInput: () => V,
|
|
118
|
+
PageHeader: () => H,
|
|
119
|
+
Pagination: () => U,
|
|
120
|
+
PasswordInput: () => W,
|
|
121
|
+
PinInput: () => G,
|
|
122
|
+
Popover: () => K,
|
|
123
|
+
Progress: () => q,
|
|
124
|
+
RadioGroup: () => J,
|
|
125
|
+
ScrollArea: () => Y,
|
|
126
|
+
ScrollFade: () => X,
|
|
127
|
+
Select: () => Z,
|
|
128
|
+
Separator: () => Q,
|
|
129
|
+
Sidebar: () => $,
|
|
130
|
+
SignaturePad: () => ee,
|
|
131
|
+
Skeleton: () => te,
|
|
132
|
+
Slider: () => ne,
|
|
133
|
+
Sparkline: () => re,
|
|
134
|
+
Splitter: () => ie,
|
|
135
|
+
Stat: () => ae,
|
|
136
|
+
Stepper: () => oe,
|
|
137
|
+
Switch: () => se,
|
|
138
|
+
Table: () => ce,
|
|
139
|
+
Tabs: () => le,
|
|
140
|
+
TagsInput: () => ue,
|
|
141
|
+
Textarea: () => de,
|
|
142
|
+
TimeField: () => fe,
|
|
143
|
+
Timeline: () => pe,
|
|
144
|
+
Toaster: () => me,
|
|
145
|
+
Toggle: () => he,
|
|
146
|
+
ToggleGroup: () => ge,
|
|
147
|
+
Toolbar: () => _e,
|
|
148
|
+
Tooltip: () => ve,
|
|
149
|
+
Tree: () => ye
|
|
148
150
|
});
|
|
149
151
|
//#endregion
|
|
150
|
-
export {
|
|
152
|
+
export { be as components_exports };
|
|
@@ -62,6 +62,13 @@ export interface CartesianLayout {
|
|
|
62
62
|
labelStep: number;
|
|
63
63
|
/** Centre of a category slot, in px along the category axis. */
|
|
64
64
|
bandCentre: (index: number) => number;
|
|
65
|
+
/**
|
|
66
|
+
* Where a *point* sits, as against the middle of a band. The first lands
|
|
67
|
+
* on the left edge of the plot and the last on the right, so a line spans
|
|
68
|
+
* the full width instead of floating half a band clear of both sides.
|
|
69
|
+
* Bars want `bandCentre`; lines and areas want this.
|
|
70
|
+
*/
|
|
71
|
+
pointAt: (index: number) => number;
|
|
65
72
|
}
|
|
66
73
|
export declare function cartesianLayout(input: CartesianInput): CartesianLayout;
|
|
67
74
|
/** One plotted measure. `key` reads a field off each row; `name` labels it. */
|
|
@@ -93,8 +100,16 @@ export declare const SERIES_SLOTS = 8;
|
|
|
93
100
|
* than saying so.
|
|
94
101
|
*/
|
|
95
102
|
export declare function seriesColor(index: number): string;
|
|
96
|
-
/**
|
|
97
|
-
|
|
103
|
+
/**
|
|
104
|
+
* A series' palette slot: pinned if it has one, otherwise its position.
|
|
105
|
+
*
|
|
106
|
+
* Typed on the pin alone rather than on `ChartSeries`, so the charts with no
|
|
107
|
+
* second axis — a donut's rows are their own identity — can share the rule
|
|
108
|
+
* without inventing a `key` they have no use for.
|
|
109
|
+
*/
|
|
110
|
+
export declare function slotOf(entry: {
|
|
111
|
+
slot?: number;
|
|
112
|
+
}, index: number): number;
|
|
98
113
|
/**
|
|
99
114
|
* Dev-only warning.
|
|
100
115
|
*
|
|
@@ -16,7 +16,12 @@ function s(i) {
|
|
|
16
16
|
y: m,
|
|
17
17
|
bandWidth: g,
|
|
18
18
|
labelStep: y,
|
|
19
|
-
bandCentre: (e) => _ + g * (e + .5)
|
|
19
|
+
bandCentre: (e) => _ + g * (e + .5),
|
|
20
|
+
pointAt: (e) => {
|
|
21
|
+
if (i.categories <= 1) return _ + h / 2;
|
|
22
|
+
let t = g * .25, n = h - t * 2;
|
|
23
|
+
return _ + t + n * e / (i.categories - 1);
|
|
24
|
+
}
|
|
20
25
|
};
|
|
21
26
|
}
|
|
22
27
|
var c = 8;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The reveal every chart plays on its first paint, once per instance — a
|
|
4
|
+
* dashboard that re-animated on every poll would read as a fault.
|
|
5
|
+
*
|
|
6
|
+
* A CSS transition where the marks can be transformed, a per-frame value
|
|
7
|
+
* where they cannot: `d` is not an animatable property, so a donut has to
|
|
8
|
+
* recompute its geometry.
|
|
9
|
+
*/
|
|
10
|
+
export declare const REVEAL_DURATION = 700;
|
|
11
|
+
/**
|
|
12
|
+
* A closed set rather than any CSS timing function: the same curve is handed
|
|
13
|
+
* to CSS as a string and solved in JavaScript for the donut, so both come
|
|
14
|
+
* from one set of control points.
|
|
15
|
+
*/
|
|
16
|
+
export type ChartEasing = 'ease-out' | 'ease-in' | 'ease-in-out' | 'linear';
|
|
17
|
+
export interface ChartAnimation {
|
|
18
|
+
/** How long the reveal runs, in ms. */
|
|
19
|
+
duration?: number;
|
|
20
|
+
easing?: ChartEasing;
|
|
21
|
+
}
|
|
22
|
+
/** `false` turns the reveal off; an object tunes it. */
|
|
23
|
+
export type ChartAnimate = boolean | ChartAnimation;
|
|
24
|
+
export interface ResolvedAnimation {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
duration: number;
|
|
27
|
+
/** The curve as a CSS timing function. */
|
|
28
|
+
css: string;
|
|
29
|
+
/** The same curve, solved: progress in, eased progress out. */
|
|
30
|
+
ease: (t: number) => number;
|
|
31
|
+
}
|
|
32
|
+
export declare function useChartAnimation(animate: Ref<ChartAnimate | undefined>): import("vue").ComputedRef<ResolvedAnimation>;
|
|
33
|
+
/**
|
|
34
|
+
* `false` for the first painted frame, `true` from the next — which is what
|
|
35
|
+
* makes a transition run. Gated on `ready` rather than on mount: a chart with
|
|
36
|
+
* no measured width yet would animate an empty box and be finished before the
|
|
37
|
+
* `ResizeObserver` reported.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useChartReveal(ready: Ref<boolean>, animation: Ref<ResolvedAnimation>): {
|
|
40
|
+
revealed: Ref<boolean, boolean>;
|
|
41
|
+
};
|
|
42
|
+
/** Eased 0 to 1, for marks that have to be recomputed to be revealed. */
|
|
43
|
+
export declare function useChartProgress(ready: Ref<boolean>, animation: Ref<ResolvedAnimation>): {
|
|
44
|
+
progress: Ref<number, number>;
|
|
45
|
+
};
|