@epam/ai-dial-ui-kit 0.16.0-dev.19 → 0.16.0-dev.20

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 CHANGED
@@ -22,6 +22,8 @@ Versions match the git tags on the `development` branch.
22
22
 
23
23
  ### Added
24
24
 
25
+ - **`TransferQueue` (2.0) — determinate progress ring in a row** — an in-progress row always showed the indeterminate `Spinner`, so a host that knew how far a transfer had got could only surface it in the collapsed aggregate bar. A row whose item has a numeric `percent` now shows a 16px ring that fills with it, drawn with the spinner's tokens (secondary track, accent arc), with `role="progressbar"`, `aria-valuenow` and `labels.itemProgressAriaLabel(name)` as its name. A row without `percent` keeps the spinner, and the cancel control still takes the cell on hover and focus. The ring is symmetric and is not mirrored under `dir="rtl"`. Additive. Requested for the file-storage download queue in ai-dial-chat.
26
+
25
27
  - **`Dropdown` (2.0) — `searchable`, a search field above the items** — a host that wanted a menu of actions narrowed by a query had to build it around the menu: a `Search` in `menuHeader` held in place with a sticky wrapper offset against the panel's inset, a `PlainText` row standing in for "no results", its own highlighting of every label, and a height cap that restated the kit's 40px rows and 2px gaps as pixel constants. `searchable` does all of it. The field sits above the item list, which scrolls by itself under it and takes focus on open; typing narrows the items by a case-insensitive substring of a string `label` (`filterItem` replaces the rule), highlights the match through `Highlight`, keeps a whole sub-menu when its own label matches and only its matching children otherwise, and drops a group heading or divider once its group is empty. When nothing matches, `noResultsLabel` is shown and announced by a `role="status"` region that stays mounted. The query clears when the menu closes; `searchValue` / `onSearchChange` control it. `maxVisibleItems` caps the item list at a number of rows, searchable or not. Home and End move the caret in the field instead of the focus in the list. The search row carries `dial-kit-dropdown-search` (`DIAL_KIT_CLASS.dropdownSearch`). Requested from the catalog Create menu of `ai-dial-chat`.
26
28
 
27
29
  - **`BottomSheet` (2.0) — public class on the backdrop, `dial-kit-bottom-sheet-overlay`** — the panel carried `dial-kit-bottom-sheet`, but the backdrop that holds it had no stable class, so a host that embeds a sheet in its own floating panel and has to lift the whole sheet above that panel's stacking context fell back to `[class*='_backdrop_']` selectors on the hashed module class a wrapping library passes through `overlayClassName`. The backdrop now carries `dial-kit-bottom-sheet-overlay` (`DIAL_KIT_CLASS.bottomSheetOverlay`), after any `overlayClassName`. The class has no declarations, so nothing renders differently. Where the stacking context can be avoided altogether, `portalId` still renders the sheet inside the host's own element. Requested in [ai-dial-chat#9392](https://github.com/epam/ai-dial-chat/issues/9392).
@@ -1,82 +1,139 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { IconX as d, IconCheck as u, IconAlertCircleFilled as f, IconAlertTriangleFilled as g } from "@tabler/icons-react";
3
- import { EllipsisTooltip as I } from "../EllipsisTooltip/EllipsisTooltip.js";
4
- import { FileIcon as h } from "../FileIcon/FileIcon.js";
5
- import { GhostIconButton as S } from "../IconButton/IconButtonWrappers.js";
6
- import { Tooltip as x } from "../Tooltip/Tooltip.js";
7
- import { DIAL_KIT_ICON_STROKE as m } from "../constants/icon.js";
8
- import { Spinner as y } from "../../Spinner/Spinner.js";
9
- import { DIAL_ICON_SIZE as t } from "../../../constants/icon.js";
10
- import { DialItemType as N } from "../../../types/item.js";
11
- import { ElementSize as T } from "../../../types/size.js";
12
- import { TransferQueueItemStatus as s } from "../../../types/transfer-queue.js";
13
- import { mergeClasses as i } from "../../../utils/merge-classes.js";
14
- import { STATUS_SLOT_CLASS as c } from "./constants.js";
15
- const p = ({ message: e, isError: a }) => /* @__PURE__ */ r(x, { tooltip: e, asChild: !0, children: /* @__PURE__ */ r(
2
+ import { IconX as g, IconCheck as I, IconAlertCircleFilled as S, IconAlertTriangleFilled as N } from "@tabler/icons-react";
3
+ import { EllipsisTooltip as x } from "../EllipsisTooltip/EllipsisTooltip.js";
4
+ import { FileIcon as y } from "../FileIcon/FileIcon.js";
5
+ import { GhostIconButton as M } from "../IconButton/IconButtonWrappers.js";
6
+ import { Tooltip as k } from "../Tooltip/Tooltip.js";
7
+ import { DIAL_KIT_ICON_STROKE as u } from "../constants/icon.js";
8
+ import { Spinner as T } from "../../Spinner/Spinner.js";
9
+ import { DIAL_ICON_SIZE as s } from "../../../constants/icon.js";
10
+ import { DialItemType as v } from "../../../types/item.js";
11
+ import { ElementSize as C } from "../../../types/size.js";
12
+ import { TransferQueueItemStatus as n } from "../../../types/transfer-queue.js";
13
+ import { mergeClasses as c } from "../../../utils/merge-classes.js";
14
+ import { STATUS_SLOT_CLASS as m } from "./constants.js";
15
+ const h = ({ message: e, isError: a }) => /* @__PURE__ */ r(k, { tooltip: e, asChild: !0, children: /* @__PURE__ */ r(
16
16
  "span",
17
17
  {
18
- className: c,
18
+ className: m,
19
19
  role: "img",
20
20
  "aria-label": e,
21
21
  tabIndex: 0,
22
22
  children: /* @__PURE__ */ r(
23
- a ? f : g,
23
+ a ? S : N,
24
24
  {
25
- size: t.SM,
25
+ size: s.SM,
26
26
  className: a ? "text-error" : "text-warning-icon",
27
27
  "aria-hidden": !0
28
28
  }
29
29
  )
30
30
  }
31
- ) }), j = ({
31
+ ) }), p = 2, d = (s.SM - p) / 2, f = 2 * Math.PI * d, L = ({ percent: e, label: a, className: o }) => {
32
+ const i = Math.min(100, Math.max(0, Math.round(e))), t = s.SM / 2;
33
+ return /* @__PURE__ */ r(
34
+ "span",
35
+ {
36
+ role: "progressbar",
37
+ "aria-label": a,
38
+ "aria-valuemin": 0,
39
+ "aria-valuemax": 100,
40
+ "aria-valuenow": i,
41
+ className: c("flex", o),
42
+ children: /* @__PURE__ */ l(
43
+ "svg",
44
+ {
45
+ width: s.SM,
46
+ height: s.SM,
47
+ viewBox: `0 0 ${s.SM} ${s.SM}`,
48
+ className: "-rotate-90",
49
+ "aria-hidden": !0,
50
+ children: [
51
+ /* @__PURE__ */ r(
52
+ "circle",
53
+ {
54
+ cx: t,
55
+ cy: t,
56
+ r: d,
57
+ fill: "none",
58
+ strokeWidth: p,
59
+ className: "stroke-(--stroke-secondary,#d1dbea)"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ r(
63
+ "circle",
64
+ {
65
+ cx: t,
66
+ cy: t,
67
+ r: d,
68
+ fill: "none",
69
+ strokeWidth: p,
70
+ strokeLinecap: "round",
71
+ strokeDasharray: f,
72
+ strokeDashoffset: f * (1 - i / 100),
73
+ className: "stroke-(--stroke-accent,#1d4ed8) transition-[stroke-dashoffset] duration-200 motion-reduce:transition-none"
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ )
79
+ }
80
+ );
81
+ }, U = ({
32
82
  item: e,
33
83
  labels: a,
34
84
  onCancel: o
35
85
  }) => {
36
- const n = e.status === s.Canceled;
86
+ const i = e.status === n.Canceled, t = c(
87
+ "pointer-events-none col-start-1 row-start-1 transition-opacity",
88
+ o && "group-focus-within:opacity-0 group-hover:opacity-0"
89
+ );
37
90
  return /* @__PURE__ */ l("div", { className: "group flex items-center gap-2 px-4 py-2", children: [
38
91
  /* @__PURE__ */ r(
39
- h,
92
+ y,
40
93
  {
41
- type: N.File,
94
+ type: v.File,
42
95
  name: e.name,
43
- size: t.MD,
44
- className: i(n && "opacity-50"),
96
+ size: s.MD,
97
+ className: c(i && "opacity-50"),
45
98
  decorative: !0
46
99
  }
47
100
  ),
48
101
  /* @__PURE__ */ r(
49
- I,
102
+ x,
50
103
  {
51
104
  text: e.name,
52
- className: i(
105
+ className: c(
53
106
  "dial-small-text",
54
- n ? "text-secondary" : "text-primary"
107
+ i ? "text-secondary" : "text-primary"
55
108
  )
56
109
  }
57
110
  ),
58
- e.status === s.InProgress && /* @__PURE__ */ l("div", { className: i(c, "grid"), children: [
59
- /* @__PURE__ */ r(
60
- y,
111
+ e.status === n.InProgress && /* @__PURE__ */ l("div", { className: c(m, "grid"), children: [
112
+ typeof e.percent == "number" ? /* @__PURE__ */ r(
113
+ L,
61
114
  {
62
- size: t.SM,
115
+ percent: e.percent,
116
+ label: a.itemProgressAriaLabel(e.name),
117
+ className: t
118
+ }
119
+ ) : /* @__PURE__ */ r(
120
+ T,
121
+ {
122
+ size: s.SM,
63
123
  ariaLabel: a.itemProgressAriaLabel(e.name),
64
- className: i(
65
- "pointer-events-none col-start-1 row-start-1 transition-opacity",
66
- o && "group-focus-within:opacity-0 group-hover:opacity-0"
67
- )
124
+ className: t
68
125
  }
69
126
  ),
70
127
  o && /* @__PURE__ */ r(
71
- S,
128
+ M,
72
129
  {
73
130
  "aria-label": a.cancelItemAriaLabel(e.name),
74
- size: T.Small,
131
+ size: C.Small,
75
132
  icon: /* @__PURE__ */ r(
76
- d,
133
+ g,
77
134
  {
78
- size: t.SM,
79
- stroke: m,
135
+ size: s.SM,
136
+ stroke: u,
80
137
  className: "text-secondary",
81
138
  "aria-hidden": !0
82
139
  }
@@ -86,34 +143,34 @@ const p = ({ message: e, isError: a }) => /* @__PURE__ */ r(x, { tooltip: e, asC
86
143
  }
87
144
  )
88
145
  ] }),
89
- e.status === s.Success && /* @__PURE__ */ r(
146
+ e.status === n.Success && /* @__PURE__ */ r(
90
147
  "span",
91
148
  {
92
- className: c,
149
+ className: m,
93
150
  role: "img",
94
151
  "aria-label": a.successLabel,
95
152
  children: /* @__PURE__ */ r(
96
- u,
153
+ I,
97
154
  {
98
- size: t.SM,
99
- stroke: m,
155
+ size: s.SM,
156
+ stroke: u,
100
157
  className: "text-accent",
101
158
  "aria-hidden": !0
102
159
  }
103
160
  )
104
161
  }
105
162
  ),
106
- e.status === s.Warning && /* @__PURE__ */ r(
107
- p,
163
+ e.status === n.Warning && /* @__PURE__ */ r(
164
+ h,
108
165
  {
109
166
  message: e.message || a.warningMessage,
110
167
  isError: !1
111
168
  }
112
169
  ),
113
- e.status === s.Failed && /* @__PURE__ */ r(p, { message: e.message || a.failedMessage, isError: !0 }),
114
- n && /* @__PURE__ */ r("span", { className: "dial-small-text shrink-0 text-secondary", children: a.canceledLabel })
170
+ e.status === n.Failed && /* @__PURE__ */ r(h, { message: e.message || a.failedMessage, isError: !0 }),
171
+ i && /* @__PURE__ */ r("span", { className: "dial-small-text shrink-0 text-secondary", children: a.canceledLabel })
115
172
  ] });
116
173
  };
117
174
  export {
118
- j as TransferQueueRow
175
+ U as TransferQueueRow
119
176
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.16.0-dev.19",
3
- "generatedAt": "2026-10-20T08:49:00.539Z",
2
+ "version": "0.16.0-dev.20",
3
+ "generatedAt": "2026-10-20T10:24:28.217Z",
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",