@epam/ai-dial-ui-kit 0.15.0-dev.21 → 0.15.0-dev.23
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 +4 -0
- package/dist/JsonEditor-CpSpVa0v.cjs +1 -0
- package/dist/{MarkdownEditor-FVzYMdkC.cjs → MarkdownEditor-CPzMv3lE.cjs} +1 -1
- package/dist/{MarkdownEditor-C7BONfsl.cjs → MarkdownEditor-NYMcKLJy.cjs} +1 -1
- package/dist/MarkdownEditorContainer-DSL5-_hG.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/Accordion/Accordion.js +54 -44
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +27 -18
- package/dist/components-manifest.json +9 -3
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/editor-Bc9xzKuR.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/lazy-Cy9WobJf.cjs +1 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +2 -1
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
- package/package.json +1 -1
- package/dist/JsonEditor-BDe6elKO.cjs +0 -1
- package/dist/MarkdownEditorContainer-BA94ffC4.cjs +0 -1
- package/dist/lazy-BEsZqouS.cjs +0 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,8 @@ Versions match the git tags on the `development` branch.
|
|
|
19
19
|
|
|
20
20
|
- **`Dropdown` (2.0) — `listStyle`** — the floating panel renders in a portal at the end of `<body>`, so CSS custom properties a caller sets on its own wrapper never reach the panel's rows or `menuHeader`, and `listClassName` can carry a class but not a runtime value. A wrapping component that themes its menu through `var(--…)` — a composer's model picker colouring its selected row and check — had no way to deliver the values. `listStyle` is an inline style on that panel. Positioning stays the dropdown's own: `floatingStyles` is applied on top, so a caller's `position`, `top` or `transform` cannot unanchor it. Additive; nothing renders differently without it. Requested in [ai-dial-chat#8943](https://github.com/epam/ai-dial-chat/issues/8943).
|
|
21
21
|
|
|
22
|
+
- **`ButtonDropdown` (2.0) — `dropdownProps`**: until now `ButtonDropdown` built its menu `Dropdown` with fixed options, so a caller could neither class the menu panel nor stop the panel from taking the button's width. A short label like "Add" produced a menu as narrow as the button. `dropdownProps` forwards `listClassName` and `matchReferenceWidth` to that `Dropdown`. With `matchReferenceWidth: false` and a `min-w-*` class, the menu gets a width of its own. Additive; a `ButtonDropdown` without it renders exactly as before.
|
|
23
|
+
|
|
22
24
|
- **`Notification` (2.0) — `action` slot** — a notification had nowhere to put a control of its own: a "Try again" or "Reload" button had to be packed into `message`, where it sat inside the text column, wrapped with the copy and could not line up against a title. `action` takes any node and renders it at the inline end of the notification, after the text and before the close button, vertically centred and never shrunk by a long message. It sits inside the live region, so the control is reachable right where the error is announced; the caller supplies its visible label and handler. The slot is additive — a notification without `action` renders exactly as before. Requested in [ai-dial-chat#8979](https://github.com/epam/ai-dial-chat/issues/8979), where a failed chat response offers "Try again" inside its error banner.
|
|
23
25
|
|
|
24
26
|
- **`FilterChips` (2.0)** — a row of filter chips that picks one value out of a few, the chip-shaped sibling of `Tabs` and `SegmentedControl`. It draws `TagAppearance.Selectable` tags: no fill until selected, a semibold label once selected. Each chip is a toggle button carrying its state on `aria-pressed` inside a named `role="group"`, so every chip is its own tab stop and arrowing across the row never changes the filter by accident — unlike a `radiogroup`. `stretch` grows the chips to share the row width equally for a filter row spanning a side panel; without it they hug their labels. There is no disabled chip: an option the user must not pick is left out of `items`. Labels carry no English defaults, so the caller translates them. The row carries the public class `dial-kit-filter-chips` (`DIAL_KIT_CLASS.filterChips`); its chips are `Tag` pills, so they carry `dial-kit-tag`.
|
|
@@ -35,6 +37,8 @@ Versions match the git tags on the `development` branch.
|
|
|
35
37
|
|
|
36
38
|
### Fixed
|
|
37
39
|
|
|
40
|
+
- **`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`.
|
|
41
|
+
|
|
38
42
|
- **`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.
|
|
39
43
|
|
|
40
44
|
- **`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 c=require("react/jsx-runtime"),u=require("./editor-Bc9xzKuR.cjs"),d=require("@monaco-editor/react");function f(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=f(d),b=({value:e,onChange:o,onValidateJSON:t,options:a,currentTheme:n,themesConfig:i=u.EDITOR_THEMES_CONFIG})=>{function s(r){r?.editor?.defineTheme(n,i[n]),r.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}=m;return c.jsx(l,{beforeMount:s,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:t,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},...a??{}}})};exports.DialJsonEditor=b;
|
|
@@ -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-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 +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-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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react");require("./editor-Bc9xzKuR.cjs");const E=require("./lazy-Cy9WobJf.cjs");require("@monaco-editor/react");const m=require("./Switch-CfxMs3AZ.cjs"),N=require("./MarkdownEditor-CPzMv3lE.cjs"),b=({value:o,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-CpSpVa0v.cjs")).then(s=>{p(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),S=n.useCallback(s=>{x?.(s)},[x]),r=!!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||r)&&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,r&&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)})})]})]}),r&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:o,onChange:h,onValidateJSON:S,currentTheme:u})}):e.jsx(N.DialMarkdownEditor,{value:o,onChange:h,height:c,preview:j,theme:u})]})})})};exports.DialMarkdownEditorContainer=b;
|
|
@@ -1,26 +1,28 @@
|
|
|
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
|
|
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";
|
|
5
7
|
import { DialMarkdownEditor as v } from "./MarkdownEditor.js";
|
|
6
8
|
import { DialLabel as y } from "../Label/Label.js";
|
|
7
|
-
const
|
|
9
|
+
const $ = ({
|
|
8
10
|
value: s,
|
|
9
11
|
onChangeValue: l,
|
|
10
|
-
label:
|
|
12
|
+
label: t,
|
|
11
13
|
headerContent: d,
|
|
12
14
|
switcherLabel: a,
|
|
13
15
|
height: c = 300,
|
|
14
|
-
theme: m =
|
|
16
|
+
theme: m = S.dark,
|
|
15
17
|
onValidateJSON: f,
|
|
16
18
|
preview: C = "edit"
|
|
17
19
|
}) => {
|
|
18
|
-
const N = g(), [
|
|
20
|
+
const N = g(), [i, w] = x(!1), [p, D] = x(null);
|
|
19
21
|
J(() => {
|
|
20
|
-
|
|
22
|
+
i && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
21
23
|
D(() => o.DialJsonEditor);
|
|
22
24
|
});
|
|
23
|
-
}, [
|
|
25
|
+
}, [i]);
|
|
24
26
|
const h = u(
|
|
25
27
|
(o) => {
|
|
26
28
|
l?.(o);
|
|
@@ -31,16 +33,16 @@ const z = ({
|
|
|
31
33
|
f?.(o);
|
|
32
34
|
},
|
|
33
35
|
[f]
|
|
34
|
-
),
|
|
36
|
+
), n = !!a;
|
|
35
37
|
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: [
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
+
(t || d || n) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
39
|
+
t && /* @__PURE__ */ e(y, { label: t }),
|
|
38
40
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
39
41
|
d,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
n && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
43
|
+
b,
|
|
42
44
|
{
|
|
43
|
-
isOn:
|
|
45
|
+
isOn: i,
|
|
44
46
|
label: a,
|
|
45
47
|
switchId: N,
|
|
46
48
|
onChange: (o) => w(o)
|
|
@@ -48,7 +50,7 @@ const z = ({
|
|
|
48
50
|
) })
|
|
49
51
|
] })
|
|
50
52
|
] }),
|
|
51
|
-
|
|
53
|
+
n && i ? /* @__PURE__ */ e(
|
|
52
54
|
"div",
|
|
53
55
|
{
|
|
54
56
|
className: "border border-primary rounded",
|
|
@@ -76,5 +78,5 @@ const z = ({
|
|
|
76
78
|
] }) }) });
|
|
77
79
|
};
|
|
78
80
|
export {
|
|
79
|
-
|
|
81
|
+
$ as DialMarkdownEditorContainer
|
|
80
82
|
};
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { IconChevronRight as T } from "@tabler/icons-react";
|
|
3
3
|
import { useState as k, useId as D } from "react";
|
|
4
4
|
import { DIAL_KIT_ICON_STROKE as K } from "../constants/icon.js";
|
|
5
5
|
import { DIAL_ICON_SIZE as O } from "../../../constants/icon.js";
|
|
6
6
|
import { resolveAccessibleName as R } from "../../../utils/accessible-name.js";
|
|
7
|
-
import { mergeClasses as
|
|
7
|
+
import { mergeClasses as t } from "../../../utils/merge-classes.js";
|
|
8
8
|
import { DIAL_KIT_CLASS as $ } from "../../../constants/public-class-names.js";
|
|
9
|
-
import { AccordionCaretPosition as
|
|
9
|
+
import { AccordionCaretPosition as y } from "../../../types/accordion.js";
|
|
10
10
|
const J = ({
|
|
11
|
-
title:
|
|
11
|
+
title: g,
|
|
12
12
|
description: c,
|
|
13
|
-
children:
|
|
13
|
+
children: I,
|
|
14
14
|
expanded: l,
|
|
15
15
|
defaultExpanded: N = !1,
|
|
16
16
|
disabled: o,
|
|
17
17
|
nonCollapsible: n,
|
|
18
|
-
ariaLabel:
|
|
19
|
-
onToggle:
|
|
20
|
-
caretPosition:
|
|
21
|
-
className:
|
|
18
|
+
ariaLabel: w,
|
|
19
|
+
onToggle: b,
|
|
20
|
+
caretPosition: A = y.End,
|
|
21
|
+
className: C,
|
|
22
22
|
headerClassName: d,
|
|
23
|
-
contentClassName:
|
|
23
|
+
contentClassName: S
|
|
24
24
|
}) => {
|
|
25
|
-
const m = l !== void 0, [
|
|
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
26
|
if (o) return;
|
|
27
|
-
const
|
|
28
|
-
m || E(
|
|
29
|
-
},
|
|
27
|
+
const v = !r;
|
|
28
|
+
m || E(v), b?.(v);
|
|
29
|
+
}, a = A === y.Start, p = n ? null : /* @__PURE__ */ e(
|
|
30
30
|
T,
|
|
31
31
|
{
|
|
32
32
|
size: O.SM,
|
|
33
33
|
stroke: K,
|
|
34
34
|
"aria-hidden": "true",
|
|
35
|
-
className:
|
|
35
|
+
className: t(
|
|
36
36
|
"shrink-0 text-secondary transition-transform motion-reduce:transition-none",
|
|
37
|
-
|
|
37
|
+
r ? "rotate-90" : "rtl:rotate-180"
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
|
-
),
|
|
41
|
-
|
|
40
|
+
), x = /* @__PURE__ */ s(j, { children: [
|
|
41
|
+
a && p,
|
|
42
42
|
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
c ? /* @__PURE__ */
|
|
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
|
|
45
45
|
] }),
|
|
46
|
-
!
|
|
47
|
-
] }), h =
|
|
46
|
+
!a && p
|
|
47
|
+
] }), h = a ? "justify-start gap-2" : "justify-between";
|
|
48
48
|
return /* @__PURE__ */ s(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
|
-
className:
|
|
52
|
-
"flex flex-col
|
|
53
|
-
|
|
51
|
+
className: t(
|
|
52
|
+
"flex flex-col py-3 overflow-hidden bg-transparent",
|
|
53
|
+
C,
|
|
54
54
|
$.accordion
|
|
55
55
|
),
|
|
56
56
|
children: [
|
|
57
|
-
n ? /* @__PURE__ */
|
|
57
|
+
n ? /* @__PURE__ */ e(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
|
-
id:
|
|
61
|
-
className:
|
|
60
|
+
id: i,
|
|
61
|
+
className: t(
|
|
62
62
|
"flex w-full px-4 rounded-xl items-center dial-tiny-text",
|
|
63
63
|
h,
|
|
64
64
|
d
|
|
65
65
|
),
|
|
66
|
-
children:
|
|
66
|
+
children: x
|
|
67
67
|
}
|
|
68
|
-
) : /* @__PURE__ */
|
|
68
|
+
) : /* @__PURE__ */ e(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
71
|
+
id: i,
|
|
72
72
|
type: "button",
|
|
73
|
-
"aria-expanded":
|
|
74
|
-
"aria-controls":
|
|
75
|
-
"aria-label": R(
|
|
73
|
+
"aria-expanded": r,
|
|
74
|
+
"aria-controls": u,
|
|
75
|
+
"aria-label": R(w),
|
|
76
76
|
disabled: o,
|
|
77
77
|
onClick: L,
|
|
78
|
-
className:
|
|
78
|
+
className: t(
|
|
79
79
|
"flex w-full px-4 rounded-xl items-center dial-tiny-text",
|
|
80
80
|
h,
|
|
81
81
|
o ? "cursor-not-allowed opacity-75" : (
|
|
@@ -84,20 +84,30 @@ const J = ({
|
|
|
84
84
|
),
|
|
85
85
|
d
|
|
86
86
|
),
|
|
87
|
-
children:
|
|
87
|
+
children: x
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"px-4 dial-small-text text-primary",
|
|
98
|
-
_
|
|
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]"
|
|
99
97
|
),
|
|
100
|
-
children:
|
|
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
|
+
) }) })
|
|
101
111
|
}
|
|
102
112
|
)
|
|
103
113
|
]
|
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ButtonAppearance as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Dropdown as
|
|
6
|
-
import { getButtonChevron as
|
|
7
|
-
import { DIAL_KIT_CLASS as
|
|
8
|
-
const
|
|
2
|
+
import { useState as u, useMemo as d } from "react";
|
|
3
|
+
import { ButtonAppearance as c, ButtonVariant as f } from "../../../types/button.js";
|
|
4
|
+
import { Button as D } from "../Button/Button.js";
|
|
5
|
+
import { Dropdown as h } from "../Dropdown/Dropdown.js";
|
|
6
|
+
import { getButtonChevron as l } from "./constants.js";
|
|
7
|
+
import { DIAL_KIT_CLASS as w } from "../../../constants/public-class-names.js";
|
|
8
|
+
const O = ({
|
|
9
9
|
variant: n,
|
|
10
10
|
appearance: t,
|
|
11
11
|
items: e,
|
|
12
|
-
|
|
12
|
+
dropdownProps: p,
|
|
13
|
+
...a
|
|
13
14
|
}) => {
|
|
14
|
-
const [o,
|
|
15
|
-
return /* @__PURE__ */ r("div", { className:
|
|
16
|
-
|
|
15
|
+
const [o, i] = u(!1), m = d(() => l(o), [o]);
|
|
16
|
+
return /* @__PURE__ */ r("div", { className: w.buttonDropdown, children: /* @__PURE__ */ r(
|
|
17
|
+
h,
|
|
17
18
|
{
|
|
18
19
|
...p,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
items: e,
|
|
21
|
+
onOpenChange: (s) => i(s),
|
|
22
|
+
children: /* @__PURE__ */ r(
|
|
23
|
+
D,
|
|
24
|
+
{
|
|
25
|
+
...a,
|
|
26
|
+
iconAfter: m,
|
|
27
|
+
variant: n || f.Primary,
|
|
28
|
+
appearance: t || c.Solid,
|
|
29
|
+
"aria-haspopup": "menu",
|
|
30
|
+
"aria-expanded": o
|
|
31
|
+
}
|
|
32
|
+
)
|
|
24
33
|
}
|
|
25
|
-
) })
|
|
34
|
+
) });
|
|
26
35
|
};
|
|
27
36
|
export {
|
|
28
|
-
|
|
37
|
+
O as ButtonDropdown
|
|
29
38
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.0-dev.
|
|
3
|
-
"generatedAt": "2026-09-
|
|
2
|
+
"version": "0.15.0-dev.23",
|
|
3
|
+
"generatedAt": "2026-09-28T14:52:31.794Z",
|
|
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",
|
|
@@ -910,6 +910,12 @@
|
|
|
910
910
|
"type": "DropdownItem[]",
|
|
911
911
|
"required": true,
|
|
912
912
|
"description": "DropdownItems with actions"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"name": "dropdownProps",
|
|
916
|
+
"type": "Pick<DropdownProps, 'listClassName' | 'matchReferenceWidth'>",
|
|
917
|
+
"required": false,
|
|
918
|
+
"description": "`listClassName` and `matchReferenceWidth` forwarded to the menu `Dropdown`"
|
|
913
919
|
}
|
|
914
920
|
],
|
|
915
921
|
"examples": [
|
|
@@ -2276,7 +2282,7 @@
|
|
|
2276
2282
|
"name": "Accordion",
|
|
2277
2283
|
"category": "Components_2_0",
|
|
2278
2284
|
"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.",
|
|
2285
|
+
"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
2286
|
"props": [
|
|
2281
2287
|
{
|
|
2282
2288
|
"name": "title",
|