@epam/ai-dial-ui-kit 0.15.0-dev.42 โ 0.15.0-dev.45
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
CHANGED
|
@@ -49,7 +49,7 @@ The AI DIAL UI Kit is an production-ready React component library designed to st
|
|
|
49
49
|
- ๐จ **Highly Customizable**: Deep theming capabilities with CSS custom properties
|
|
50
50
|
- ๐งช **Well-Tested**: Comprehensive test coverage (70%+) with Vitest and React Testing Library
|
|
51
51
|
- ๐ **Storybook Ready**: Includes interactive component documentation and development playground
|
|
52
|
-
- ๐ ๏ธ **Developer Experience**: Leverage ESLint
|
|
52
|
+
- ๐ ๏ธ **Developer Experience**: Leverage ESLint and Prettier for maintainable code quality
|
|
53
53
|
- ๐ฆ **Distribution Ready**: Deployed as NPM package ready for easy integration
|
|
54
54
|
|
|
55
55
|
## ๐ Documentation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as le, Fragment as se, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useFloating as ne, autoUpdate as ie, offset as ce, flip as me, size as pe, FloatingPortal as
|
|
3
|
-
import { useId as
|
|
2
|
+
import { useFloating as ne, autoUpdate as ie, offset as ce, flip as me, size as pe, FloatingPortal as de } from "@floating-ui/react";
|
|
3
|
+
import { useId as fe, useState as f, useMemo as ue, useCallback as he } from "react";
|
|
4
4
|
import { Input as ge } from "../Input/Input.js";
|
|
5
5
|
import { MenuItem as we } from "../MenuItem/MenuItem.js";
|
|
6
6
|
import { selectTagClassName as ve } from "../Select/MultiSelectTags.js";
|
|
@@ -35,18 +35,18 @@ const Ce = 5, Re = ({
|
|
|
35
35
|
listClassName: P,
|
|
36
36
|
onChange: A
|
|
37
37
|
}) => {
|
|
38
|
-
const X =
|
|
38
|
+
const X = fe(), N = z || X, g = `${N}-listbox`, q = xe(), J = D === U.Small, w = S !== void 0, [Q, W] = f(
|
|
39
39
|
_ ?? []
|
|
40
|
-
),
|
|
40
|
+
), a = w ? S : Q, c = a.length > 0, m = !h && !u, [s, E] = f(""), [Y, v] = f(!1), [Z, p] = f(0), r = ue(
|
|
41
41
|
() => De(
|
|
42
42
|
b,
|
|
43
43
|
s,
|
|
44
|
-
|
|
44
|
+
a,
|
|
45
45
|
y
|
|
46
46
|
),
|
|
47
|
-
[s, y, b,
|
|
48
|
-
),
|
|
49
|
-
open:
|
|
47
|
+
[s, y, b, a]
|
|
48
|
+
), o = Y && m && r.length > 0, d = Math.min(Z, r.length - 1), k = (e) => `${g}-option-${e}`, { refs: F, floatingStyles: ee } = ne({
|
|
49
|
+
open: o,
|
|
50
50
|
placement: "bottom-start",
|
|
51
51
|
whileElementsMounted: ie,
|
|
52
52
|
middleware: [
|
|
@@ -68,8 +68,8 @@ const Ce = 5, Re = ({
|
|
|
68
68
|
v(!1), p(0);
|
|
69
69
|
}, L = (e) => {
|
|
70
70
|
const t = e.trim();
|
|
71
|
-
t && !
|
|
72
|
-
}, te = (e) => I(
|
|
71
|
+
t && !a.includes(t) && I([...a, t]), E(""), x();
|
|
72
|
+
}, te = (e) => I(a.filter((t) => t !== e)), oe = (e) => {
|
|
73
73
|
const t = e ?? "";
|
|
74
74
|
E(t), v(!!t.trim()), p(0);
|
|
75
75
|
}, ae = (e) => {
|
|
@@ -77,22 +77,22 @@ const Ce = 5, Re = ({
|
|
|
77
77
|
switch (e.key) {
|
|
78
78
|
case "ArrowDown":
|
|
79
79
|
case "ArrowUp": {
|
|
80
|
-
if (e.preventDefault(), v(!0), !
|
|
80
|
+
if (e.preventDefault(), v(!0), !o) return;
|
|
81
81
|
const t = e.key === "ArrowDown" ? 1 : -1;
|
|
82
82
|
p(
|
|
83
|
-
(
|
|
83
|
+
(d + t + r.length) % r.length
|
|
84
84
|
);
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
case "Enter":
|
|
88
88
|
case ",":
|
|
89
|
-
e.preventDefault(), L(
|
|
89
|
+
e.preventDefault(), L(o ? r[d].value : s);
|
|
90
90
|
return;
|
|
91
91
|
case "Escape":
|
|
92
|
-
|
|
92
|
+
o && e.preventDefault(), x();
|
|
93
93
|
return;
|
|
94
94
|
case "Backspace":
|
|
95
|
-
!s && c && (e.preventDefault(), I(
|
|
95
|
+
!s && c && (e.preventDefault(), I(a.slice(0, -1)));
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
}, re = (e) => e.preventDefault();
|
|
@@ -103,9 +103,9 @@ const Ce = 5, Re = ({
|
|
|
103
103
|
id: N,
|
|
104
104
|
role: "combobox",
|
|
105
105
|
"aria-autocomplete": "list",
|
|
106
|
-
"aria-expanded":
|
|
106
|
+
"aria-expanded": o,
|
|
107
107
|
"aria-controls": g,
|
|
108
|
-
"aria-activedescendant":
|
|
108
|
+
"aria-activedescendant": o ? k(d) : void 0,
|
|
109
109
|
"aria-invalid": C || void 0,
|
|
110
110
|
"aria-label": R,
|
|
111
111
|
size: D,
|
|
@@ -140,7 +140,7 @@ const Ce = 5, Re = ({
|
|
|
140
140
|
role: "list",
|
|
141
141
|
"aria-label": M,
|
|
142
142
|
className: "flex min-w-0 flex-wrap items-center gap-1",
|
|
143
|
-
children:
|
|
143
|
+
children: a.map((e) => /* @__PURE__ */ l(
|
|
144
144
|
Ie,
|
|
145
145
|
{
|
|
146
146
|
role: "listitem",
|
|
@@ -161,24 +161,25 @@ const Ce = 5, Re = ({
|
|
|
161
161
|
)
|
|
162
162
|
}
|
|
163
163
|
),
|
|
164
|
-
/* @__PURE__ */ l(
|
|
164
|
+
/* @__PURE__ */ l(de, { children: /* @__PURE__ */ l(
|
|
165
165
|
"div",
|
|
166
166
|
{
|
|
167
167
|
ref: F.setFloating,
|
|
168
168
|
id: g,
|
|
169
169
|
role: "listbox",
|
|
170
170
|
"aria-label": M,
|
|
171
|
-
hidden: !
|
|
171
|
+
hidden: !o,
|
|
172
172
|
style: ee,
|
|
173
173
|
className: i(
|
|
174
174
|
"z-floating overflow-y-auto",
|
|
175
175
|
Se,
|
|
176
176
|
Te,
|
|
177
|
+
!o && "hidden",
|
|
177
178
|
q,
|
|
178
179
|
P
|
|
179
180
|
),
|
|
180
|
-
children:
|
|
181
|
-
const n = t ===
|
|
181
|
+
children: o && r.map((e, t) => {
|
|
182
|
+
const n = t === d;
|
|
182
183
|
return /* @__PURE__ */ l(
|
|
183
184
|
we,
|
|
184
185
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.0-dev.
|
|
3
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"version": "0.15.0-dev.45",
|
|
3
|
+
"generatedAt": "2026-10-07T15:21:45.405Z",
|
|
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",
|