@epam/ai-dial-ui-kit 0.16.0-dev.38 → 0.16.0-dev.39
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/dist/CHANGELOG.md +2 -0
- package/dist/components/New/Tag/Tag.js +34 -34
- package/dist/components/New/Tag/constants.js +13 -4
- package/dist/components-manifest.json +9 -4
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/src/components/New/Tag/Tag.d.ts +9 -5
- package/dist/src/components/New/Tag/constants.d.ts +12 -4
- package/dist/src/types/tag.d.ts +3 -1
- package/dist/types/tag.js +2 -2
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -27,6 +27,8 @@ Versions match the git tags on the `development` branch.
|
|
|
27
27
|
|
|
28
28
|
- **`SelectedEntityCard` (2.0)** — the card of a form field that holds one selected entity (a model, an agent, a toolset): its `EntityIdentity`, a skeleton while the catalog loads, its raw id when the catalog does not list it, or a placeholder when nothing is selected, with an optional details line and an error under it. Quick Apps' Default model card and the DIAL Loop editor's Model card were two copies of it. Additive.
|
|
29
29
|
|
|
30
|
+
- **`Tag` (2.0) — `TagAppearance.Bordered`** — the compact value chip of a form field (an allowed host, a variable, an override): 24px tall, a 6px corner, the outlined `Badge`'s `border-tertiary` rim on `bg-layer-sunken` — a `Badge` the user can remove, and the small type scale. The 32px rimless pill vanished on a raised surface, so a form had to restyle the kit's markup to make its values visible. Additive.
|
|
31
|
+
|
|
30
32
|
- **`EntityIdentity` (2.0) — `showType`** — leaves the type label out, for an identity next to a heading that already names the type (the Model block of a form). Additive.
|
|
31
33
|
|
|
32
34
|
- **`EntityIdentity` (2.0) — `footer` follows the name** — the footer was pinned to the bottom of the text column with a 4px gap (`mt-auto pt-1`); it now sits right under the name, so a details line reads as part of the identity. A host that relied on the old gap adds its own.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { IconX as
|
|
1
|
+
import { jsxs as k, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { IconX as x } from "@tabler/icons-react";
|
|
3
3
|
import { DIAL_KIT_ICON_STROKE as _ } from "../constants/icon.js";
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
5
|
-
import { ElementSize as
|
|
4
|
+
import { DIAL_ICON_SIZE as D } from "../../../constants/icon.js";
|
|
5
|
+
import { ElementSize as T } from "../../../types/size.js";
|
|
6
6
|
import { TagAppearance as d } from "../../../types/tag.js";
|
|
7
|
-
import { mergeClasses as
|
|
7
|
+
import { mergeClasses as y } from "../../../utils/merge-classes.js";
|
|
8
8
|
import { GhostIconButton as A } from "../IconButton/IconButtonWrappers.js";
|
|
9
|
-
import { tagInteractiveClassName as K, tagHoverClassName as L, tagStateClassNames as w,
|
|
10
|
-
import { DIAL_KIT_CLASS as
|
|
11
|
-
const
|
|
9
|
+
import { tagInteractiveClassName as K, tagHoverClassName as L, tagStateClassNames as w, tagShapeClassNames as z, tagBaseClassName as E } from "./constants.js";
|
|
10
|
+
import { DIAL_KIT_CLASS as O } from "../../../constants/public-class-names.js";
|
|
11
|
+
const Z = ({
|
|
12
12
|
label: o,
|
|
13
|
-
icon:
|
|
14
|
-
appearance:
|
|
13
|
+
icon: l,
|
|
14
|
+
appearance: s = d.Outlined,
|
|
15
15
|
selected: i = !1,
|
|
16
|
-
disabled:
|
|
16
|
+
disabled: a = !1,
|
|
17
17
|
closable: p = !1,
|
|
18
18
|
removeLabel: u,
|
|
19
19
|
className: I,
|
|
@@ -21,45 +21,45 @@ const X = ({
|
|
|
21
21
|
onClick: n,
|
|
22
22
|
onRemove: c,
|
|
23
23
|
onKeyDown: h,
|
|
24
|
-
...
|
|
24
|
+
...m
|
|
25
25
|
}) => {
|
|
26
|
-
const f =
|
|
27
|
-
h?.(e), !(!
|
|
26
|
+
const f = s === d.Selectable, t = !!n && !a, N = p && !!c && !a, S = f && i, C = (e) => {
|
|
27
|
+
h?.(e), !(!t || e.defaultPrevented) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
28
28
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ k(
|
|
30
30
|
"span",
|
|
31
31
|
{
|
|
32
|
-
...
|
|
33
|
-
role:
|
|
34
|
-
tabIndex:
|
|
35
|
-
"aria-disabled":
|
|
36
|
-
"aria-pressed": f &&
|
|
37
|
-
onClick:
|
|
38
|
-
onKeyDown:
|
|
39
|
-
className:
|
|
40
|
-
|
|
41
|
-
S ? "dial-tiny-semi-text" :
|
|
42
|
-
w[
|
|
32
|
+
...m,
|
|
33
|
+
role: t ? "button" : m.role,
|
|
34
|
+
tabIndex: t ? 0 : m.tabIndex,
|
|
35
|
+
"aria-disabled": a || void 0,
|
|
36
|
+
"aria-pressed": f && t ? i : void 0,
|
|
37
|
+
onClick: a ? void 0 : n,
|
|
38
|
+
onKeyDown: C,
|
|
39
|
+
className: y(
|
|
40
|
+
E,
|
|
41
|
+
S ? "dial-tiny-semi-text" : z[s],
|
|
42
|
+
w[s][i ? "selected" : "default"],
|
|
43
43
|
// The design defines no disabled tag, so a disabled one keeps its
|
|
44
44
|
// colours and only stops responding.
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
a && "cursor-not-allowed",
|
|
46
|
+
t && [K, L],
|
|
47
47
|
I,
|
|
48
|
-
|
|
48
|
+
O.tag
|
|
49
49
|
),
|
|
50
50
|
children: [
|
|
51
|
-
|
|
51
|
+
l && /* @__PURE__ */ r("span", { className: "flex shrink-0 items-center", "aria-hidden": "true", children: l }),
|
|
52
52
|
/* @__PURE__ */ r("span", { className: "truncate", title: g ?? o, children: o }),
|
|
53
53
|
N && /* @__PURE__ */ r(
|
|
54
54
|
A,
|
|
55
55
|
{
|
|
56
56
|
className: "size-[16px] shrink-0 dial-kit-minimum-target",
|
|
57
|
-
size:
|
|
57
|
+
size: T.Small,
|
|
58
58
|
"aria-label": u ?? `Remove ${o}`,
|
|
59
59
|
icon: /* @__PURE__ */ r(
|
|
60
|
-
|
|
60
|
+
x,
|
|
61
61
|
{
|
|
62
|
-
size:
|
|
62
|
+
size: D.SM,
|
|
63
63
|
stroke: _,
|
|
64
64
|
"aria-hidden": "true"
|
|
65
65
|
}
|
|
@@ -74,5 +74,5 @@ const X = ({
|
|
|
74
74
|
);
|
|
75
75
|
};
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
Z as Tag
|
|
78
78
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { TagAppearance as e } from "../../../types/tag.js";
|
|
2
2
|
const a = "inline-flex h-[32px] max-w-full items-center gap-1 rounded-full px-3", l = {
|
|
3
|
+
[e.Outlined]: "dial-tiny-text",
|
|
4
|
+
[e.Selectable]: "dial-tiny-text",
|
|
5
|
+
[e.Bordered]: "h-[24px] rounded-md border px-2 dial-small-text"
|
|
6
|
+
}, r = {
|
|
3
7
|
[e.Outlined]: {
|
|
4
8
|
default: "bg-layer-raised text-primary",
|
|
5
9
|
selected: "bg-control-accent-alpha text-primary"
|
|
@@ -7,11 +11,16 @@ const a = "inline-flex h-[32px] max-w-full items-center gap-1 rounded-full px-3"
|
|
|
7
11
|
[e.Selectable]: {
|
|
8
12
|
default: "text-secondary",
|
|
9
13
|
selected: "bg-control-accent-alpha text-primary"
|
|
14
|
+
},
|
|
15
|
+
[e.Bordered]: {
|
|
16
|
+
default: "border-tertiary bg-layer-sunken text-primary",
|
|
17
|
+
selected: "border-accent bg-control-accent-alpha text-primary"
|
|
10
18
|
}
|
|
11
|
-
},
|
|
19
|
+
}, o = "cursor-pointer outline-offset-0 focus-visible:outline focus-visible:outline-focus", c = "hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active";
|
|
12
20
|
export {
|
|
13
21
|
a as tagBaseClassName,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
l as
|
|
22
|
+
c as tagHoverClassName,
|
|
23
|
+
o as tagInteractiveClassName,
|
|
24
|
+
l as tagShapeClassNames,
|
|
25
|
+
r as tagStateClassNames
|
|
17
26
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.16.0-dev.
|
|
3
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"version": "0.16.0-dev.39",
|
|
3
|
+
"generatedAt": "2026-10-23T16:09:19.048Z",
|
|
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",
|
|
@@ -4149,7 +4149,7 @@
|
|
|
4149
4149
|
"name": "Tag",
|
|
4150
4150
|
"category": "Components_2_0",
|
|
4151
4151
|
"generation": "2.0",
|
|
4152
|
-
"description": "A compact label element used for selections, filters, or categories.\naliases: Chip|Pill\nDesign system 2.0\n\nThe tag
|
|
4152
|
+
"description": "A compact label element used for selections, filters, or categories.\naliases: Chip|Pill\nDesign system 2.0\n\nThe tag is the 32px pill of the 2.0 design; `TagAppearance.Bordered` is the\ncompact 24px value chip of a form field. There is no `size` prop: a tag sizes\nitself, and a caller that needs a different height is usually reaching for a\nbutton.\n\nThe label truncates rather than wrapping, and carries a native `title` so the\nfull text stays reachable when it does.\n\nA tag with `onClick` becomes a `role=\"button\"` operable with Enter and Space.\nIts remove control is a real nested `<button>`, so keep the two roles apart in\nthe caller: a clickable tag that is also closable gives a screen reader two\nactions with no way to tell which one it landed on.\n\n`outlined` and `selectable` draw no rim and are told apart by their fill;\n`bordered` draws one: the outlined `Badge`'s look, for a value the user can\nremove, on a surface the rimless fill would vanish on.\n`TagAppearance.Selectable` is the filter chip of the 2.0 design: no fill\nat all until it is selected, one hover tint shared by both states, a semibold\nlabel once selected, and the state carried on `aria-pressed` rather than by\nthe tint alone. Give it an `onClick` — a selectable tag that cannot be\nactivated is a colour and nothing else.\n\nSelecting one therefore changes its width by the difference between the\nregular and semibold label. In a wrapping filter row that is what the design\nasks for; if a fixed width matters, give the chip one.",
|
|
4153
4153
|
"props": [
|
|
4154
4154
|
{
|
|
4155
4155
|
"name": "label",
|
|
@@ -4168,7 +4168,7 @@
|
|
|
4168
4168
|
"type": "TagAppearance",
|
|
4169
4169
|
"required": false,
|
|
4170
4170
|
"defaultValue": "TagAppearance.Outlined",
|
|
4171
|
-
"description": "`outlined` is the filled chip on the raised\nlayer; `selectable` is the unfilled filter chip that tints and turns semibold when selected."
|
|
4171
|
+
"description": "`outlined` is the filled chip on the raised\nlayer; `selectable` is the unfilled filter chip that tints and turns semibold when selected;\n`bordered` is the compact rimmed value chip of a form field."
|
|
4172
4172
|
},
|
|
4173
4173
|
{
|
|
4174
4174
|
"name": "selected",
|
|
@@ -11493,6 +11493,11 @@
|
|
|
11493
11493
|
{
|
|
11494
11494
|
"name": "Selectable",
|
|
11495
11495
|
"value": "'selectable'"
|
|
11496
|
+
},
|
|
11497
|
+
{
|
|
11498
|
+
"name": "Bordered",
|
|
11499
|
+
"value": "'bordered'",
|
|
11500
|
+
"comment": "The compact, rimmed chip of a value in a form field (a host, a variable)."
|
|
11496
11501
|
}
|
|
11497
11502
|
],
|
|
11498
11503
|
"sourceFile": "types/tag.ts"
|