vue-chrts 2.0.0-beta.1 → 2.0.0-beta.2

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.
@@ -1,6 +1,6 @@
1
- import { defineComponent as S, computed as c, createElementBlock as l, openBlock as a, createElementVNode as o, toDisplayString as n, Fragment as z, renderList as B, normalizeStyle as w } from "vue";
2
- import { getFirstPropertyValue as R } from "../utils.js";
3
- const j = { style: { display: "flex", "align-items": "center" } }, L = /* @__PURE__ */ S({
1
+ import { defineComponent as S, computed as p, createElementBlock as l, openBlock as a, createElementVNode as o, toDisplayString as n, Fragment as z, renderList as B, normalizeStyle as w } from "vue";
2
+ import { getFirstPropertyValue as j } from "../utils.js";
3
+ const C = { style: { display: "flex", "align-items": "center" } }, W = /* @__PURE__ */ S({
4
4
  __name: "Tooltip",
5
5
  props: {
6
6
  data: {},
@@ -9,11 +9,11 @@ const j = { style: { display: "flex", "align-items": "center" } }, L = /* @__PUR
9
9
  yFormatter: { type: Function }
10
10
  },
11
11
  setup(t) {
12
- const e = t, p = c(
13
- () => e.titleFormatter ? e.titleFormatter(e.data) : R(e.data)
14
- ), m = ["_index", "_stacked", "_ending"], g = c(() => Object.entries(e.data ?? []).filter(
12
+ const e = t, c = p(
13
+ () => e.titleFormatter ? e.titleFormatter(e.data) : j(e.data)
14
+ ), m = ["_index", "_stacked", "_ending"], g = p(() => Object.entries(e.data ?? []).filter(
15
15
  ([r, x]) => !m.includes(r) && Object.keys(e.categories).includes(r)
16
- )), f = {
16
+ )), u = {
17
17
  color: "var(--vis-tooltip-title-color, #000)",
18
18
  textTransform: "var(--vis-tooltip-title-text-transform, capitalize)",
19
19
  borderBottom: "var(--vis-tooltip-title-border-bottom, 1px solid #e5e7eb)",
@@ -23,18 +23,17 @@ const j = { style: { display: "flex", "align-items": "center" } }, L = /* @__PUR
23
23
  fontSize: "var(--vis-tooltip-title-font-size, 0.875rem)",
24
24
  lineHeight: "var(--vis-tooltip-title-line-height, 100%)",
25
25
  fontWeight: "var(--vis-tooltip-title-font-weight, 600)"
26
- }, u = {
26
+ }, f = {
27
27
  display: "flex",
28
28
  alignItems: "center",
29
29
  justifyContent: "space-between",
30
- paddingRight: "var(--vis-tooltip-entry-padding-right, 1rem)",
31
- paddingLeft: "var(--vis-tooltip-entry-padding-left, 1rem)"
32
- }, h = {
30
+ padding: "var(--vis-tooltip-entry-padding-top, 0.25rem) var(--vis-tooltip-entry-padding-right, 0.25rem) var(--vis-tooltip-entry-padding-bottom, 0.5rem) var(--vis-tooltip-entry-padding-left, 0.25rem)"
31
+ }, y = {
33
32
  width: "var(--vis-tooltip-dot-width, 8px)",
34
33
  height: "var(--vis-tooltip-dot-height, 8px)",
35
34
  borderRadius: "var(--vis-tooltip-dot-border-radius, 4px)",
36
35
  marginRight: "var(--vis-tooltip-dot-margin-right, 8px)"
37
- }, y = {
36
+ }, h = {
38
37
  fontWeight: "var(--vis-tooltip-label-font-weight, 400)",
39
38
  fontSize: "var(--vis-tooltip-label-font-size, 0.875rem)",
40
39
  marginRight: "var(--vis-tooltip-label-margin-right, 1rem)",
@@ -45,21 +44,21 @@ const j = { style: { display: "flex", "align-items": "center" } }, L = /* @__PUR
45
44
  color: "var(--vis-tooltip-value-color)"
46
45
  };
47
46
  return (r, x) => (a(), l("div", null, [
48
- o("div", { style: f }, n(p.value), 1),
47
+ o("div", { style: u }, n(c.value), 1),
49
48
  (a(!0), l(z, null, B(g.value, ([i, s], F) => {
50
49
  var v, d;
51
50
  return a(), l("div", {
52
51
  key: i,
53
- style: u
52
+ style: f
54
53
  }, [
55
- o("div", j, [
54
+ o("div", C, [
56
55
  o("span", {
57
56
  style: w({
58
- ...h,
57
+ ...y,
59
58
  backgroundColor: typeof ((v = t.categories[i]) == null ? void 0 : v.color) == "string" && ((d = t.categories[i]) != null && d.color) ? t.categories[i].color : `var(--vis-color${F})`
60
59
  })
61
60
  }, null, 4),
62
- o("span", { style: y }, n(t.categories[i].name) + ": ", 1)
61
+ o("span", { style: h }, n(t.categories[i].name) + ": ", 1)
63
62
  ]),
64
63
  o("div", null, [
65
64
  o("span", { style: b }, n(t.yFormatter ? t.yFormatter(s) : s), 1)
@@ -70,5 +69,5 @@ const j = { style: { display: "flex", "align-items": "center" } }, L = /* @__PUR
70
69
  }
71
70
  });
72
71
  export {
73
- L as default
72
+ W as default
74
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-chrts",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"