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.
Files changed (40) hide show
  1. package/README.md +3 -1
  2. package/dist/component-names.d.ts +1 -1
  3. package/dist/component-names.js +1 -1
  4. package/dist/components/AppShell.vue.d.ts +31 -6
  5. package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +68 -28
  6. package/dist/components/BarChart.vue.d.ts +10 -0
  7. package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +170 -152
  8. package/dist/components/DonutChart.js +5 -0
  9. package/dist/components/DonutChart.vue.d.ts +96 -0
  10. package/dist/components/DonutChart.vue_vue_type_script_setup_true_lang.js +234 -0
  11. package/dist/components/Drawer.vue.d.ts +1 -1
  12. package/dist/components/LineChart.vue.d.ts +26 -0
  13. package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +205 -139
  14. package/dist/components/Popover.vue.d.ts +1 -1
  15. package/dist/components/Sparkline.vue.d.ts +9 -0
  16. package/dist/components/Sparkline.vue_vue_type_script_setup_true_lang.js +90 -53
  17. package/dist/components/Stat.vue.d.ts +1 -1
  18. package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +13 -13
  19. package/dist/components/index.d.ts +1 -0
  20. package/dist/components/index.js +140 -138
  21. package/dist/composables/cartesian.d.ts +17 -2
  22. package/dist/composables/cartesian.js +6 -1
  23. package/dist/composables/chart-reveal.d.ts +45 -0
  24. package/dist/composables/chart-reveal.js +93 -0
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.js +147 -144
  27. package/dist/theme/app-shell.d.ts +42 -0
  28. package/dist/theme/app-shell.js +13 -1
  29. package/dist/theme/bar-chart.js +1 -1
  30. package/dist/theme/button.d.ts +2 -2
  31. package/dist/theme/button.js +1 -1
  32. package/dist/theme/command-palette.d.ts +3 -3
  33. package/dist/theme/donut-chart.d.ts +104 -0
  34. package/dist/theme/donut-chart.js +17 -0
  35. package/dist/theme/form.js +1 -1
  36. package/dist/theme/index.d.ts +1 -0
  37. package/dist/theme/line-chart.js +2 -2
  38. package/dist/theme/sidebar.js +1 -1
  39. package/dist/theme/sparkline.js +1 -1
  40. 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 { sparklineTheme as r } from "../theme/sparkline.js";
4
- import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, openBlock as f, renderList as p } from "vue";
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 m = [
7
+ var _ = [
7
8
  "viewBox",
8
9
  "height",
9
10
  "role",
10
11
  "aria-label",
11
12
  "aria-hidden"
12
- ], h = ["d"], g = ["d"], _ = ["d"], v = ["d"], y = 100, b = /*@__PURE__*/ l({
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(l) {
32
- let b = l, x = e(), S = a(() => b.unstyled ?? x.unstyled), C = a(() => b.endDot ? 6 : 1), w = a(() => Math.max(b.height - C.value * 2, 1)), T = a(() => {
33
- let e = b.data, r = t(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 = b.min ?? i, s = b.max ?? a, c = n([0, Math.max(e.length - 1, 0)], [0, y]), l = n([o, s], [y, 0]), u = [], d = [];
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: E(c(t)),
43
- y: E(l(e))
47
+ x: A(c(t)),
48
+ y: A(l(e))
44
49
  });
45
50
  }), d.length && u.push(d), u;
46
51
  });
47
- function E(e) {
52
+ function A(e) {
48
53
  return Math.round(e * 100) / 100;
49
54
  }
50
- function D(e) {
55
+ function j(e) {
51
56
  return e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x} ${e.y}`).join(" ");
52
57
  }
53
- let O = a(() => {
54
- let e = t(b.data);
55
- if (!e) return y;
56
- let r = b.min ?? e[0], i = b.max ?? e[1];
57
- return b.baseline === "zero" && r <= 0 && i >= 0 ? E(n([r, i], [y, 0])(0)) : y;
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 k(e) {
64
+ function N(e) {
60
65
  let t = e[0], n = e[e.length - 1];
61
- return `${D(e)} L${n.x} ${O.value} L${t.x} ${O.value} Z`;
66
+ return `${j(e)} L${n.x} ${M.value} L${t.x} ${M.value} Z`;
62
67
  }
63
- let A = a(() => {
64
- let e = T.value[T.value.length - 1];
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
- }), j = a(() => r({ muted: b.muted }));
67
- function M(e, t) {
68
- let n = b.ui?.[e];
69
- return S.value ? [n, t] : j.value[e]({ class: [n, t] });
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) => (f(), s("span", {
72
- class: u(M("root", b.class)),
73
- style: d({ padding: `${C.value}px` })
74
- }, [(f(), s("svg", {
75
- viewBox: `0 0 ${y} ${y}`,
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: w.value,
78
- style: d({ height: `${w.value}px` }),
79
- role: b.label ? "img" : void 0,
80
- "aria-label": b.label,
81
- "aria-hidden": b.label ? void 0 : !0,
82
- class: u(M("plot"))
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
- b.variant === "area" ? (f(!0), s(i, { key: 0 }, p(T.value, (e, t) => (f(), s("path", {
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: k(e),
87
- class: u(M("area"))
88
- }, null, 10, h))), 128)) : o("", !0),
89
- (f(!0), s(i, null, p(T.value, (e, t) => (f(), s("path", {
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: D(e),
126
+ d: j(e),
92
127
  "vector-effect": "non-scaling-stroke",
93
- class: u(M("line"))
94
- }, null, 10, g))), 128)),
95
- b.endDot && A.value ? (f(), s(i, { key: 1 }, [c("path", {
96
- d: `M${A.value.x} ${A.value.y} L${A.value.x} ${A.value.y}`,
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
- class: u(M("ring"))
100
- }, null, 10, _), c("path", {
101
- d: `M${A.value.x} ${A.value.y} L${A.value.x} ${A.value.y}`,
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
- class: u(M("dot"))
105
- }, null, 10, v)], 64)) : o("", !0)
106
- ], 14, m))], 6));
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 { b as default };
147
+ export { w as default };
@@ -32,7 +32,7 @@ export interface StatProps {
32
32
  };
33
33
  }
34
34
  declare var __VLS_8: {}, __VLS_10: {}, __VLS_12: {
35
- trend: "neutral" | "up" | "down";
35
+ trend: "up" | "down" | "neutral";
36
36
  }, __VLS_19: {};
37
37
  type __VLS_Slots = {} & {
38
38
  label?: (props: typeof __VLS_8) => any;
@@ -24,35 +24,35 @@ var x = /*@__PURE__*/ u({
24
24
  ui: {}
25
25
  },
26
26
  setup(u) {
27
- let x = u, S = r(() => x.trend ? x.trend : x.delta == null || x.delta === 0 ? "neutral" : x.delta > 0 ? "up" : "down"), C = r(() => ({
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]), w = r(() => {
31
+ })[S.value]), T = r(() => {
32
32
  if (x.delta != null) return x.formatDelta ? x.formatDelta(x.delta) : `${x.delta > 0 ? "+" : ""}${x.delta}%`;
33
- }), T = e(), E = r(() => x.unstyled ?? T.unstyled), D = r(() => n({
33
+ }), E = e(), D = r(() => x.unstyled ?? E.unstyled), O = r(() => n({
34
34
  size: x.size,
35
- trend: S.value
36
- })), O = r(() => E.value ? [x.ui?.root, x.class] : D.value.root({ class: [x.ui?.root, x.class] })), k = r(() => E.value ? x.ui?.label : D.value.label({ class: x.ui?.label })), A = r(() => E.value ? x.ui?.value : D.value.value({ class: x.ui?.value })), j = r(() => E.value ? x.ui?.delta : D.value.delta({ class: x.ui?.delta })), M = r(() => E.value ? x.ui?.hint : D.value.hint({ class: x.ui?.hint })), N = r(() => E.value ? x.ui?.row : D.value.row({ class: x.ui?.row }));
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(O.value)
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(k.value)
44
+ class: d(A.value)
45
45
  }, [p(e.$slots, "label", {}, () => [c(m(x.label), 1)])], 2)) : a("", !0),
46
- s("span", { class: d(N.value) }, [s("span", { class: d(A.value) }, [p(e.$slots, "default", {}, () => [c(m(x.value), 1)])], 2), w.value || e.$slots.delta ? (f(), o("span", {
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(j.value)
49
- }, [p(e.$slots, "delta", { trend: S.value }, () => [l(t, {
50
- icon: C.value,
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(w.value), 1)])], 2)) : a("", !0)], 2),
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(M.value)
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';
@@ -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 "./AppShell.js";
7
- import o from "./AspectRatio.js";
8
- import s from "./Avatar.js";
9
- import c from "./AvatarGroup.js";
10
- import l from "./Badge.js";
11
- import u from "./Banner.js";
12
- import d from "./ChartLegend.js";
13
- import f from "./BarChart.js";
14
- import p from "./Breadcrumb.js";
15
- import m from "./Button.js";
16
- import h from "./ButtonGroup.js";
17
- import g from "./Card.js";
18
- import _ from "./Checkbox.js";
19
- import v from "./Collapsible.js";
20
- import y from "./ColorPicker.js";
21
- import b from "./Combobox.js";
22
- import x from "./Kbd.js";
23
- import S from "./CommandPalette.js";
24
- import C from "./Dialog.js";
25
- import w from "./ConfirmDialog.js";
26
- import T from "./Container.js";
27
- import E from "./ContextMenu.js";
28
- import D from "./DatePicker.js";
29
- import O from "./DateRangePicker.js";
30
- import k from "./Drawer.js";
31
- import A from "./DropdownMenu.js";
32
- import j from "./EmptyState.js";
33
- import M from "./FileUpload.js";
34
- import N from "./Form.js";
35
- import P from "./Label.js";
36
- import F from "./FormField.js";
37
- import I from "./Input.js";
38
- import L from "./LineChart.js";
39
- import R from "./Menubar.js";
40
- import z from "./NavigationMenu.js";
41
- import B from "./NumberInput.js";
42
- import V from "./PageHeader.js";
43
- import H from "./Pagination.js";
44
- import U from "./PasswordInput.js";
45
- import W from "./PinInput.js";
46
- import G from "./Popover.js";
47
- import K from "./Progress.js";
48
- import q from "./RadioGroup.js";
49
- import J from "./ScrollArea.js";
50
- import Y from "./ScrollFade.js";
51
- import X from "./Select.js";
52
- import Z from "./Separator.js";
53
- import Q from "./Sidebar.js";
54
- import $ from "./SignaturePad.js";
55
- import ee from "./Skeleton.js";
56
- import te from "./Slider.js";
57
- import ne from "./Sparkline.js";
58
- import re from "./Splitter.js";
59
- import ie from "./Stat.js";
60
- import ae from "./Stepper.js";
61
- import oe from "./Switch.js";
62
- import se from "./Table.js";
63
- import ce from "./Tabs.js";
64
- import le from "./TagsInput.js";
65
- import ue from "./Textarea.js";
66
- import de from "./TimeField.js";
67
- import fe from "./Timeline.js";
68
- import pe from "./Toaster.js";
69
- import me from "./Toggle.js";
70
- import he from "./ToggleGroup.js";
71
- import ge from "./Toolbar.js";
72
- import _e from "./Tooltip.js";
73
- import ve from "./Tree.js";
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 ye = /* @__PURE__ */ e({
76
+ var be = /* @__PURE__ */ e({
76
77
  Accordion: () => n,
77
78
  Alert: () => r,
78
79
  App: () => i,
79
- AppShell: () => a,
80
- AspectRatio: () => o,
81
- Avatar: () => s,
82
- AvatarGroup: () => c,
83
- Badge: () => l,
84
- Banner: () => u,
85
- BarChart: () => f,
86
- Breadcrumb: () => p,
87
- Button: () => m,
88
- ButtonGroup: () => h,
89
- Card: () => g,
90
- ChartLegend: () => d,
91
- Checkbox: () => _,
92
- Collapsible: () => v,
93
- ColorPicker: () => y,
94
- Combobox: () => b,
95
- CommandPalette: () => S,
96
- ConfirmDialog: () => w,
97
- Container: () => T,
98
- ContextMenu: () => E,
99
- DatePicker: () => D,
100
- DateRangePicker: () => O,
101
- Dialog: () => C,
102
- Drawer: () => k,
103
- DropdownMenu: () => A,
104
- EmptyState: () => j,
105
- FileUpload: () => M,
106
- Form: () => N,
107
- FormField: () => F,
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: () => I,
110
- Kbd: () => x,
111
- Label: () => P,
112
- LineChart: () => L,
113
- Menubar: () => R,
114
- NavigationMenu: () => z,
115
- NumberInput: () => B,
116
- PageHeader: () => V,
117
- Pagination: () => H,
118
- PasswordInput: () => U,
119
- PinInput: () => W,
120
- Popover: () => G,
121
- Progress: () => K,
122
- RadioGroup: () => q,
123
- ScrollArea: () => J,
124
- ScrollFade: () => Y,
125
- Select: () => X,
126
- Separator: () => Z,
127
- Sidebar: () => Q,
128
- SignaturePad: () => $,
129
- Skeleton: () => ee,
130
- Slider: () => te,
131
- Sparkline: () => ne,
132
- Splitter: () => re,
133
- Stat: () => ie,
134
- Stepper: () => ae,
135
- Switch: () => oe,
136
- Table: () => se,
137
- Tabs: () => ce,
138
- TagsInput: () => le,
139
- Textarea: () => ue,
140
- TimeField: () => de,
141
- Timeline: () => fe,
142
- Toaster: () => pe,
143
- Toggle: () => me,
144
- ToggleGroup: () => he,
145
- Toolbar: () => ge,
146
- Tooltip: () => _e,
147
- Tree: () => ve
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 { ye as components_exports };
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
- /** A series' palette slot: pinned if it has one, otherwise its position. */
97
- export declare function slotOf(entry: ChartSeries, index: number): number;
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
+ };