@epam/ai-dial-ui-kit 0.16.0-dev.60 → 0.16.0-dev.61

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,64 +1,66 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { DIAL_KIT_CLASS as g } from "../../../../constants/public-class-names.js";
3
- import { Badge as u } from "../../Badge/Badge.js";
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import { DIAL_KIT_CLASS as N } from "../../../../constants/public-class-names.js";
3
+ import { Badge as g } from "../../Badge/Badge.js";
4
4
  import { BadgeColor as b, BadgeVariant as C } from "../../../../types/badge.js";
5
- import { EllipsisTooltip as m } from "../../EllipsisTooltip/EllipsisTooltip.js";
5
+ import { EllipsisTooltip as x } from "../../EllipsisTooltip/EllipsisTooltip.js";
6
6
  import { Spinner as D } from "../../../Spinner/Spinner.js";
7
- import { AnalyticsCardVariant as c } from "../../../../types/analytics.js";
8
- import { mergeClasses as x } from "../../../../utils/merge-classes.js";
7
+ import { AnalyticsCardVariant as o } from "../../../../types/analytics.js";
8
+ import { mergeClasses as l } from "../../../../utils/merge-classes.js";
9
9
  const w = {
10
- [c.Default]: {
10
+ [o.Default]: {
11
11
  container: "bg-layer-3",
12
12
  title: "dial-small-text text-secondary",
13
13
  value: "dial-display2-text text-primary",
14
+ compareDividerCell: "h-10",
14
15
  showDescription: !0
15
16
  },
16
- [c.Compact]: {
17
+ [o.Compact]: {
17
18
  container: "bg-layer-2",
18
19
  title: "dial-tiny-text text-secondary",
19
20
  value: "dial-body-semi-text text-primary",
21
+ compareDividerCell: "h-6",
20
22
  showDescription: !1
21
23
  }
22
- }, _ = ({
23
- title: o,
24
+ }, T = ({
25
+ title: d,
24
26
  value: p,
25
- description: i,
26
- variant: f = c.Default,
27
- error: r,
27
+ description: r,
28
+ variant: y = o.Default,
29
+ error: i,
28
30
  isLoading: n,
29
- className: y,
31
+ className: f,
30
32
  delta: a,
31
- deltaPositive: d,
32
- deltaUnit: h,
33
- compareValues: l
33
+ deltaPositive: m,
34
+ deltaUnit: v,
35
+ compareValues: s
34
36
  }) => {
35
- const t = w[f], v = d !== void 0 ? d : (a ?? 0) >= 0, N = a === void 0 ? null : `${a >= 0 ? `+${a}` : String(a)}${h ?? ""}`;
36
- return /* @__PURE__ */ s(
37
+ const t = w[y], h = m !== void 0 ? m : (a ?? 0) >= 0, u = a === void 0 ? null : `${a >= 0 ? `+${a}` : String(a)}${v ?? ""}`;
38
+ return /* @__PURE__ */ c(
37
39
  "div",
38
40
  {
39
- className: x(
41
+ className: l(
40
42
  "flex flex-col rounded-lg border border-secondary p-4",
41
- r || n ? "gap-2" : "gap-1",
43
+ i || n ? "gap-2" : "gap-1",
42
44
  t.container,
43
- y,
44
- g.analyticsCard
45
+ f,
46
+ N.analyticsCard
45
47
  ),
46
48
  children: [
47
- a !== void 0 ? /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
48
- /* @__PURE__ */ e("span", { className: t.title, children: o }),
49
+ a !== void 0 ? /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
50
+ /* @__PURE__ */ e("span", { className: t.title, children: d }),
49
51
  /* @__PURE__ */ e(
50
52
  "span",
51
53
  {
52
- className: x(
54
+ className: l(
53
55
  "dial-tiny-semi-text rounded-[120px] border border-transparent px-2",
54
- v ? "bg-success text-success" : "bg-error text-error"
56
+ h ? "bg-success text-success" : "bg-error text-error"
55
57
  ),
56
- children: N
58
+ children: u
57
59
  }
58
60
  )
59
- ] }) : /* @__PURE__ */ e("span", { className: t.title, children: o }),
60
- r ? /* @__PURE__ */ e(
61
- u,
61
+ ] }) : /* @__PURE__ */ e("span", { className: t.title, children: d }),
62
+ i ? /* @__PURE__ */ e(
63
+ g,
62
64
  {
63
65
  label: "Error",
64
66
  variant: C.Filled,
@@ -66,34 +68,40 @@ const w = {
66
68
  textClassName: "dial-tiny-semi-text",
67
69
  className: "self-start"
68
70
  }
69
- ) : n ? /* @__PURE__ */ e(D, { size: 18, fullWidth: !1, className: "self-start" }) : l ? /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
70
- /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
71
- /* @__PURE__ */ e(
72
- m,
73
- {
74
- text: l[0].title,
75
- className: "dial-tiny-text text-secondary"
76
- }
77
- ),
78
- /* @__PURE__ */ e("span", { className: t.value, children: l[0].value })
79
- ] }),
80
- /* @__PURE__ */ e("div", { className: "h-4 w-px flex-shrink-0 bg-controls-disable-accent" }),
81
- /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
82
- /* @__PURE__ */ e(
83
- m,
84
- {
85
- text: l[1].title,
86
- className: "dial-tiny-text text-secondary"
87
- }
88
- ),
89
- /* @__PURE__ */ e("span", { className: t.value, children: l[1].value })
90
- ] })
71
+ ) : n ? /* @__PURE__ */ e(D, { size: 18, fullWidth: !1, className: "self-start" }) : s ? /* @__PURE__ */ c("div", { className: "grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] gap-x-3 gap-y-0.5", children: [
72
+ /* @__PURE__ */ e(
73
+ x,
74
+ {
75
+ text: s[0].title,
76
+ className: "col-start-1 dial-tiny-text text-secondary"
77
+ }
78
+ ),
79
+ /* @__PURE__ */ e(
80
+ x,
81
+ {
82
+ text: s[1].title,
83
+ className: "col-start-3 dial-tiny-text text-secondary"
84
+ }
85
+ ),
86
+ /* @__PURE__ */ e("span", { className: l("col-start-1 min-w-0", t.value), children: s[0].value }),
87
+ /* @__PURE__ */ e(
88
+ "div",
89
+ {
90
+ "aria-hidden": "true",
91
+ className: l(
92
+ "col-start-2 flex items-center self-start",
93
+ t.compareDividerCell
94
+ ),
95
+ children: /* @__PURE__ */ e("div", { className: "h-4 w-px bg-controls-disable-accent" })
96
+ }
97
+ ),
98
+ /* @__PURE__ */ e("span", { className: l("col-start-3 min-w-0", t.value), children: s[1].value })
91
99
  ] }) : /* @__PURE__ */ e("span", { className: t.value, children: p }),
92
- !r && !n && t.showDescription && i != null && i !== !1 && /* @__PURE__ */ e("span", { className: "dial-tiny-text text-secondary", children: i })
100
+ !i && !n && t.showDescription && r != null && r !== !1 && /* @__PURE__ */ e("span", { className: "mt-auto dial-tiny-text text-secondary", children: r })
93
101
  ]
94
102
  }
95
103
  );
96
104
  };
97
105
  export {
98
- _ as AnalyticsCard
106
+ T as AnalyticsCard
99
107
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.16.0-dev.60",
3
- "generatedAt": "2026-11-01T23:48:06.567Z",
2
+ "version": "0.16.0-dev.61",
3
+ "generatedAt": "2026-11-02T10:43:43.156Z",
4
4
  "kit": {
5
5
  "name": "@epam/ai-dial-ui-kit",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -1571,7 +1571,7 @@
1571
1571
  "name": "AnalyticsCard",
1572
1572
  "category": "Components_2_0/Analytics",
1573
1573
  "generation": "2.0",
1574
- "description": "A simple analytics summary card that displays a single metric as a title,\na prominent value, and an optional description.\naliases: MetricCard|StatCard|KpiCard\nDesign system 2.0\n\nTwo visual variants are available via the enum:\n- `Default` — `bg-layer-3`, large `dial-display2-text` value, supports a description.\n- `Compact` — denser `bg-layer-2` card with a `dial-body-semi-text` value and no\n description (the `description` prop is ignored in this variant).\n\n**Compare mode** — pass `compareValues` to split the value area 50/50 between two\nmetrics, each with its own sub-title. Long sub-titles truncate to a single line and\nshow the full text in a tooltip. Pair with `delta` to show a change badge next\nto the card title, and `deltaUnit` for a suffix such as `\"s\"`.",
1574
+ "description": "A simple analytics summary card that displays a single metric as a title,\na prominent value, and an optional description.\naliases: MetricCard|StatCard|KpiCard\nDesign system 2.0\n\nTwo visual variants are available via the enum:\n- `Default` — `bg-layer-3`, large `dial-display2-text` value, supports a description.\n- `Compact` — denser `bg-layer-2` card with a `dial-body-semi-text` value and no\n description (the `description` prop is ignored in this variant).\n\n**Compare mode** — pass `compareValues` to split the value area 50/50 between two\nmetrics, each with its own sub-title. Long sub-titles truncate to a single line and\nshow the full text in a tooltip. Pair with `delta` to show a change badge next\nto the card title, and `deltaUnit` for a suffix such as `\"s\"`. The divider is\ncentred on the first line of the two values, so dividers line up across cards\nwhose values differ in height.\n\n**Description placement** — when the card is stretched to the height of its row\n(a grid or flex row with equal-height items), the description sits at the\nbottom of the card with the free space between it and the value.",
1575
1575
  "props": [
1576
1576
  {
1577
1577
  "name": "title",