@epam/ai-dial-ui-kit 0.13.0-dev.65 → 0.13.0-dev.66

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.
@@ -15,9 +15,10 @@ export interface DialAnalyticsBarGroupProps {
15
15
  /**
16
16
  * When provided, enables compare mode: keys are the union of `data` and
17
17
  * `compareData`. Each entry renders two bars and, when both sides are numeric,
18
- * a delta badge (`data[key] - compareData[key]`). A missing key (or explicit
19
- * `null`) on either side shows an em dash with no progress bar and no delta.
20
- * `onBarClick` is ignored in compare mode.
18
+ * a delta badge (`compareData[key] - data[key]`, three decimal places). A
19
+ * missing key (or explicit `null`) on either side shows an em dash with no
20
+ * progress bar and no delta. A rounded delta of `0` is omitted. `onBarClick`
21
+ * is ignored in compare mode.
21
22
  */
22
23
  compareData?: Record<string, number | null>;
23
24
  /**
@@ -77,7 +78,7 @@ export interface DialAnalyticsBarGroupProps {
77
78
  * @param [titleTooltip] - Tooltip shown when hovering the accordion header title.
78
79
  * @param [description] - Description passed to the accordion header. Defaults to the number of entries.
79
80
  * @param data - Map of metric name to numeric value (or `null` when missing). Each entry renders one bar.
80
- * @param [compareData] - Enables compare mode: union of keys, delta badge when both sides are numeric, em dash (no bar) when a side is missing.
81
+ * @param [compareData] - Enables compare mode: union of keys, delta badge (`compareData − data`) when both sides are numeric and the rounded delta is non-zero, em dash (no bar) when a side is missing.
81
82
  * @param [compareLabels] - Labels for the two bars in compare mode: first for `data`, second for `compareData`.
82
83
  * @param [maxValue] - Upper bound passed to every bar.
83
84
  * @param [colorMap] - Color map passed to every bar.
@@ -25,6 +25,11 @@ export interface DialAnalyticsCardProps {
25
25
  * When omitted, `delta ≥ 0` → success, `delta < 0` → error.
26
26
  */
27
27
  deltaPositive?: boolean;
28
+ /**
29
+ * Suffix appended to the formatted delta with no space (e.g. `"s"` → `+9s`,
30
+ * `-19s`). Any string is valid (`s`, `ms`, `%`).
31
+ */
32
+ deltaUnit?: string;
28
33
  /**
29
34
  * When provided, enables compare mode: the value area is split 50/50 with a
30
35
  * vertical divider and each side shows its own sub-title and value.
@@ -45,7 +50,7 @@ export interface DialAnalyticsCardProps {
45
50
  *
46
51
  * **Compare mode** — pass `compareValues` to split the value area 50/50 between two
47
52
  * metrics, each with its own sub-title. Pair with `delta` to show a change badge next
48
- * to the card title.
53
+ * to the card title, and `deltaUnit` for a suffix such as `"s"`.
49
54
  *
50
55
  * @example
51
56
  * ```tsx
@@ -60,7 +65,9 @@ export interface DialAnalyticsCardProps {
60
65
  * ```tsx
61
66
  * <DialAnalyticsCard
62
67
  * title="Response time"
63
- * delta={12}
68
+ * delta={9}
69
+ * deltaUnit="s"
70
+ * deltaPositive={false}
64
71
  * compareValues={[
65
72
  * { title: 'This week', value: '248ms' },
66
73
  * { title: 'Last week', value: '220ms' },
@@ -76,6 +83,8 @@ export interface DialAnalyticsCardProps {
76
83
  * @param [isLoading] - Renders a loader in place of the value.
77
84
  * @param [className] - Additional CSS classes for the card container.
78
85
  * @param [delta] - Numeric change shown as a badge next to the title. ≥0 = success, <0 = error.
86
+ * @param [deltaPositive] - Overrides sign-based badge colour. Use for lower-is-better metrics.
87
+ * @param [deltaUnit] - Suffix appended to the formatted delta (e.g. `"s"` → `+9s`).
79
88
  * @param [compareValues] - Enables compare mode with two side-by-side metrics.
80
89
  */
81
90
  export declare const DialAnalyticsCard: FC<DialAnalyticsCardProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.13.0-dev.65",
3
+ "version": "0.13.0-dev.66",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",