@epam/ai-dial-ui-kit 0.15.0-dev.20 → 0.15.0-dev.22

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
@@ -31,8 +31,12 @@ Versions match the git tags on the `development` branch.
31
31
 
32
32
  - **`TransferQueue` (2.0)** — the floating "Importing 5 files" panel for an upload, download, import or export, moved into the kit from `@epam/ai-dial-conversation-panel`'s `ImportExportQueue` so the file manager can use it for uploads too. It is generic: `items` are `{ id, name, status, percent?, message? }` with `TransferQueueItemStatus` (`InProgress`, `Success`, `Warning`, `Failed`, `Canceled`), not the conversation-transfer job the chat library used. Each row draws the 2.0 `FileIcon` for its name, a truncating name, and a trailing status: a named spinner with a cancel control on hover or focus (only when `onCancelItem` is passed; the spinner never takes the pointer, so the control stays clickable in the same cell), a named check, a warning or error icon whose `message` is both its tooltip and its focusable accessible name — a tooltip alone renders nothing on touch — or "Canceled". The header has the caller's `title` verbatim, a failed-item count badge, and collapse (`aria-expanded`/`aria-controls`) and close controls. Collapsed while work runs, the rows give way to one aggregate `ProgressBar` whose `aria-valuetext` counts settled items rather than a percentage. Closing with work in progress or a failure unread asks for confirmation first; once every item succeeds the queue calls `onClose` by itself after `autoCloseDelay` (8000 ms by default, `0` disables), and a warned or canceled row keeps it open. The root is a polite `role="status"` region carrying `dial-kit-transfer-queue` (`DIAL_KIT_CLASS.transferQueue`); positioning is the host's. Every string has an English default in `DEFAULT_TRANSFER_QUEUE_LABELS` and takes an override through `labels`.
33
33
 
34
+ - **`Accordion` (2.0) — `caretPosition`** — the header always drew its caret after the title, pushed to the far edge, and a caller whose design puts it beside the title had no way to ask for that. `caretPosition` takes `AccordionCaretPosition.Start` (before the title, with a gap) or `AccordionCaretPosition.End` (the default, today's placement). A non-collapsible panel still draws no caret. Additive; nothing renders differently without it. Requested in [ai-dial-chat](https://github.com/epam/ai-dial-chat) while moving its hand-rolled disclosures onto `Accordion`.
35
+
34
36
  ### Fixed
35
37
 
38
+ - **`Accordion` (2.0) — the caret follows the reading direction, and the panel slides open and shut** — the collapsed caret pointed right under `dir="rtl"` too, against the reading direction; it now turns to point left in RTL and still points down once open. The content was also mounted only while expanded, so it appeared and vanished in one frame. It now stays mounted and animates its height (`grid-template-rows` 0fr ↔ 1fr, 200 ms, off under `prefers-reduced-motion`); while collapsed it is `inert`, so nothing in it is focusable or announced, and `aria-controls` always points at the region. The 12px gap under the header moved inside the clipped part, so a collapsed panel is exactly as tall as before. A caller that relied on the content unmounting while collapsed (to defer an expensive render, or to reset child state on close) now needs to render it conditionally itself. Requested in [ai-dial-chat](https://github.com/epam/ai-dial-chat) while moving its conversation stages onto `Accordion`.
39
+
36
40
  - **`Select` and `Dropdown` (2.0) — rows are 2px apart, and every option list and submenu has the same vertical inset** — rows were stacked edge to edge, so a selected row's tint and a hovered neighbour's merged into one block; every option list, menu and kit-rendered submenu now stacks its rows with `gap-0.5` (the shared `overlayListClassName`). Separately, the `Dropdown` menu wraps its rows in `py-1` inside the panel's `p-1`, but the `Select` option list and the submenus of both components rendered their rows straight into the panel, so the first and last rows (and the focus ring of a keyboard-focused one) sat flush against its top and bottom edge. The `Select` option list now carries the same `py-1`, and a submenu panel of kit-rendered rows takes `py-2` — the same 8px in total. A `Dropdown` submenu drawn through `renderSubMenu` keeps the plain panel, as a `renderOverlay` body does at the top level.
37
41
 
38
42
  - **`MarkdownEditor` (2.0) — the live preview is part of the card now, instead of a sheet of GitHub's own CSS laid over it** — the 2.0 restyle covered the card and the toolbar and stopped at the split: everything right of it was still `@uiw/react-md-editor`'s default stylesheet. Three things came out of that. The pane divider was the library's `inset` box-shadow in a hardcoded `#d0d7de`, drawn on the preview and then painted over by the markdown body's opaque white — and since that body is only as tall as its content, the divider survived as a hairline starting halfway down the pane, under the last rendered block. The white itself was the second: a `#ffffff` patch over the card's `bg-layer-raised`, which a dark theme would have kept white. And Tailwind's preflight, which the kit ships, had stripped the list markers and the task-list checkbox out of the rendered markdown — a bulleted list came out as indented lines, a `- [ ]` as a 0×0 box. The divider is now a real border on `border-secondary`, the body and its table rows are transparent, code, quotes, tables and headings take kit tokens, and lists and task boxes render again. The preview also inherits the host's font and `text-primary` instead of the library's `-apple-system` stack and `#24292f`; the edit pane keeps its monospace face. Both panes gained a 16px gutter beside the divider, so text no longer butts against it.
@@ -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-Cy9WobJf.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
+ "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-Cy9WobJf.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;
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-CfxMs3AZ.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 "../../constants/editor.js";
4
- import { EditorThemes as S } from "../../types/editor.js";
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: t,
10
+ label: i,
13
11
  headerContent: d,
14
12
  switcherLabel: a,
15
13
  height: c = 300,
16
- theme: m = S.dark,
14
+ theme: m = b.dark,
17
15
  onValidateJSON: f,
18
16
  preview: C = "edit"
19
17
  }) => {
20
- const N = g(), [i, w] = x(!1), [p, D] = x(null);
18
+ const N = g(), [n, w] = x(!1), [p, D] = x(null);
21
19
  J(() => {
22
- i && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
20
+ n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
23
21
  D(() => o.DialJsonEditor);
24
22
  });
25
- }, [i]);
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
- ), n = !!a;
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
- (t || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
39
- t && /* @__PURE__ */ e(y, { label: t }),
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
- n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
43
- b,
40
+ t && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
41
+ S,
44
42
  {
45
- isOn: i,
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
- n && i ? /* @__PURE__ */ e(
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
- $ as DialMarkdownEditorContainer
79
+ z as DialMarkdownEditorContainer
82
80
  };
@@ -1,99 +1,113 @@
1
- import { jsxs as a, Fragment as A, jsx as e } from "react/jsx-runtime";
2
- import { IconChevronRight as S } from "@tabler/icons-react";
3
- import { useState as C, useId as E } from "react";
4
- import { DIAL_KIT_ICON_STROKE as j } from "../constants/icon.js";
5
- import { DIAL_ICON_SIZE as L } from "../../../constants/icon.js";
6
- import { resolveAccessibleName as T } from "../../../utils/accessible-name.js";
7
- import { mergeClasses as r } from "../../../utils/merge-classes.js";
8
- import { DIAL_KIT_CLASS as k } from "../../../constants/public-class-names.js";
9
- const Z = ({
10
- title: p,
11
- description: s,
12
- children: h,
13
- expanded: c,
14
- defaultExpanded: y = !1,
15
- disabled: n,
16
- nonCollapsible: o,
17
- ariaLabel: I,
18
- onToggle: v,
19
- className: g,
20
- headerClassName: l,
21
- contentClassName: N
1
+ import { jsx as e, jsxs as s, Fragment as j } from "react/jsx-runtime";
2
+ import { IconChevronRight as T } from "@tabler/icons-react";
3
+ import { useState as k, useId as D } from "react";
4
+ import { DIAL_KIT_ICON_STROKE as K } from "../constants/icon.js";
5
+ import { DIAL_ICON_SIZE as O } from "../../../constants/icon.js";
6
+ import { resolveAccessibleName as R } from "../../../utils/accessible-name.js";
7
+ import { mergeClasses as t } from "../../../utils/merge-classes.js";
8
+ import { DIAL_KIT_CLASS as $ } from "../../../constants/public-class-names.js";
9
+ import { AccordionCaretPosition as y } from "../../../types/accordion.js";
10
+ const J = ({
11
+ title: g,
12
+ description: c,
13
+ children: I,
14
+ expanded: l,
15
+ defaultExpanded: N = !1,
16
+ disabled: o,
17
+ nonCollapsible: n,
18
+ ariaLabel: w,
19
+ onToggle: b,
20
+ caretPosition: A = y.End,
21
+ className: C,
22
+ headerClassName: d,
23
+ contentClassName: S
22
24
  }) => {
23
- const d = c !== void 0, [b, w] = C(y), t = o ? !0 : d ? c : b, m = E(), i = `accordion-header-${m}`, x = `accordion-content-${m}`, _ = () => {
24
- if (n) return;
25
- const u = !t;
26
- d || w(u), v?.(u);
27
- }, f = /* @__PURE__ */ a(A, { children: [
28
- /* @__PURE__ */ a("span", { className: "flex min-w-0 flex-col", children: [
29
- /* @__PURE__ */ e("span", { className: "truncate dial-body-text text-primary", children: p }),
30
- s ? /* @__PURE__ */ e("span", { className: "truncate dial-tiny-text text-secondary", children: s }) : null
25
+ const m = l !== void 0, [_, E] = k(N), r = n ? !0 : m ? l : _, f = D(), i = `accordion-header-${f}`, u = `accordion-content-${f}`, L = () => {
26
+ if (o) return;
27
+ const v = !r;
28
+ m || E(v), b?.(v);
29
+ }, a = A === y.Start, p = n ? null : /* @__PURE__ */ e(
30
+ T,
31
+ {
32
+ size: O.SM,
33
+ stroke: K,
34
+ "aria-hidden": "true",
35
+ className: t(
36
+ "shrink-0 text-secondary transition-transform motion-reduce:transition-none",
37
+ r ? "rotate-90" : "rtl:rotate-180"
38
+ )
39
+ }
40
+ ), x = /* @__PURE__ */ s(j, { children: [
41
+ a && p,
42
+ /* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
43
+ /* @__PURE__ */ e("span", { className: "truncate dial-body-text text-primary", children: g }),
44
+ c ? /* @__PURE__ */ e("span", { className: "truncate dial-tiny-text text-secondary", children: c }) : null
31
45
  ] }),
32
- !o && // Caret at the leading edge; it turns a quarter turn to point down when open.
33
- /* @__PURE__ */ e(
34
- S,
35
- {
36
- size: L.SM,
37
- stroke: j,
38
- "aria-hidden": "true",
39
- className: r(
40
- "shrink-0 text-secondary transition-transform motion-reduce:transition-none",
41
- t && "rotate-90"
42
- )
43
- }
44
- )
45
- ] });
46
- return /* @__PURE__ */ a(
46
+ !a && p
47
+ ] }), h = a ? "justify-start gap-2" : "justify-between";
48
+ return /* @__PURE__ */ s(
47
49
  "div",
48
50
  {
49
- className: r(
50
- "flex flex-col gap-3 py-3 overflow-hidden bg-transparent ",
51
- g,
52
- k.accordion
51
+ className: t(
52
+ "flex flex-col py-3 overflow-hidden bg-transparent",
53
+ C,
54
+ $.accordion
53
55
  ),
54
56
  children: [
55
- o ? /* @__PURE__ */ e(
57
+ n ? /* @__PURE__ */ e(
56
58
  "div",
57
59
  {
58
60
  id: i,
59
- className: r(
60
- "flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
61
- l
61
+ className: t(
62
+ "flex w-full px-4 rounded-xl items-center dial-tiny-text",
63
+ h,
64
+ d
62
65
  ),
63
- children: f
66
+ children: x
64
67
  }
65
68
  ) : /* @__PURE__ */ e(
66
69
  "button",
67
70
  {
68
71
  id: i,
69
72
  type: "button",
70
- "aria-expanded": t,
71
- "aria-controls": t ? x : void 0,
72
- "aria-label": T(I),
73
- disabled: n,
74
- onClick: _,
75
- className: r(
76
- "flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",
77
- n ? "cursor-not-allowed opacity-75" : (
73
+ "aria-expanded": r,
74
+ "aria-controls": u,
75
+ "aria-label": R(w),
76
+ disabled: o,
77
+ onClick: L,
78
+ className: t(
79
+ "flex w-full px-4 rounded-xl items-center dial-tiny-text",
80
+ h,
81
+ o ? "cursor-not-allowed opacity-75" : (
78
82
  // Applied only to a header that can actually be operated.
79
83
  "cursor-pointer hover:bg-control-accent-alpha-hover focus-visible:outline focus-visible:outline-focus"
80
84
  ),
81
- l
85
+ d
82
86
  ),
83
- children: f
87
+ children: x
84
88
  }
85
89
  ),
86
- t && /* @__PURE__ */ e(
90
+ /* @__PURE__ */ e(
87
91
  "div",
88
92
  {
89
- id: x,
90
- role: "region",
91
- "aria-labelledby": i,
92
- className: r(
93
- "px-4 dial-small-text text-primary",
94
- N
93
+ inert: !r,
94
+ className: t(
95
+ "grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
96
+ r ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
95
97
  ),
96
- children: h
98
+ children: /* @__PURE__ */ e("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ e("div", { className: "pt-3", children: /* @__PURE__ */ e(
99
+ "div",
100
+ {
101
+ id: u,
102
+ role: "region",
103
+ "aria-labelledby": i,
104
+ className: t(
105
+ "px-4 dial-small-text text-primary",
106
+ S
107
+ ),
108
+ children: I
109
+ }
110
+ ) }) })
97
111
  }
98
112
  )
99
113
  ]
@@ -101,5 +115,5 @@ const Z = ({
101
115
  );
102
116
  };
103
117
  export {
104
- Z as Accordion
118
+ J as Accordion
105
119
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.15.0-dev.20",
3
- "generatedAt": "2026-09-25T19:21:54.761Z",
2
+ "version": "0.15.0-dev.22",
3
+ "generatedAt": "2026-09-28T06:50:57.410Z",
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",
@@ -2276,7 +2276,7 @@
2276
2276
  "name": "Accordion",
2277
2277
  "category": "Components_2_0",
2278
2278
  "generation": "2.0",
2279
- "description": "A collapsible panel that toggles its content when the header is clicked.\naliases: Collapse|Disclosure|ExpandablePanel\nDesign system 2.0\n\nWorks as a controlled component when `expanded` is provided, otherwise it manages\nits own state from `defaultExpanded`. The header shows a caret that rotates when\nexpanded, a title, and an optional description stacked beneath it.\n\nThe revealed content is a labelled `region`, so assistive tech announces it by the\nheader it belongs to. `nonCollapsible` renders the header as static text instead of\na permanently disabled button, which keeps a decorative panel out of the tab order.",
2279
+ "description": "A collapsible panel that toggles its content when the header is clicked.\naliases: Collapse|Disclosure|ExpandablePanel\nDesign system 2.0\n\nWorks as a controlled component when `expanded` is provided, otherwise it manages\nits own state from `defaultExpanded`. The header shows a caret that rotates when\nexpanded, a title, and an optional description stacked beneath it.\n\nThe revealed content is a labelled `region`, so assistive tech announces it by the\nheader it belongs to. It stays mounted while collapsed so it can slide open and shut,\nand is `inert` then, out of both the tab order and the accessibility tree. `nonCollapsible` renders the header as static text instead of\na permanently disabled button, which keeps a decorative panel out of the tab order.",
2280
2280
  "props": [
2281
2281
  {
2282
2282
  "name": "title",
@@ -2333,6 +2333,13 @@
2333
2333
  "required": false,
2334
2334
  "description": "Fired when the header is clicked. Receives the next expanded state."
2335
2335
  },
2336
+ {
2337
+ "name": "caretPosition",
2338
+ "type": "AccordionCaretPosition",
2339
+ "required": false,
2340
+ "defaultValue": "AccordionCaretPosition.End",
2341
+ "description": "Where the header draws its caret: before or after the title."
2342
+ },
2336
2343
  {
2337
2344
  "name": "className",
2338
2345
  "type": "string",
@@ -10931,6 +10938,24 @@
10931
10938
  ],
10932
10939
  "sourceFile": "components/New/Textarea/Textarea.tsx"
10933
10940
  },
10941
+ {
10942
+ "name": "AccordionCaretPosition",
10943
+ "kind": "enum",
10944
+ "members": [
10945
+ {
10946
+ "name": "Start",
10947
+ "value": "'start'",
10948
+ "comment": "Before the title, at the header's leading edge."
10949
+ },
10950
+ {
10951
+ "name": "End",
10952
+ "value": "'end'",
10953
+ "comment": "After the title, at the header's trailing edge."
10954
+ }
10955
+ ],
10956
+ "sourceFile": "types/accordion.ts",
10957
+ "description": "Where an `Accordion` header draws its caret."
10958
+ },
10934
10959
  {
10935
10960
  "name": "RadioGroupItem",
10936
10961
  "kind": "interface",