@epam/ai-dial-ui-kit 0.16.0-dev.47 → 0.16.0-dev.49
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.
- package/README.md +2 -0
- package/dist/CHANGELOG.md +3 -0
- package/dist/{DateCellRenderer-uqWWm9rI.cjs → DateCellRenderer-C3KzulHA.cjs} +2 -2
- package/dist/components/New/Analytics/Bar/Bar.js +7 -7
- package/dist/components/New/Analytics/BarGroup/BarGroup.js +4 -4
- package/dist/components/New/Analytics/Histogram/Histogram.js +12 -12
- package/dist/components/New/LabelledText/LabelledText.js +43 -0
- package/dist/components/New/Steps/Steps.js +84 -0
- package/dist/components-manifest.json +227 -551
- package/dist/constants/public-class-names.js +4 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +374 -382
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/migration-guides/0.16.0/legacy-analytics-and-steps-removal.md +54 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/src/components/{Analytics → New/Analytics}/Bar/utils.d.ts +1 -1
- package/dist/src/components/{Analytics → New/Analytics}/Histogram/utils.d.ts +1 -1
- package/dist/src/components/New/Analytics/index.d.ts +11 -0
- package/dist/src/components/New/LabelledText/LabelledText.d.ts +48 -0
- package/dist/src/components/New/Steps/Steps.d.ts +55 -0
- package/dist/src/constants/public-class-names.d.ts +4 -0
- package/dist/src/index.d.ts +7 -14
- package/package.json +1 -1
- package/dist/components/Analytics/Bar/Bar.js +0 -80
- package/dist/components/Analytics/BarGroup/BarGroup.js +0 -142
- package/dist/components/Analytics/Card/Card.js +0 -87
- package/dist/components/Analytics/ErrorTag/ErrorTag.js +0 -19
- package/dist/components/Analytics/Histogram/Histogram.js +0 -200
- package/dist/components/Steps/Step.js +0 -34
- package/dist/components/Steps/Steps.js +0 -27
- package/dist/components/Steps/utils.js +0 -42
- package/dist/src/components/Analytics/Bar/Bar.d.ts +0 -86
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +0 -103
- package/dist/src/components/Analytics/Card/Card.d.ts +0 -91
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +0 -22
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +0 -59
- package/dist/src/components/Analytics/index.d.ts +0 -13
- package/dist/src/components/Steps/Step.d.ts +0 -9
- package/dist/src/components/Steps/Steps.d.ts +0 -26
- package/dist/src/components/Steps/utils.d.ts +0 -3
- /package/dist/components/{Analytics → New/Analytics}/Bar/utils.js +0 -0
- /package/dist/components/{Analytics → New/Analytics}/Histogram/utils.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { DIAL_KIT_CLASS as h } from "../../../../constants/public-class-names.js";
|
|
3
2
|
import { Badge as S } from "../../Badge/Badge.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { Spinner as _ } from "../../../Spinner/Spinner.js";
|
|
4
|
+
import { DIAL_KIT_CLASS as h } from "../../../../constants/public-class-names.js";
|
|
5
|
+
import { BadgeColor as R, BadgeVariant as T } from "../../../../types/badge.js";
|
|
6
6
|
import { mergeClasses as r } from "../../../../utils/merge-classes.js";
|
|
7
|
-
import { getAnalyticsBarColor as j, DEFAULT_ANALYTICS_BAR_COLOR_MAP as k, getAnalyticsBarRatio as F } from "
|
|
7
|
+
import { getAnalyticsBarColor as j, DEFAULT_ANALYTICS_BAR_COLOR_MAP as k, getAnalyticsBarRatio as F } from "./utils.js";
|
|
8
8
|
const K = ({
|
|
9
9
|
value: e,
|
|
10
10
|
maxValue: c = 1,
|
|
@@ -23,11 +23,11 @@ const K = ({
|
|
|
23
23
|
S,
|
|
24
24
|
{
|
|
25
25
|
label: "Error",
|
|
26
|
-
variant:
|
|
27
|
-
color:
|
|
26
|
+
variant: T.Filled,
|
|
27
|
+
color: R.Red,
|
|
28
28
|
textClassName: "dial-tiny-semi-text"
|
|
29
29
|
}
|
|
30
|
-
) : t ? /* @__PURE__ */ a(
|
|
30
|
+
) : t ? /* @__PURE__ */ a(_, { size: 18, fullWidth: !1 }) : /* @__PURE__ */ a(
|
|
31
31
|
"span",
|
|
32
32
|
{
|
|
33
33
|
className: r(
|
|
@@ -2,9 +2,9 @@ import { jsx as e, jsxs as f, Fragment as H } from "react/jsx-runtime";
|
|
|
2
2
|
import { Fragment as J } from "react";
|
|
3
3
|
import { Accordion as Q } from "../../Accordion/Accordion.js";
|
|
4
4
|
import { AnalyticsBar as b } from "../Bar/Bar.js";
|
|
5
|
-
import { DIAL_KIT_CLASS as R } from "../../../../constants/public-class-names.js";
|
|
6
|
-
import { Spinner as U } from "../../../Spinner/Spinner.js";
|
|
7
5
|
import { Tooltip as x } from "../../Tooltip/Tooltip.js";
|
|
6
|
+
import { Spinner as R } from "../../../Spinner/Spinner.js";
|
|
7
|
+
import { DIAL_KIT_CLASS as U } from "../../../../constants/public-class-names.js";
|
|
8
8
|
import { mergeClasses as o } from "../../../../utils/merge-classes.js";
|
|
9
9
|
const et = ({
|
|
10
10
|
title: g,
|
|
@@ -38,7 +38,7 @@ const et = ({
|
|
|
38
38
|
description: G,
|
|
39
39
|
defaultExpanded: I,
|
|
40
40
|
nonCollapsible: K,
|
|
41
|
-
className: o(z,
|
|
41
|
+
className: o(z, U.analyticsBarGroup),
|
|
42
42
|
children: /* @__PURE__ */ e(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
@@ -46,7 +46,7 @@ const et = ({
|
|
|
46
46
|
"flex flex-col",
|
|
47
47
|
r ? "gap-4" : a ? "gap-2" : "gap-3"
|
|
48
48
|
),
|
|
49
|
-
children: T ? /* @__PURE__ */ e(
|
|
49
|
+
children: T ? /* @__PURE__ */ e(R, { size: 18, fullWidth: !1, className: "self-center" }) : r ? q.map((t) => {
|
|
50
50
|
const l = t in i ? i[t] : null, n = t in r ? r[t] : null, s = typeof l == "number" && typeof n == "number" ? parseFloat((n - l).toFixed(3)) : null, F = s != null && s !== 0, L = F && s > 0, S = F ? L ? `+${s}` : String(s) : null, O = C?.[t], $ = /* @__PURE__ */ e("span", { className: "dial-small-text text-secondary", children: t }), w = /* @__PURE__ */ f(H, { children: [
|
|
51
51
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
52
52
|
O ? /* @__PURE__ */ e(x, { tooltip: O, children: $ }) : $,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { DEFAULT_ANALYTICS_BAR_COLOR_MAP as Y } from "
|
|
3
|
-
import {
|
|
4
|
-
import { Spinner as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { DEFAULT_ANALYTICS_BAR_COLOR_MAP as Y } from "../Bar/utils.js";
|
|
3
|
+
import { Tooltip as w } from "../../Tooltip/Tooltip.js";
|
|
4
|
+
import { Spinner as k } from "../../../Spinner/Spinner.js";
|
|
5
|
+
import { DIAL_KIT_CLASS as P } from "../../../../constants/public-class-names.js";
|
|
6
|
+
import { TooltipPlacement as A } from "../../../../types/tooltip.js";
|
|
7
7
|
import { mergeClasses as H } from "../../../../utils/merge-classes.js";
|
|
8
|
-
import { buildHistogramColumns as T, formatHistogramColumnLabel as L, getHistogramYTicks as O, getHistogramYMax as R } from "
|
|
8
|
+
import { buildHistogramColumns as T, formatHistogramColumnLabel as L, getHistogramYTicks as O, getHistogramYMax as R } from "./utils.js";
|
|
9
9
|
const u = 128, D = (s, i) => {
|
|
10
10
|
const l = L(s, i);
|
|
11
11
|
return s === i ? `scored ${l}` : `scored between ${l}`;
|
|
@@ -48,9 +48,9 @@ const u = 128, D = (s, i) => {
|
|
|
48
48
|
borderColor: e.color
|
|
49
49
|
} : { backgroundColor: e.color };
|
|
50
50
|
return /* @__PURE__ */ t(
|
|
51
|
-
|
|
51
|
+
w,
|
|
52
52
|
{
|
|
53
|
-
placement:
|
|
53
|
+
placement: A.Bottom,
|
|
54
54
|
tooltip: r,
|
|
55
55
|
triggerClassName: "flex h-full flex-1 items-end",
|
|
56
56
|
children: /* @__PURE__ */ t(
|
|
@@ -72,7 +72,7 @@ const u = 128, D = (s, i) => {
|
|
|
72
72
|
className: H(
|
|
73
73
|
"flex flex-col gap-2",
|
|
74
74
|
I,
|
|
75
|
-
|
|
75
|
+
P.analyticsHistogram
|
|
76
76
|
),
|
|
77
77
|
children: [
|
|
78
78
|
/* @__PURE__ */ t("span", { className: "dial-small-text text-primary", children: s }),
|
|
@@ -81,7 +81,7 @@ const u = 128, D = (s, i) => {
|
|
|
81
81
|
{
|
|
82
82
|
className: "flex items-center justify-center",
|
|
83
83
|
style: { height: u },
|
|
84
|
-
children: /* @__PURE__ */ t(
|
|
84
|
+
children: /* @__PURE__ */ t(k, { size: 18, fullWidth: !1 })
|
|
85
85
|
}
|
|
86
86
|
) : /* @__PURE__ */ n("div", { className: "grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1", children: [
|
|
87
87
|
/* @__PURE__ */ t(
|
|
@@ -165,9 +165,9 @@ const u = 128, D = (s, i) => {
|
|
|
165
165
|
},
|
|
166
166
|
r
|
|
167
167
|
) : /* @__PURE__ */ t(
|
|
168
|
-
|
|
168
|
+
w,
|
|
169
169
|
{
|
|
170
|
-
placement:
|
|
170
|
+
placement: A.Bottom,
|
|
171
171
|
tooltip: a,
|
|
172
172
|
triggerClassName: "flex h-full flex-1 items-end",
|
|
173
173
|
children: /* @__PURE__ */ t(
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { EllipsisTooltip as p } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
3
|
+
import { Label as x } from "../Label/Label.js";
|
|
4
|
+
import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
|
|
5
|
+
import { mergeClasses as n } from "../../../utils/merge-classes.js";
|
|
6
|
+
const b = ({
|
|
7
|
+
label: s,
|
|
8
|
+
text: l,
|
|
9
|
+
tooltip: t,
|
|
10
|
+
children: e,
|
|
11
|
+
postfix: a,
|
|
12
|
+
className: r
|
|
13
|
+
}) => {
|
|
14
|
+
const i = !!e || l != null;
|
|
15
|
+
return /* @__PURE__ */ m(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: n(
|
|
19
|
+
"flex flex-col gap-1",
|
|
20
|
+
!e && "max-w-[200px]",
|
|
21
|
+
r,
|
|
22
|
+
f.labelledText
|
|
23
|
+
),
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ o(x, { label: s }),
|
|
26
|
+
i && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2 text-primary", children: [
|
|
27
|
+
e ?? /* @__PURE__ */ o(
|
|
28
|
+
p,
|
|
29
|
+
{
|
|
30
|
+
text: l,
|
|
31
|
+
customTooltipContent: t,
|
|
32
|
+
className: "dial-small-text min-w-0 flex-1"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
!e && a
|
|
36
|
+
] })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
b as LabelledText
|
|
43
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as o, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { IconExclamationCircle as h, IconCheck as p } from "@tabler/icons-react";
|
|
3
|
+
import { DIAL_KIT_ICON_STROKE as u } from "../constants/icon.js";
|
|
4
|
+
import { DIAL_ICON_SIZE as d } from "../../../constants/icon.js";
|
|
5
|
+
import { DIAL_KIT_CLASS as y } from "../../../constants/public-class-names.js";
|
|
6
|
+
import { StepStatus as t } from "../../../models/step.js";
|
|
7
|
+
import { mergeClasses as l } from "../../../utils/merge-classes.js";
|
|
8
|
+
const A = {
|
|
9
|
+
[t.VALID]: "Completed",
|
|
10
|
+
[t.ERROR]: "Error"
|
|
11
|
+
}, S = (e, s) => e.status === t.ERROR ? s ? "border-error text-primary" : "border-error text-error" : s ? e.status === t.VALID ? "border-success text-primary" : "border-accent text-primary" : e.status === t.VALID ? "border-primary text-primary" : "border-primary text-secondary", R = (e, s) => e.status === t.ERROR ? "bg-control-error text-control-permanent" : e.status === t.VALID && !s ? "bg-success text-success" : s ? e.status === t.VALID ? "bg-success text-success" : "bg-control-accent text-control-permanent" : "bg-layer-sunken text-secondary", N = ({
|
|
12
|
+
steps: e,
|
|
13
|
+
currentStep: s,
|
|
14
|
+
onChangeStep: m,
|
|
15
|
+
statusLabels: f,
|
|
16
|
+
ariaLabel: x,
|
|
17
|
+
className: I
|
|
18
|
+
}) => {
|
|
19
|
+
const b = (r) => {
|
|
20
|
+
if (r === s) return;
|
|
21
|
+
const a = e.findIndex((n) => n.id === s), i = e.findIndex((n) => n.id === r);
|
|
22
|
+
(e.slice(0, i).every((n) => n.status === t.VALID) || i < a) && m(r);
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ o(
|
|
25
|
+
"ol",
|
|
26
|
+
{
|
|
27
|
+
"aria-label": x,
|
|
28
|
+
className: l(
|
|
29
|
+
"m-0 flex list-none gap-x-3 p-0",
|
|
30
|
+
I,
|
|
31
|
+
y.steps
|
|
32
|
+
),
|
|
33
|
+
children: e.map((r, a) => {
|
|
34
|
+
const i = s === r.id, c = r.status ? f?.[r.status] ?? A[r.status] : void 0;
|
|
35
|
+
let n = a + 1;
|
|
36
|
+
return i && r.status === t.ERROR ? n = /* @__PURE__ */ o(
|
|
37
|
+
h,
|
|
38
|
+
{
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
size: d.SM,
|
|
41
|
+
stroke: u
|
|
42
|
+
}
|
|
43
|
+
) : !i && r.status === t.VALID && (n = /* @__PURE__ */ o(
|
|
44
|
+
p,
|
|
45
|
+
{
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
size: d.SM,
|
|
48
|
+
stroke: u
|
|
49
|
+
}
|
|
50
|
+
)), /* @__PURE__ */ o("li", { className: "flex min-w-[180px] flex-1", children: /* @__PURE__ */ L(
|
|
51
|
+
"button",
|
|
52
|
+
{
|
|
53
|
+
type: "button",
|
|
54
|
+
"aria-current": i ? "step" : void 0,
|
|
55
|
+
onClick: () => b(r.id),
|
|
56
|
+
className: l(
|
|
57
|
+
"flex h-8 w-full cursor-pointer items-center border-t-2 text-start dial-tiny-text",
|
|
58
|
+
"focus-visible:outline focus-visible:outline-focus",
|
|
59
|
+
S(r, i)
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ o(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: l(
|
|
67
|
+
"me-2 flex size-[22px] shrink-0 items-center justify-center rounded-full",
|
|
68
|
+
R(r, i)
|
|
69
|
+
),
|
|
70
|
+
children: n
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ o("span", { children: r.name }),
|
|
74
|
+
c && /* @__PURE__ */ o("span", { className: "sr-only", children: c })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
) }, r.id);
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
N as Steps
|
|
84
|
+
};
|