@epam/ai-dial-ui-kit 0.15.0-dev.42 → 0.15.0-dev.44
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 +1 -1
- package/dist/JsonEditor-BDe6elKO.cjs +1 -0
- package/dist/{MarkdownEditor-NYMcKLJy.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
- package/dist/{MarkdownEditor-CPzMv3lE.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
- package/dist/MarkdownEditorContainer-GvlxX6kx.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +16 -18
- package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +23 -22
- package/dist/components-manifest.json +2 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/editors.cjs +1 -1
- package/dist/lazy-BEsZqouS.cjs +1 -0
- package/package.json +1 -3
- package/dist/JsonEditor-CpSpVa0v.cjs +0 -1
- package/dist/MarkdownEditorContainer-DVPRplYf.cjs +0 -1
- package/dist/editor-Bc9xzKuR.cjs +0 -1
- package/dist/lazy-Cy9WobJf.cjs +0 -1
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("./lazy-BEsZqouS.cjs"),c=require("@monaco-editor/react");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const f=g(c),b={[a.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[a.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},k=({value:e,onChange:o,onValidateJSON:r,options:t,currentTheme:n,themesConfig:s=b})=>{function d(i){i?.editor?.defineTheme(n,s[n]),i.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}const{Editor:l}=f;return u.jsx(l,{beforeMount:d,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:r,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...t??{}}})};exports.DialJsonEditor=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-BEsZqouS.cjs"),k=require("./merge-classes-BEJXjzkx.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const b=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:x,strikethrough:g,table:h,unorderedListCommand:C}=b;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(g,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(x,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(h,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=b;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m})=>{const I=j.useMemo(()=>M(),[]),x=j.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:g=>i?.(g||""),height:r,preview:u,commands:I,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-BEsZqouS.cjs"),u=require("./merge-classes-BEJXjzkx.cjs"),x=({value:t,onChange:s,height:o=300,preview:i="edit",theme:a=m.EditorThemes.dark,className:n,placeholder:r})=>{const d=r!==void 0&&!t;return e.jsxs("div",{"data-color-mode":a,className:u.mergeClasses("relative",n),children:[e.jsx(c,{value:t,onChange:l=>s?.(l||""),height:o,preview:i}),d&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:r})]})};exports.DialMarkdownEditor=x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),m=require("./Switch-DE6MrcqJ.cjs"),E=require("./lazy-BEsZqouS.cjs"),N=require("./MarkdownEditor-FVzYMdkC.cjs"),b=({value:r,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=E.EditorThemes.dark,onValidateJSON:x,preview:j="edit"})=>{const w=n.useId(),[t,C]=n.useState(!1),[f,p]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-BDe6elKO.cjs")).then(s=>{p(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),S=n.useCallback(s=>{x?.(s)},[x]),o=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||o)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,o&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:w,onChange:s=>C(s)})})]})]}),o&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:r,onChange:h,onValidateJSON:S,currentTheme:u})}):e.jsx(N.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,theme:u})]})})})};exports.DialMarkdownEditorContainer=b;
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useId as g, useState as x, useEffect as J, useCallback as u } from "react";
|
|
3
|
-
import "
|
|
4
|
-
import { EditorThemes as
|
|
5
|
-
import "@monaco-editor/react";
|
|
6
|
-
import { DialSwitch as b } from "../Switch/Switch.js";
|
|
3
|
+
import { DialSwitch as S } from "../Switch/Switch.js";
|
|
4
|
+
import { EditorThemes as b } from "../../types/editor.js";
|
|
7
5
|
import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
|
|
8
6
|
import { DialLabel as y } from "../Label/Label.js";
|
|
9
|
-
const
|
|
7
|
+
const z = ({
|
|
10
8
|
value: s,
|
|
11
9
|
onChangeValue: l,
|
|
12
|
-
label:
|
|
10
|
+
label: i,
|
|
13
11
|
headerContent: d,
|
|
14
12
|
switcherLabel: a,
|
|
15
13
|
height: c = 300,
|
|
16
|
-
theme: m =
|
|
14
|
+
theme: m = b.dark,
|
|
17
15
|
onValidateJSON: f,
|
|
18
16
|
preview: C = "edit"
|
|
19
17
|
}) => {
|
|
20
|
-
const N = g(), [
|
|
18
|
+
const N = g(), [n, w] = x(!1), [p, D] = x(null);
|
|
21
19
|
J(() => {
|
|
22
|
-
|
|
20
|
+
n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
23
21
|
D(() => o.DialJsonEditor);
|
|
24
22
|
});
|
|
25
|
-
}, [
|
|
23
|
+
}, [n]);
|
|
26
24
|
const h = u(
|
|
27
25
|
(o) => {
|
|
28
26
|
l?.(o);
|
|
@@ -33,16 +31,16 @@ const $ = ({
|
|
|
33
31
|
f?.(o);
|
|
34
32
|
},
|
|
35
33
|
[f]
|
|
36
|
-
),
|
|
34
|
+
), t = !!a;
|
|
37
35
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
38
|
-
(
|
|
39
|
-
|
|
36
|
+
(i || d || t) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
37
|
+
i && /* @__PURE__ */ e(y, { label: i }),
|
|
40
38
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
41
39
|
d,
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
t && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
41
|
+
S,
|
|
44
42
|
{
|
|
45
|
-
isOn:
|
|
43
|
+
isOn: n,
|
|
46
44
|
label: a,
|
|
47
45
|
switchId: N,
|
|
48
46
|
onChange: (o) => w(o)
|
|
@@ -50,7 +48,7 @@ const $ = ({
|
|
|
50
48
|
) })
|
|
51
49
|
] })
|
|
52
50
|
] }),
|
|
53
|
-
|
|
51
|
+
t && n ? /* @__PURE__ */ e(
|
|
54
52
|
"div",
|
|
55
53
|
{
|
|
56
54
|
className: "border border-primary rounded",
|
|
@@ -78,5 +76,5 @@ const $ = ({
|
|
|
78
76
|
] }) }) });
|
|
79
77
|
};
|
|
80
78
|
export {
|
|
81
|
-
|
|
79
|
+
z as DialMarkdownEditorContainer
|
|
82
80
|
};
|
|
@@ -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.44",
|
|
3
|
+
"generatedAt": "2026-10-07T15:06:43.528Z",
|
|
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",
|