@epam/ai-dial-ui-kit 0.16.0-dev.67 → 0.16.0-dev.68
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/Breadcrumbs/Breadcrumbs.js +65 -61
- package/dist/components/New/Breadcrumbs/constants.js +40 -21
- package/dist/components-manifest.json +9 -4
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +8 -5
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +17 -10
- package/dist/src/types/breadcrumbs.d.ts +6 -0
- package/dist/types/breadcrumbs.js +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -87,6 +87,8 @@ Versions match the git tags on the `development` branch.
|
|
|
87
87
|
|
|
88
88
|
- **`Calendar` (2.0) — `time` mode opens an hour/minute picker, `showTimePicker`** — the `time` field was a bare masked `HH:mm` input, which is easy to mistype and gives no sense of what is valid. A clock button at the field's trailing edge now opens a popover with an hour and a minute column: picking an hour keeps the current minutes (or `00`), picking minutes closes the popover, and ArrowUp / ArrowDown / Home / End move between options. Typing `HH:mm` still works and `onChange` / `onBlur` fire as before, so consumers need no changes, but the field now renders inside a wrapper and shows the button; `showTimePicker={false}` restores the bare field. The `datetime` popover's time field is unchanged. Requested from `ai-dial-chat`.
|
|
89
89
|
|
|
90
|
+
- **`Breadcrumbs` (2.0) — `BreadcrumbsSize.Tiny`, a 16px trail for a dense header** — the new size draws the trail at `dial-tiny-text` (12px / 16px) with a `dial-tiny-semi-text` current page, the design's Tiny Text. It also lifts the two limits the other sizes keep. The middle segments are not capped at 30% of the trail nor the current page at 51%: the middle gives way first, down to a letter and its chevron, and the current page truncates only once nothing else can, so a long current label is no longer cut while the row has room. The `nav` does not clip, since the segments truncate on their own, so a segment's focus ring stays whole without a `-m-1 p-1` wrapper; the ring is the design's 1px outline at a 1px offset around a 4px radius. `BreadcrumbsSize.Small` stays the default and, like `BreadcrumbsSize.Heading`, is unchanged.
|
|
91
|
+
|
|
90
92
|
### Changed
|
|
91
93
|
|
|
92
94
|
- **`StarterButton` (2.0) — transparent at rest** — the starter pill no longer fills with `bg-control-neutral` (`#fcfcfc`) at rest: it is transparent with the 1px `border-default` stroke (`--stroke-default`, `#b2c2dd`), and fills only on hover (`bg-control-neutral-hover-muted`, `#e0e6f0`) and press (`bg-control-neutral-active`, `#d1dbea`), as the design specifies. On a surface other than the page background it now shows that surface through. Label, icons, focus ring and disabled state are unchanged.
|
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { IconDots as
|
|
3
|
-
import { useMemo as u, useCallback as
|
|
4
|
-
import { Dropdown as
|
|
5
|
-
import { EllipsisTooltip as
|
|
6
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
7
|
-
import { DIAL_ICON_SIZE as
|
|
8
|
-
import { DIAL_KIT_CLASS as
|
|
9
|
-
import { BreadcrumbsSize as
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { IconDots as B } from "@tabler/icons-react";
|
|
3
|
+
import { useMemo as u, useCallback as D } from "react";
|
|
4
|
+
import { Dropdown as w } from "../Dropdown/Dropdown.js";
|
|
5
|
+
import { EllipsisTooltip as F } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
6
|
+
import { DIAL_KIT_ICON_STROKE as y } from "../constants/icon.js";
|
|
7
|
+
import { DIAL_ICON_SIZE as K } from "../../../constants/icon.js";
|
|
8
|
+
import { DIAL_KIT_CLASS as g } from "../../../constants/public-class-names.js";
|
|
9
|
+
import { BreadcrumbsSize as O } from "../../../types/breadcrumbs.js";
|
|
10
10
|
import { mergeClasses as o } from "../../../utils/merge-classes.js";
|
|
11
|
-
import { listClassName as
|
|
12
|
-
const
|
|
11
|
+
import { listClassName as R, focusRingClassName as b, overflowButtonClassName as j, defaultSeparator as V, separatorClassName as I, sizeClassName as S, itemClassName as k, navClassName as W, DEFAULT_MAX_VISIBLE_ITEMS as P, MIN_VISIBLE_ITEMS as U, linkSegmentClassName as X, staticSegmentClassName as Z, currentSegmentClassName as $, currentSizeClassName as q, segmentClassName as G, segmentWidthClassName as H } from "./constants.js";
|
|
12
|
+
const oe = ({
|
|
13
13
|
items: s,
|
|
14
|
-
maxVisibleItems:
|
|
15
|
-
size:
|
|
16
|
-
separator:
|
|
17
|
-
ariaLabel:
|
|
18
|
-
overflowAriaLabel:
|
|
19
|
-
className:
|
|
20
|
-
itemClassName:
|
|
14
|
+
maxVisibleItems: _ = P,
|
|
15
|
+
size: n = O.Small,
|
|
16
|
+
separator: p = V,
|
|
17
|
+
ariaLabel: M = "Breadcrumb",
|
|
18
|
+
overflowAriaLabel: E = "Show hidden path segments",
|
|
19
|
+
className: L,
|
|
20
|
+
itemClassName: T
|
|
21
21
|
}) => {
|
|
22
|
-
const m = Math.max(
|
|
22
|
+
const m = Math.max(_, U), t = u(
|
|
23
23
|
() => s.length > m ? s.slice(1, -(m - 2)) : [],
|
|
24
24
|
[s, m]
|
|
25
|
-
),
|
|
26
|
-
() =>
|
|
25
|
+
), v = u(
|
|
26
|
+
() => t.map((e, l) => ({
|
|
27
27
|
key: String(l),
|
|
28
28
|
label: e.label,
|
|
29
29
|
icon: e.icon
|
|
30
30
|
})),
|
|
31
|
-
[
|
|
32
|
-
),
|
|
31
|
+
[t]
|
|
32
|
+
), x = D(
|
|
33
33
|
({ key: e, domEvent: l }) => {
|
|
34
|
-
const r =
|
|
34
|
+
const r = t[Number(e)];
|
|
35
35
|
r && (r.onClick?.(l), !r.onClick && r.href && !l.defaultPrevented && (window.location.href = r.href));
|
|
36
36
|
},
|
|
37
|
-
[
|
|
37
|
+
[t]
|
|
38
38
|
);
|
|
39
39
|
if (s.length === 0) return null;
|
|
40
|
-
const d = s.slice(
|
|
40
|
+
const d = s.slice(t.length + 1), C = (e, {
|
|
41
41
|
index: l,
|
|
42
42
|
isFirst: r,
|
|
43
|
-
isCurrent:
|
|
43
|
+
isCurrent: c
|
|
44
44
|
}) => {
|
|
45
|
-
const N = !
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
const N = !c && (!!e.href || !!e.onClick), h = o(
|
|
46
|
+
G,
|
|
47
|
+
b[n],
|
|
48
|
+
N ? X : c ? o($, q[n]) : Z,
|
|
49
|
+
T,
|
|
50
|
+
g.breadcrumbsItem
|
|
51
|
+
), f = /* @__PURE__ */ i(A, { children: [
|
|
51
52
|
e.icon,
|
|
52
|
-
/* @__PURE__ */ a(
|
|
53
|
+
/* @__PURE__ */ a(F, { text: e.label })
|
|
53
54
|
] });
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ i(
|
|
55
56
|
"li",
|
|
56
57
|
{
|
|
57
58
|
className: o(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
k,
|
|
60
|
+
S[n],
|
|
61
|
+
H[n][c ? "last" : r ? "first" : "middle"]
|
|
61
62
|
),
|
|
62
63
|
children: [
|
|
63
64
|
N ? e.href ? /* @__PURE__ */ a(
|
|
@@ -66,7 +67,7 @@ const te = ({
|
|
|
66
67
|
href: e.href,
|
|
67
68
|
onClick: e.onClick,
|
|
68
69
|
className: h,
|
|
69
|
-
children:
|
|
70
|
+
children: f
|
|
70
71
|
}
|
|
71
72
|
) : /* @__PURE__ */ a(
|
|
72
73
|
"button",
|
|
@@ -74,17 +75,17 @@ const te = ({
|
|
|
74
75
|
type: "button",
|
|
75
76
|
onClick: e.onClick,
|
|
76
77
|
className: h,
|
|
77
|
-
children:
|
|
78
|
+
children: f
|
|
78
79
|
}
|
|
79
80
|
) : /* @__PURE__ */ a(
|
|
80
81
|
"span",
|
|
81
82
|
{
|
|
82
83
|
className: h,
|
|
83
|
-
"aria-current":
|
|
84
|
-
children:
|
|
84
|
+
"aria-current": c ? "page" : void 0,
|
|
85
|
+
children: f
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
!
|
|
88
|
+
!c && /* @__PURE__ */ a("span", { className: I, "aria-hidden": "true", children: p })
|
|
88
89
|
]
|
|
89
90
|
},
|
|
90
91
|
`segment-${l}`
|
|
@@ -93,45 +94,48 @@ const te = ({
|
|
|
93
94
|
return /* @__PURE__ */ a(
|
|
94
95
|
"nav",
|
|
95
96
|
{
|
|
96
|
-
"aria-label":
|
|
97
|
+
"aria-label": M,
|
|
97
98
|
className: o(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
W[n],
|
|
100
|
+
L,
|
|
101
|
+
g.breadcrumbs
|
|
101
102
|
),
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ i("ol", { className: R, children: [
|
|
103
104
|
C(s[0], {
|
|
104
105
|
index: 0,
|
|
105
106
|
isFirst: !0,
|
|
106
107
|
isCurrent: s.length === 1
|
|
107
108
|
}),
|
|
108
|
-
|
|
109
|
+
t.length > 0 && /* @__PURE__ */ i(
|
|
109
110
|
"li",
|
|
110
111
|
{
|
|
111
112
|
className: o(
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
k,
|
|
114
|
+
S[n],
|
|
114
115
|
"shrink-0"
|
|
115
116
|
),
|
|
116
117
|
children: [
|
|
117
118
|
/* @__PURE__ */ a(
|
|
118
|
-
|
|
119
|
+
w,
|
|
119
120
|
{
|
|
120
|
-
items:
|
|
121
|
-
onItemClick:
|
|
121
|
+
items: v,
|
|
122
|
+
onItemClick: x,
|
|
122
123
|
placement: "bottom-start",
|
|
123
124
|
matchReferenceWidth: !1,
|
|
124
125
|
children: /* @__PURE__ */ a(
|
|
125
126
|
"button",
|
|
126
127
|
{
|
|
127
128
|
type: "button",
|
|
128
|
-
"aria-label":
|
|
129
|
-
className:
|
|
129
|
+
"aria-label": E,
|
|
130
|
+
className: o(
|
|
131
|
+
j,
|
|
132
|
+
b[n]
|
|
133
|
+
),
|
|
130
134
|
children: /* @__PURE__ */ a(
|
|
131
|
-
|
|
135
|
+
B,
|
|
132
136
|
{
|
|
133
|
-
size:
|
|
134
|
-
stroke:
|
|
137
|
+
size: K.SM,
|
|
138
|
+
stroke: y,
|
|
135
139
|
"aria-hidden": "true"
|
|
136
140
|
}
|
|
137
141
|
)
|
|
@@ -139,7 +143,7 @@ const te = ({
|
|
|
139
143
|
)
|
|
140
144
|
}
|
|
141
145
|
),
|
|
142
|
-
/* @__PURE__ */ a("span", { className:
|
|
146
|
+
/* @__PURE__ */ a("span", { className: I, "aria-hidden": "true", children: p })
|
|
143
147
|
]
|
|
144
148
|
}
|
|
145
149
|
),
|
|
@@ -155,5 +159,5 @@ const te = ({
|
|
|
155
159
|
);
|
|
156
160
|
};
|
|
157
161
|
export {
|
|
158
|
-
|
|
162
|
+
oe as Breadcrumbs
|
|
159
163
|
};
|
|
@@ -1,41 +1,60 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { IconChevronRight as
|
|
2
|
+
import { IconChevronRight as i } from "@tabler/icons-react";
|
|
3
3
|
import { DIAL_KIT_ICON_STROKE as n } from "../constants/icon.js";
|
|
4
|
-
import { DIAL_ICON_SIZE as
|
|
4
|
+
import { DIAL_ICON_SIZE as a } from "../../../constants/icon.js";
|
|
5
5
|
import { BreadcrumbsSize as e } from "../../../types/breadcrumbs.js";
|
|
6
|
-
const
|
|
6
|
+
const d = {
|
|
7
|
+
[e.Small]: "w-full overflow-hidden",
|
|
8
|
+
[e.Tiny]: "w-full",
|
|
9
|
+
[e.Heading]: "w-full overflow-hidden"
|
|
10
|
+
}, f = "flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap", u = "flex min-w-0 items-center gap-2", x = {
|
|
7
11
|
[e.Small]: "dial-small-text",
|
|
12
|
+
[e.Tiny]: "dial-tiny-text",
|
|
8
13
|
[e.Heading]: "dial-h2-text"
|
|
9
|
-
},
|
|
14
|
+
}, h = {
|
|
10
15
|
[e.Small]: "dial-small-semi-text",
|
|
16
|
+
[e.Tiny]: "dial-tiny-semi-text",
|
|
11
17
|
[e.Heading]: "dial-h2-text"
|
|
12
|
-
},
|
|
18
|
+
}, s = {
|
|
13
19
|
first: "shrink-0",
|
|
14
20
|
middle: "min-w-0 max-w-[30%] shrink",
|
|
15
21
|
last: "min-w-0 max-w-[51%] shrink"
|
|
16
|
-
},
|
|
17
|
-
s,
|
|
22
|
+
}, S = {
|
|
23
|
+
[e.Small]: s,
|
|
24
|
+
[e.Tiny]: {
|
|
25
|
+
first: "shrink-0",
|
|
26
|
+
middle: "min-w-12 shrink-[1000]",
|
|
27
|
+
last: "min-w-0 shrink"
|
|
28
|
+
},
|
|
29
|
+
[e.Heading]: s
|
|
30
|
+
}, g = {
|
|
31
|
+
[e.Small]: "rounded-xs focus-visible:outline-offset-2",
|
|
32
|
+
[e.Tiny]: "rounded focus-visible:outline-offset-1",
|
|
33
|
+
[e.Heading]: "rounded-xs focus-visible:outline-offset-2"
|
|
34
|
+
}, w = "flex min-w-0 flex-1 items-center gap-1 transition-colors", N = "text-secondary hover:text-accent focus-visible:outline focus-visible:outline-focus", p = "cursor-default text-primary", C = "cursor-default text-secondary", v = "inline-flex flex-none items-center leading-none text-secondary", I = "dial-kit-minimum-target flex shrink-0 items-center text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-focus", y = 3, k = 4, T = /* @__PURE__ */ t(
|
|
35
|
+
i,
|
|
18
36
|
{
|
|
19
|
-
size:
|
|
37
|
+
size: a.SM,
|
|
20
38
|
stroke: n,
|
|
21
39
|
"aria-hidden": "true",
|
|
22
40
|
className: "rtl:scale-x-[-1]"
|
|
23
41
|
}
|
|
24
42
|
);
|
|
25
43
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
k as DEFAULT_MAX_VISIBLE_ITEMS,
|
|
45
|
+
y as MIN_VISIBLE_ITEMS,
|
|
46
|
+
p as currentSegmentClassName,
|
|
47
|
+
h as currentSizeClassName,
|
|
48
|
+
T as defaultSeparator,
|
|
49
|
+
g as focusRingClassName,
|
|
31
50
|
u as itemClassName,
|
|
32
|
-
|
|
51
|
+
N as linkSegmentClassName,
|
|
33
52
|
f as listClassName,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
d as navClassName,
|
|
54
|
+
I as overflowButtonClassName,
|
|
55
|
+
w as segmentClassName,
|
|
56
|
+
S as segmentWidthClassName,
|
|
57
|
+
v as separatorClassName,
|
|
58
|
+
x as sizeClassName,
|
|
59
|
+
C as staticSegmentClassName
|
|
41
60
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.16.0-dev.
|
|
3
|
-
"generatedAt": "2026-11-
|
|
2
|
+
"version": "0.16.0-dev.68",
|
|
3
|
+
"generatedAt": "2026-11-03T14:00:18.668Z",
|
|
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",
|
|
@@ -640,7 +640,7 @@
|
|
|
640
640
|
"name": "Breadcrumbs",
|
|
641
641
|
"category": "Components_2_0",
|
|
642
642
|
"generation": "2.0",
|
|
643
|
-
"description": "A navigation trail: where the user is, and every level they can step back to.\naliases: Breadcrumb|NavigationPath|BreadcrumbTrail\nDesign system 2.0\n\nThe last item is the current page — drawn semibold and primary, and never a\ncontrol, since a link to the page you are already on does nothing. Every\nearlier item with an `href` or an `onClick` is a link; one with neither is\ndrawn as plain text, which is how a read-only location path is built.\n\nThe trail never wraps. Segments truncate instead, each revealing its full\nlabel in a tooltip only once it is actually clipped, and a trail longer than\n`maxVisibleItems` collapses its middle behind an ellipsis menu — the root and\nthe current page, the two segments that carry the most meaning, always stay\non screen.\n\na11y: an `<ol>` inside a named `<nav>`, with `aria-current=\"page\"` on the last\nsegment. Separators are decorative and hidden from assistive tech, so the\ntrail is announced as a list of links rather than a string of chevrons.\n\nThe trail is drawn at `dial-small-text` by default; `size` switches it to\n`dial-h2-text` for a trail that doubles as the page heading
|
|
643
|
+
"description": "A navigation trail: where the user is, and every level they can step back to.\naliases: Breadcrumb|NavigationPath|BreadcrumbTrail\nDesign system 2.0\n\nThe last item is the current page — drawn semibold and primary, and never a\ncontrol, since a link to the page you are already on does nothing. Every\nearlier item with an `href` or an `onClick` is a link; one with neither is\ndrawn as plain text, which is how a read-only location path is built.\n\nThe trail never wraps. Segments truncate instead, each revealing its full\nlabel in a tooltip only once it is actually clipped, and a trail longer than\n`maxVisibleItems` collapses its middle behind an ellipsis menu — the root and\nthe current page, the two segments that carry the most meaning, always stay\non screen.\n\na11y: an `<ol>` inside a named `<nav>`, with `aria-current=\"page\"` on the last\nsegment. Separators are decorative and hidden from assistive tech, so the\ntrail is announced as a list of links rather than a string of chevrons.\n\nThe trail is drawn at `dial-small-text` by default; `size` switches it to\n`dial-tiny-text` for a dense header — a trail that never clips, so a focus\nring stays whole, and caps no segment, so its current page takes the free\nwidth — or to `dial-h2-text` for a trail that doubles as the page heading,\nwhere the token's own semibold weight applies to every segment.\n\nLabels are the caller's to translate; the two accessible names default to\nEnglish and take an override.",
|
|
644
644
|
"props": [
|
|
645
645
|
{
|
|
646
646
|
"name": "items",
|
|
@@ -660,7 +660,7 @@
|
|
|
660
660
|
"type": "BreadcrumbsSize",
|
|
661
661
|
"required": false,
|
|
662
662
|
"defaultValue": "BreadcrumbsSize.Small",
|
|
663
|
-
"description": "The trail's type scale: `dial-small-text` or `dial-h2-text`"
|
|
663
|
+
"description": "The trail's type scale: `dial-small-text`, `dial-tiny-text` or `dial-h2-text`"
|
|
664
664
|
},
|
|
665
665
|
{
|
|
666
666
|
"name": "separator",
|
|
@@ -9062,6 +9062,11 @@
|
|
|
9062
9062
|
"value": "'small'",
|
|
9063
9063
|
"comment": "14px `dial-small-text`, with a `dial-small-semi-text` current page."
|
|
9064
9064
|
},
|
|
9065
|
+
{
|
|
9066
|
+
"name": "Tiny",
|
|
9067
|
+
"value": "'tiny'",
|
|
9068
|
+
"comment": "12px `dial-tiny-text`, with a `dial-tiny-semi-text` current page: a 16px\ntrail for a dense header. It never clips, so a focus ring stays whole, and\nnothing is capped: the middle truncates first, the current page last."
|
|
9069
|
+
},
|
|
9065
9070
|
{
|
|
9066
9071
|
"name": "Heading",
|
|
9067
9072
|
"value": "'heading'",
|