iryx-ui 0.15.0 → 0.17.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 (102) 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/BarChart.vue.d.ts +8 -0
  5. package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +169 -151
  6. package/dist/components/Calendar.js +5 -0
  7. package/dist/components/Calendar.vue.d.ts +69 -0
  8. package/dist/components/Calendar.vue_vue_type_script_setup_true_lang.js +168 -0
  9. package/dist/components/Combobox.vue.d.ts +9 -9
  10. package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +180 -144
  11. package/dist/components/DateField.js +5 -0
  12. package/dist/components/DateField.vue.d.ts +38 -0
  13. package/dist/components/DateField.vue_vue_type_script_setup_true_lang.js +94 -0
  14. package/dist/components/DatePicker.vue.d.ts +7 -2
  15. package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +73 -124
  16. package/dist/components/DateRangePicker.vue.d.ts +2 -2
  17. package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +81 -78
  18. package/dist/components/DonutChart.js +5 -0
  19. package/dist/components/DonutChart.vue.d.ts +96 -0
  20. package/dist/components/DonutChart.vue_vue_type_script_setup_true_lang.js +234 -0
  21. package/dist/components/DropdownMenu.vue.d.ts +13 -6
  22. package/dist/components/DropdownMenu.vue_vue_type_script_setup_true_lang.js +28 -22
  23. package/dist/components/Editable.js +5 -0
  24. package/dist/components/Editable.vue.d.ts +81 -0
  25. package/dist/components/Editable.vue_vue_type_script_setup_true_lang.js +140 -0
  26. package/dist/components/HoverCard.js +5 -0
  27. package/dist/components/HoverCard.vue.d.ts +68 -0
  28. package/dist/components/HoverCard.vue_vue_type_script_setup_true_lang.js +79 -0
  29. package/dist/components/LineChart.vue.d.ts +8 -0
  30. package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +160 -141
  31. package/dist/components/Sparkline.vue.d.ts +9 -0
  32. package/dist/components/Sparkline.vue_vue_type_script_setup_true_lang.js +90 -53
  33. package/dist/components/TagsInput.vue.d.ts +2 -2
  34. package/dist/components/TimeField.vue_vue_type_script_setup_true_lang.js +17 -14
  35. package/dist/components/index.d.ts +5 -0
  36. package/dist/components/index.js +124 -114
  37. package/dist/composables/cartesian.d.ts +10 -2
  38. package/dist/composables/chart-reveal.d.ts +45 -0
  39. package/dist/composables/chart-reveal.js +93 -0
  40. package/dist/index.d.ts +6 -0
  41. package/dist/index.js +142 -131
  42. package/dist/theme/accordion.d.ts +0 -15
  43. package/dist/theme/alert.d.ts +0 -3
  44. package/dist/theme/avatar.d.ts +0 -3
  45. package/dist/theme/banner.d.ts +0 -6
  46. package/dist/theme/bar-chart.d.ts +0 -18
  47. package/dist/theme/breadcrumb.d.ts +0 -3
  48. package/dist/theme/calendar.d.ts +62 -0
  49. package/dist/theme/calendar.js +29 -0
  50. package/dist/theme/card.d.ts +0 -6
  51. package/dist/theme/chart-legend.d.ts +0 -3
  52. package/dist/theme/checkbox.d.ts +0 -6
  53. package/dist/theme/color-picker.d.ts +0 -6
  54. package/dist/theme/combobox.js +4 -4
  55. package/dist/theme/command-palette.d.ts +0 -6
  56. package/dist/theme/container.d.ts +0 -3
  57. package/dist/theme/container.js +3 -3
  58. package/dist/theme/date-field.d.ts +65 -0
  59. package/dist/theme/date-field.js +21 -0
  60. package/dist/theme/date-picker.d.ts +0 -195
  61. package/dist/theme/date-picker.js +2 -24
  62. package/dist/theme/donut-chart.d.ts +86 -0
  63. package/dist/theme/donut-chart.js +17 -0
  64. package/dist/theme/dropdown-menu.d.ts +3 -0
  65. package/dist/theme/dropdown-menu.js +1 -0
  66. package/dist/theme/editable.d.ts +77 -0
  67. package/dist/theme/editable.js +26 -0
  68. package/dist/theme/empty-state.d.ts +0 -3
  69. package/dist/theme/file-upload.d.ts +0 -39
  70. package/dist/theme/hover-card.d.ts +92 -0
  71. package/dist/theme/hover-card.js +28 -0
  72. package/dist/theme/index.d.ts +5 -0
  73. package/dist/theme/input.d.ts +0 -18
  74. package/dist/theme/kbd.d.ts +0 -3
  75. package/dist/theme/line-chart.d.ts +0 -18
  76. package/dist/theme/navigation-menu.d.ts +0 -48
  77. package/dist/theme/number-input.d.ts +0 -3
  78. package/dist/theme/page-header.d.ts +0 -3
  79. package/dist/theme/password-input.d.ts +0 -23
  80. package/dist/theme/pin-input.d.ts +0 -3
  81. package/dist/theme/popover.d.ts +0 -6
  82. package/dist/theme/progress.d.ts +0 -51
  83. package/dist/theme/scroll-area.d.ts +0 -3
  84. package/dist/theme/separator.d.ts +0 -3
  85. package/dist/theme/sidebar.d.ts +0 -54
  86. package/dist/theme/skeleton.d.ts +0 -3
  87. package/dist/theme/skeleton.js +1 -1
  88. package/dist/theme/slider.d.ts +0 -6
  89. package/dist/theme/sparkline.d.ts +0 -11
  90. package/dist/theme/sparkline.js +1 -1
  91. package/dist/theme/splitter.d.ts +0 -3
  92. package/dist/theme/stat.d.ts +0 -12
  93. package/dist/theme/stat.js +2 -2
  94. package/dist/theme/switch.d.ts +0 -6
  95. package/dist/theme/table.d.ts +0 -39
  96. package/dist/theme/tabs.d.ts +0 -12
  97. package/dist/theme/time-field.d.ts +0 -3
  98. package/dist/theme/timeline.d.ts +0 -18
  99. package/dist/theme/toast.d.ts +0 -3
  100. package/dist/theme/toggle.d.ts +0 -23
  101. package/dist/theme/tree.d.ts +0 -3
  102. 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 };
@@ -48,14 +48,14 @@ type __VLS_Slots = {} & {
48
48
  };
49
49
  declare const __VLS_base: import("vue").DefineComponent<TagsInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
50
50
  "update:modelValue": (value: string[]) => any;
51
- invalidTag: (value: string) => any;
52
51
  addTag: (value: string) => any;
53
52
  removeTag: (value: string) => any;
53
+ invalidTag: (value: string) => any;
54
54
  }, string, import("vue").PublicProps, Readonly<TagsInputProps> & Readonly<{
55
55
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
56
- onInvalidTag?: ((value: string) => any) | undefined;
57
56
  onAddTag?: ((value: string) => any) | undefined;
58
57
  onRemoveTag?: ((value: string) => any) | undefined;
58
+ onInvalidTag?: ((value: string) => any) | undefined;
59
59
  }>, {
60
60
  unstyled: boolean;
61
61
  invalid: boolean;
@@ -1,6 +1,6 @@
1
1
  import { useIryxUiConfig as e } from "../config.js";
2
- import { useFormField as t } from "../composables/form.js";
3
- import { toIsoTime as n, toTime as r } from "../composables/date.js";
2
+ import { toIsoTime as t, toTime as n } from "../composables/date.js";
3
+ import { useFormField as r } from "../composables/form.js";
4
4
  import { timeFieldTheme as i } from "../theme/time-field.js";
5
5
  import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createTextVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderList as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
6
6
  import { TimeFieldInput as _, TimeFieldRoot as v } from "reka-ui";
@@ -32,33 +32,36 @@ var y = /*@__PURE__*/ u({
32
32
  },
33
33
  emits: ["update:modelValue"],
34
34
  setup(u, { emit: y }) {
35
- let b = u, x = y, S = t(), C = o(() => b.id ?? S?.id.value), w = o(() => b.invalid ?? S?.invalid.value ?? !1), T = e(), E = o(() => b.unstyled ?? T.unstyled), D = o(() => i({
35
+ let b = u, x = y, S = r(), C = o(() => b.id ?? S?.id.value), w = o(() => {
36
+ let e = b.modelValue;
37
+ return !e || !n(e) ? !1 : !!(b.minValue && e < b.minValue || b.maxValue && e > b.maxValue);
38
+ }), T = o(() => (b.invalid ?? S?.invalid.value ?? !1) || w.value), E = e(), D = o(() => b.unstyled ?? E.unstyled), O = o(() => i({
36
39
  size: b.size,
37
- invalid: w.value
38
- })), O = o(() => E.value ? [b.ui?.root, b.class] : D.value.root({ class: [b.ui?.root, b.class] })), k = o(() => E.value ? b.ui?.segment : D.value.segment({ class: b.ui?.segment })), A = o(() => E.value ? b.ui?.literal : D.value.literal({ class: b.ui?.literal }));
39
- return (e, t) => (f(), s(h(v), {
40
+ invalid: T.value
41
+ })), k = o(() => D.value ? [b.ui?.root, b.class] : O.value.root({ class: [b.ui?.root, b.class] })), A = o(() => D.value ? b.ui?.segment : O.value.segment({ class: b.ui?.segment })), j = o(() => D.value ? b.ui?.literal : O.value.literal({ class: b.ui?.literal }));
42
+ return (e, r) => (f(), s(h(v), {
40
43
  id: C.value,
41
- "model-value": h(r)(b.modelValue),
44
+ "model-value": h(n)(b.modelValue),
42
45
  granularity: b.granularity,
43
46
  "hour-cycle": b.hourCycle,
44
47
  locale: b.locale,
45
48
  step: b.step,
46
- "min-value": h(r)(b.minValue),
47
- "max-value": h(r)(b.maxValue),
49
+ "min-value": h(n)(b.minValue),
50
+ "max-value": h(n)(b.maxValue),
48
51
  disabled: b.disabled,
49
52
  readonly: b.readonly,
50
- "aria-invalid": w.value || void 0,
53
+ "aria-invalid": T.value || void 0,
51
54
  "aria-describedby": h(S)?.describedBy.value,
52
- class: d(O.value),
53
- "onUpdate:modelValue": t[0] ||= (e) => x("update:modelValue", h(n)(e))
55
+ class: d(k.value),
56
+ "onUpdate:modelValue": r[0] ||= (e) => x("update:modelValue", h(t)(e))
54
57
  }, {
55
58
  default: g(({ segments: e }) => [(f(!0), c(a, null, p(e, (e) => (f(), c(a, { key: e.part }, [e.part === "literal" ? (f(), c("span", {
56
59
  key: 0,
57
- class: d(A.value)
60
+ class: d(j.value)
58
61
  }, m(e.value), 3)) : (f(), s(h(_), {
59
62
  key: 1,
60
63
  part: e.part,
61
- class: d(k.value)
64
+ class: d(A.value)
62
65
  }, {
63
66
  default: g(() => [l(m(e.value), 1)]),
64
67
  _: 2
@@ -11,6 +11,7 @@ export { default as BarChart } from './BarChart.vue';
11
11
  export { default as Breadcrumb } from './Breadcrumb.vue';
12
12
  export { default as Button } from './Button.vue';
13
13
  export { default as ButtonGroup } from './ButtonGroup.vue';
14
+ export { default as Calendar } from './Calendar.vue';
14
15
  export { default as Card } from './Card.vue';
15
16
  export { default as ChartLegend } from './ChartLegend.vue';
16
17
  export { default as Checkbox } from './Checkbox.vue';
@@ -21,15 +22,19 @@ export { default as CommandPalette } from './CommandPalette.vue';
21
22
  export { default as ConfirmDialog } from './ConfirmDialog.vue';
22
23
  export { default as Container } from './Container.vue';
23
24
  export { default as ContextMenu } from './ContextMenu.vue';
25
+ export { default as DateField } from './DateField.vue';
24
26
  export { default as DatePicker } from './DatePicker.vue';
25
27
  export { default as DateRangePicker } from './DateRangePicker.vue';
26
28
  export { default as Dialog } from './Dialog.vue';
29
+ export { default as DonutChart } from './DonutChart.vue';
27
30
  export { default as Drawer } from './Drawer.vue';
28
31
  export { default as DropdownMenu } from './DropdownMenu.vue';
32
+ export { default as Editable } from './Editable.vue';
29
33
  export { default as EmptyState } from './EmptyState.vue';
30
34
  export { default as FileUpload } from './FileUpload.vue';
31
35
  export { default as Form } from './Form.vue';
32
36
  export { default as FormField } from './FormField.vue';
37
+ export { default as HoverCard } from './HoverCard.vue';
33
38
  export { default as Icon } from './Icon.vue';
34
39
  export { default as Input } from './Input.vue';
35
40
  export { default as Kbd } from './Kbd.vue';
@@ -15,64 +15,69 @@ import p from "./BarChart.js";
15
15
  import m from "./Breadcrumb.js";
16
16
  import h from "./Button.js";
17
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 "./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";
18
+ import _ from "./Calendar.js";
19
+ import v from "./Card.js";
20
+ import y from "./Checkbox.js";
21
+ import b from "./Collapsible.js";
22
+ import x from "./ColorPicker.js";
23
+ import S from "./Combobox.js";
24
+ import C from "./Kbd.js";
25
+ import w from "./CommandPalette.js";
26
+ import T from "./Dialog.js";
27
+ import E from "./ConfirmDialog.js";
28
+ import D from "./Container.js";
29
+ import O from "./ContextMenu.js";
30
+ import k from "./DateField.js";
31
+ import A from "./DatePicker.js";
32
+ import j from "./DateRangePicker.js";
33
+ import M from "./DonutChart.js";
34
+ import N from "./DropdownMenu.js";
35
+ import P from "./Editable.js";
36
+ import F from "./EmptyState.js";
37
+ import I from "./FileUpload.js";
38
+ import L from "./Form.js";
39
+ import R from "./Label.js";
40
+ import z from "./FormField.js";
41
+ import B from "./HoverCard.js";
42
+ import V from "./Input.js";
43
+ import H from "./LineChart.js";
44
+ import U from "./Menubar.js";
45
+ import W from "./NavigationMenu.js";
46
+ import G from "./NumberInput.js";
47
+ import K from "./PageHeader.js";
48
+ import q from "./Pagination.js";
49
+ import J from "./PasswordInput.js";
50
+ import Y from "./PinInput.js";
51
+ import X from "./Popover.js";
52
+ import Z from "./Progress.js";
53
+ import Q from "./RadioGroup.js";
54
+ import $ from "./ScrollArea.js";
55
+ import ee from "./ScrollFade.js";
56
+ import te from "./Select.js";
57
+ import ne from "./Separator.js";
58
+ import re from "./Sidebar.js";
59
+ import ie from "./SignaturePad.js";
60
+ import ae from "./Skeleton.js";
61
+ import oe from "./Slider.js";
62
+ import se from "./Sparkline.js";
63
+ import ce from "./Splitter.js";
64
+ import le from "./Stat.js";
65
+ import ue from "./Stepper.js";
66
+ import de from "./Switch.js";
67
+ import fe from "./Table.js";
68
+ import pe from "./Tabs.js";
69
+ import me from "./TagsInput.js";
70
+ import he from "./Textarea.js";
71
+ import ge from "./TimeField.js";
72
+ import _e from "./Timeline.js";
73
+ import ve from "./Toaster.js";
74
+ import ye from "./Toggle.js";
75
+ import be from "./ToggleGroup.js";
76
+ import xe from "./Toolbar.js";
77
+ import Se from "./Tooltip.js";
78
+ import Ce from "./Tree.js";
74
79
  //#region src/components/index.ts
75
- var ye = /* @__PURE__ */ e({
80
+ var we = /* @__PURE__ */ e({
76
81
  Accordion: () => n,
77
82
  Alert: () => r,
78
83
  App: () => i,
@@ -86,65 +91,70 @@ var ye = /* @__PURE__ */ e({
86
91
  Breadcrumb: () => m,
87
92
  Button: () => h,
88
93
  ButtonGroup: () => g,
89
- Card: () => _,
94
+ Calendar: () => _,
95
+ Card: () => v,
90
96
  ChartLegend: () => f,
91
- Checkbox: () => v,
92
- Collapsible: () => y,
93
- ColorPicker: () => b,
94
- Combobox: () => x,
95
- CommandPalette: () => C,
96
- ConfirmDialog: () => T,
97
- Container: () => E,
98
- ContextMenu: () => D,
99
- DatePicker: () => O,
100
- DateRangePicker: () => k,
101
- Dialog: () => w,
97
+ Checkbox: () => y,
98
+ Collapsible: () => b,
99
+ ColorPicker: () => x,
100
+ Combobox: () => S,
101
+ CommandPalette: () => w,
102
+ ConfirmDialog: () => E,
103
+ Container: () => D,
104
+ ContextMenu: () => O,
105
+ DateField: () => k,
106
+ DatePicker: () => A,
107
+ DateRangePicker: () => j,
108
+ Dialog: () => T,
109
+ DonutChart: () => M,
102
110
  Drawer: () => a,
103
- DropdownMenu: () => A,
104
- EmptyState: () => j,
105
- FileUpload: () => M,
106
- Form: () => N,
107
- FormField: () => F,
111
+ DropdownMenu: () => N,
112
+ Editable: () => P,
113
+ EmptyState: () => F,
114
+ FileUpload: () => I,
115
+ Form: () => L,
116
+ FormField: () => z,
117
+ HoverCard: () => B,
108
118
  Icon: () => t,
109
- Input: () => I,
110
- Kbd: () => S,
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
119
+ Input: () => V,
120
+ Kbd: () => C,
121
+ Label: () => R,
122
+ LineChart: () => H,
123
+ Menubar: () => U,
124
+ NavigationMenu: () => W,
125
+ NumberInput: () => G,
126
+ PageHeader: () => K,
127
+ Pagination: () => q,
128
+ PasswordInput: () => J,
129
+ PinInput: () => Y,
130
+ Popover: () => X,
131
+ Progress: () => Z,
132
+ RadioGroup: () => Q,
133
+ ScrollArea: () => $,
134
+ ScrollFade: () => ee,
135
+ Select: () => te,
136
+ Separator: () => ne,
137
+ Sidebar: () => re,
138
+ SignaturePad: () => ie,
139
+ Skeleton: () => ae,
140
+ Slider: () => oe,
141
+ Sparkline: () => se,
142
+ Splitter: () => ce,
143
+ Stat: () => le,
144
+ Stepper: () => ue,
145
+ Switch: () => de,
146
+ Table: () => fe,
147
+ Tabs: () => pe,
148
+ TagsInput: () => me,
149
+ Textarea: () => he,
150
+ TimeField: () => ge,
151
+ Timeline: () => _e,
152
+ Toaster: () => ve,
153
+ Toggle: () => ye,
154
+ ToggleGroup: () => be,
155
+ Toolbar: () => xe,
156
+ Tooltip: () => Se,
157
+ Tree: () => Ce
148
158
  });
149
159
  //#endregion
150
- export { ye as components_exports };
160
+ export { we as components_exports };
@@ -100,8 +100,16 @@ export declare const SERIES_SLOTS = 8;
100
100
  * than saying so.
101
101
  */
102
102
  export declare function seriesColor(index: number): string;
103
- /** A series' palette slot: pinned if it has one, otherwise its position. */
104
- 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;
105
113
  /**
106
114
  * Dev-only warning.
107
115
  *
@@ -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
+ };