@epam/ai-dial-ui-kit 0.15.0-dev.35 → 0.15.0-dev.36
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 +2 -0
- package/dist/components/New/BottomSheet/BottomSheet.js +82 -68
- package/dist/components/New/SideDrawer/SideDrawer.js +38 -34
- package/dist/components-manifest.json +32 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +13 -1
- package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +10 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -47,6 +47,8 @@ Versions match the git tags on the `development` branch.
|
|
|
47
47
|
|
|
48
48
|
- **`SideDrawer` (2.0)** — a full-height panel that slides in from the inline end over a dimmed page, moved into the kit from ai-dial-chat, where the catalog's `DetailsPanel` and `StandalonePublishPanel` each carried a near-identical copy with its own backdrop, transform transition, `inert` handling and hand-written Tab trap. Neither `Popup` (a centred modal) nor `CollapsibleSidebar` (an inline rail) covered it. It is built on the same Floating UI pieces as `Popup`: a scroll-locking `FloatingOverlay` on `z-popup`, a `FloatingFocusManager` that moves focus to the panel on open and returns it on close, and `useDismiss` for Escape and a press on the backdrop (unless `closeOnOutsideClick` is false), all calling `onClose` while `open` stays the caller's. Unlike `Popup` the panel stays mounted while closed, so it slides out as well as in and keeps the state of what it holds; closed, it is `inert`, the focus manager and scroll lock are off, and the backdrop lets pointer events through. On desktop it is 540px wide with a rounded, bordered leading edge; on mobile it takes the full width; it slides from the end in either writing direction over 300ms, and not at all under `prefers-reduced-motion`. The header follows `Popup`: `onBack` (with `backDisabled`), the title — a string `header` renders an `<h2>` that names the dialog, a node needs `ariaLabel` — then `headerActions` and the close button, which `closeDisabled` disables and `hideClose` leaves out. The panel carries `dial-kit-side-drawer` (`DIAL_KIT_CLASS.sideDrawer`).
|
|
49
49
|
|
|
50
|
+
- **`BottomSheet` and `SideDrawer` (2.0) — `style` and `overlayStyle`, and `headerClassName` on `BottomSheet`** — both render in a portal at the end of `<body>`, so custom properties a caller sets on its own wrapper never reached the panel, its header or the backdrop, and `className` can carry a class but not a runtime value. A host theming the sheet through `var(--…)` — a panel background, a title colour, a divider, a backdrop tint — had no way to deliver the values. `style` is an inline style on the panel and `overlayStyle` one on the backdrop, merged after its own positioning; `headerClassName` reaches `BottomSheet`'s header row, which `SideDrawer` already exposed. All additive; nothing renders differently without them. Requested in [ai-dial-chat](https://github.com/epam/ai-dial-chat), whose bottom sheets and side panels theme their surfaces through public colour props.
|
|
51
|
+
|
|
50
52
|
### Fixed
|
|
51
53
|
|
|
52
54
|
- **`Button` and `IconButton` (2.0) — a disabled button's tooltip opens** — `tooltipProps` wraps the button in `<Tooltip asChild>`, but a natively `disabled` button receives no pointer or focus events, so its tooltip could never open. That is exactly the state where a "why is this unavailable" hint matters, and callers worked around it with their own `<span>` wrapper, which no keyboard user could reach either. A disabled button that has a visible tooltip is now marked `aria-disabled="true"` instead of `disabled`: it stays in the tab order and answers hover and focus, so the tooltip opens for mouse and keyboard users alike, and it is still announced as unavailable. Its click is swallowed with `preventDefault`, so neither `onClick` nor a `type="submit"` form submission fires. Without a tooltip, or while `hideTooltip` is set, the button stays natively disabled as before. The disabled look is unchanged, since every 2.0 variant already styles `[aria-disabled="true"]`; the two ghost icon-button rules that styled only `:disabled` now style both. Requested in [ai-dial-chat](https://github.com/epam/ai-dial-chat), where the chat-settings dialog explains why "Apply changes" is disabled.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { useFloating as
|
|
3
|
-
import { IconArrowLeft as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
7
|
-
import { GhostIconButton as
|
|
8
|
-
import { useThemeScope as
|
|
9
|
-
import { DIAL_ICON_SIZE as
|
|
10
|
-
import { DIAL_KIT_CLASS as
|
|
11
|
-
import { ElementSize as
|
|
12
|
-
import { mergeClasses as
|
|
13
|
-
const
|
|
2
|
+
import { useFloating as k, useRole as A, useDismiss as O, useInteractions as w, FloatingPortal as z, FloatingOverlay as D, FloatingFocusManager as T } from "@floating-ui/react";
|
|
3
|
+
import { IconArrowLeft as j } from "@tabler/icons-react";
|
|
4
|
+
import { useId as B } from "react";
|
|
5
|
+
import { CloseButton as E } from "../CloseButton/CloseButton.js";
|
|
6
|
+
import { DIAL_KIT_ICON_STROKE as K } from "../constants/icon.js";
|
|
7
|
+
import { GhostIconButton as P } from "../IconButton/IconButtonWrappers.js";
|
|
8
|
+
import { useThemeScope as G } from "../ThemeScope/ThemeScope.js";
|
|
9
|
+
import { DIAL_ICON_SIZE as R } from "../../../constants/icon.js";
|
|
10
|
+
import { DIAL_KIT_CLASS as M } from "../../../constants/public-class-names.js";
|
|
11
|
+
import { ElementSize as U } from "../../../types/size.js";
|
|
12
|
+
import { mergeClasses as o } from "../../../utils/merge-classes.js";
|
|
13
|
+
const te = ({
|
|
14
14
|
open: i,
|
|
15
15
|
onClose: a,
|
|
16
|
-
title:
|
|
16
|
+
title: t,
|
|
17
17
|
ariaLabel: c,
|
|
18
18
|
onBack: s,
|
|
19
19
|
backAriaLabel: d = "Back",
|
|
@@ -22,84 +22,98 @@ const Y = ({
|
|
|
22
22
|
children: p,
|
|
23
23
|
className: h,
|
|
24
24
|
overlayClassName: b,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
headerClassName: g,
|
|
26
|
+
style: x,
|
|
27
|
+
overlayStyle: I,
|
|
28
|
+
bodyClassName: S,
|
|
29
|
+
titleClassName: N,
|
|
30
|
+
portalId: v
|
|
28
31
|
}) => {
|
|
29
|
-
const
|
|
32
|
+
const y = G(), l = `bottom-sheet-title-${B()}`, { refs: n, context: r } = k({
|
|
30
33
|
open: i,
|
|
31
|
-
onOpenChange: (
|
|
32
|
-
|
|
34
|
+
onOpenChange: (_) => {
|
|
35
|
+
_ || a();
|
|
33
36
|
}
|
|
34
|
-
}),
|
|
35
|
-
return i ? /* @__PURE__ */ e(
|
|
36
|
-
|
|
37
|
+
}), F = A(r, { role: "dialog" }), C = O(r, { outsidePress: f }), { getFloatingProps: L } = w([F, C]);
|
|
38
|
+
return i ? /* @__PURE__ */ e(z, { id: v, children: /* @__PURE__ */ e(
|
|
39
|
+
D,
|
|
37
40
|
{
|
|
38
41
|
lockScroll: !0,
|
|
39
|
-
|
|
42
|
+
style: I,
|
|
43
|
+
className: o(
|
|
40
44
|
"z-popup flex items-end bg-backdrop",
|
|
41
|
-
|
|
45
|
+
y,
|
|
42
46
|
b
|
|
43
47
|
),
|
|
44
|
-
children: /* @__PURE__ */ e(
|
|
48
|
+
children: /* @__PURE__ */ e(T, { context: r, initialFocus: n.floating, children: /* @__PURE__ */ m(
|
|
45
49
|
"div",
|
|
46
50
|
{
|
|
47
51
|
ref: n.setFloating,
|
|
48
|
-
...
|
|
52
|
+
...L(),
|
|
49
53
|
role: "dialog",
|
|
50
54
|
"aria-modal": "true",
|
|
51
|
-
"aria-labelledby":
|
|
52
|
-
"aria-label":
|
|
53
|
-
|
|
55
|
+
"aria-labelledby": t ? l : void 0,
|
|
56
|
+
"aria-label": t ? void 0 : c,
|
|
57
|
+
style: x,
|
|
58
|
+
className: o(
|
|
54
59
|
"flex max-h-[85dvh] w-full flex-col rounded-t-lg bg-layer-raised outline-none",
|
|
55
60
|
"animate-slideUp motion-reduce:animate-none",
|
|
56
61
|
h,
|
|
57
|
-
|
|
62
|
+
M.bottomSheet
|
|
58
63
|
),
|
|
59
64
|
children: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
t && /* @__PURE__ */ m(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: o(
|
|
69
|
+
"relative flex h-[60px] shrink-0 items-center justify-center border-b border-tertiary px-14",
|
|
70
|
+
g
|
|
71
|
+
),
|
|
72
|
+
children: [
|
|
73
|
+
s && /* @__PURE__ */ e(
|
|
74
|
+
P,
|
|
69
75
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
"aria-label": d,
|
|
77
|
+
className: "absolute start-4",
|
|
78
|
+
onClick: s,
|
|
79
|
+
icon: /* @__PURE__ */ e(
|
|
80
|
+
j,
|
|
81
|
+
{
|
|
82
|
+
size: R.LG,
|
|
83
|
+
stroke: K,
|
|
84
|
+
className: "rtl:-scale-x-100",
|
|
85
|
+
"aria-hidden": "true"
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
|
+
"h2",
|
|
92
|
+
{
|
|
93
|
+
id: l,
|
|
94
|
+
className: o(
|
|
95
|
+
"min-w-0 truncate text-primary",
|
|
96
|
+
N ?? "dial-body-semi-text"
|
|
97
|
+
),
|
|
98
|
+
children: t
|
|
74
99
|
}
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ e(
|
|
79
|
-
"h2",
|
|
80
|
-
{
|
|
81
|
-
id: l,
|
|
82
|
-
className: t(
|
|
83
|
-
"min-w-0 truncate text-primary",
|
|
84
|
-
x ?? "dial-body-semi-text"
|
|
85
100
|
),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
] }),
|
|
101
|
+
/* @__PURE__ */ e(
|
|
102
|
+
E,
|
|
103
|
+
{
|
|
104
|
+
ariaLabel: u,
|
|
105
|
+
onClose: a,
|
|
106
|
+
size: U.Standard,
|
|
107
|
+
className: "absolute end-4"
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
),
|
|
99
113
|
/* @__PURE__ */ e(
|
|
100
114
|
"div",
|
|
101
115
|
{
|
|
102
|
-
className:
|
|
116
|
+
className: o("min-h-0 overflow-y-auto", S),
|
|
103
117
|
children: p
|
|
104
118
|
}
|
|
105
119
|
)
|
|
@@ -110,5 +124,5 @@ const Y = ({
|
|
|
110
124
|
) }) : null;
|
|
111
125
|
};
|
|
112
126
|
export {
|
|
113
|
-
|
|
127
|
+
te as BottomSheet
|
|
114
128
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { useFloating as
|
|
3
|
-
import { IconChevronLeft as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
7
|
-
import { GhostIconButton as
|
|
8
|
-
import { useThemeScope as
|
|
9
|
-
import { DIAL_ICON_SIZE as
|
|
10
|
-
import { DIAL_KIT_CLASS as
|
|
11
|
-
import { ElementSize as
|
|
2
|
+
import { useFloating as A, useRole as E, useDismiss as K, useInteractions as P, FloatingPortal as j, FloatingOverlay as M, FloatingFocusManager as R } from "@floating-ui/react";
|
|
3
|
+
import { IconChevronLeft as B } from "@tabler/icons-react";
|
|
4
|
+
import { useId as G } from "react";
|
|
5
|
+
import { CloseButton as H } from "../CloseButton/CloseButton.js";
|
|
6
|
+
import { DIAL_KIT_ICON_STROKE as Z } from "../constants/icon.js";
|
|
7
|
+
import { GhostIconButton as $ } from "../IconButton/IconButtonWrappers.js";
|
|
8
|
+
import { useThemeScope as q } from "../ThemeScope/ThemeScope.js";
|
|
9
|
+
import { DIAL_ICON_SIZE as J } from "../../../constants/icon.js";
|
|
10
|
+
import { DIAL_KIT_CLASS as Q } from "../../../constants/public-class-names.js";
|
|
11
|
+
import { ElementSize as U } from "../../../types/size.js";
|
|
12
12
|
import { mergeClasses as r } from "../../../utils/merge-classes.js";
|
|
13
|
-
const
|
|
13
|
+
const ne = ({
|
|
14
14
|
open: t,
|
|
15
15
|
onClose: l,
|
|
16
16
|
header: o,
|
|
@@ -27,28 +27,31 @@ const ae = ({
|
|
|
27
27
|
className: I,
|
|
28
28
|
overlayClassName: v,
|
|
29
29
|
headerClassName: S,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
style: w,
|
|
31
|
+
overlayStyle: N,
|
|
32
|
+
bodyClassName: k,
|
|
33
|
+
titleClassName: F,
|
|
34
|
+
portalId: C
|
|
33
35
|
}) => {
|
|
34
|
-
const
|
|
36
|
+
const D = q(), d = `side-drawer-title-${G()}`, s = typeof o == "string", { refs: m, context: a } = A({
|
|
35
37
|
open: t,
|
|
36
|
-
onOpenChange: (
|
|
37
|
-
|
|
38
|
+
onOpenChange: (z) => {
|
|
39
|
+
z || l();
|
|
38
40
|
}
|
|
39
|
-
}),
|
|
40
|
-
return /* @__PURE__ */ e(
|
|
41
|
-
|
|
41
|
+
}), _ = E(a, { role: "dialog" }), L = K(a, { outsidePress: h }), { getFloatingProps: T } = P([_, L]), O = o != null || i != null || !n;
|
|
42
|
+
return /* @__PURE__ */ e(j, { id: C, children: /* @__PURE__ */ e(
|
|
43
|
+
M,
|
|
42
44
|
{
|
|
43
45
|
lockScroll: t,
|
|
46
|
+
style: N,
|
|
44
47
|
className: r(
|
|
45
48
|
"z-popup bg-backdrop transition-opacity duration-300 motion-reduce:transition-none",
|
|
46
49
|
t ? "opacity-100" : "pointer-events-none opacity-0",
|
|
47
|
-
|
|
50
|
+
D,
|
|
48
51
|
v
|
|
49
52
|
),
|
|
50
53
|
children: /* @__PURE__ */ e(
|
|
51
|
-
|
|
54
|
+
R,
|
|
52
55
|
{
|
|
53
56
|
context: a,
|
|
54
57
|
disabled: !t,
|
|
@@ -57,22 +60,23 @@ const ae = ({
|
|
|
57
60
|
"div",
|
|
58
61
|
{
|
|
59
62
|
ref: m.setFloating,
|
|
60
|
-
...
|
|
63
|
+
...T(),
|
|
61
64
|
role: "dialog",
|
|
62
65
|
"aria-modal": "true",
|
|
63
66
|
"aria-labelledby": s ? d : void 0,
|
|
64
67
|
"aria-label": s ? void 0 : f,
|
|
65
68
|
inert: !t,
|
|
69
|
+
style: w,
|
|
66
70
|
className: r(
|
|
67
71
|
"fixed inset-y-0 end-0 flex w-full flex-col overflow-hidden bg-layer-raised outline-none",
|
|
68
72
|
"desktop:w-[540px] desktop:rounded-s-xl desktop:border-s desktop:border-secondary",
|
|
69
73
|
"transition-transform duration-300 motion-reduce:transition-none",
|
|
70
74
|
t ? "translate-x-0" : "translate-x-full rtl:-translate-x-full",
|
|
71
75
|
I,
|
|
72
|
-
|
|
76
|
+
Q.sideDrawer
|
|
73
77
|
),
|
|
74
78
|
children: [
|
|
75
|
-
|
|
79
|
+
O && /* @__PURE__ */ c(
|
|
76
80
|
"div",
|
|
77
81
|
{
|
|
78
82
|
className: r(
|
|
@@ -81,16 +85,16 @@ const ae = ({
|
|
|
81
85
|
),
|
|
82
86
|
children: [
|
|
83
87
|
i && /* @__PURE__ */ e(
|
|
84
|
-
|
|
88
|
+
$,
|
|
85
89
|
{
|
|
86
90
|
"aria-label": u,
|
|
87
91
|
disabled: x,
|
|
88
92
|
onClick: i,
|
|
89
93
|
icon: /* @__PURE__ */ e(
|
|
90
|
-
|
|
94
|
+
B,
|
|
91
95
|
{
|
|
92
|
-
size:
|
|
93
|
-
stroke:
|
|
96
|
+
size: J.MD,
|
|
97
|
+
stroke: Z,
|
|
94
98
|
className: "rtl:-scale-x-100",
|
|
95
99
|
"aria-hidden": "true"
|
|
96
100
|
}
|
|
@@ -103,19 +107,19 @@ const ae = ({
|
|
|
103
107
|
id: d,
|
|
104
108
|
className: r(
|
|
105
109
|
"min-w-0 flex-1 truncate text-primary",
|
|
106
|
-
|
|
110
|
+
F ?? "dial-h2-text"
|
|
107
111
|
),
|
|
108
112
|
children: o
|
|
109
113
|
}
|
|
110
114
|
) : /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: o }),
|
|
111
115
|
p,
|
|
112
116
|
!n && /* @__PURE__ */ e(
|
|
113
|
-
|
|
117
|
+
H,
|
|
114
118
|
{
|
|
115
119
|
ariaLabel: g,
|
|
116
120
|
onClose: l,
|
|
117
121
|
disabled: b,
|
|
118
|
-
size:
|
|
122
|
+
size: U.Standard
|
|
119
123
|
}
|
|
120
124
|
)
|
|
121
125
|
]
|
|
@@ -126,7 +130,7 @@ const ae = ({
|
|
|
126
130
|
{
|
|
127
131
|
className: r(
|
|
128
132
|
"min-h-0 flex-1 overflow-y-auto",
|
|
129
|
-
|
|
133
|
+
k
|
|
130
134
|
),
|
|
131
135
|
children: y
|
|
132
136
|
}
|
|
@@ -140,5 +144,5 @@ const ae = ({
|
|
|
140
144
|
) });
|
|
141
145
|
};
|
|
142
146
|
export {
|
|
143
|
-
|
|
147
|
+
ne as SideDrawer
|
|
144
148
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.0-dev.
|
|
3
|
-
"generatedAt": "2026-
|
|
2
|
+
"version": "0.15.0-dev.36",
|
|
3
|
+
"generatedAt": "2026-10-01T09:56:10.153Z",
|
|
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",
|
|
@@ -3533,6 +3533,24 @@
|
|
|
3533
3533
|
"required": false,
|
|
3534
3534
|
"description": "Additional CSS classes for the backdrop"
|
|
3535
3535
|
},
|
|
3536
|
+
{
|
|
3537
|
+
"name": "headerClassName",
|
|
3538
|
+
"type": "string",
|
|
3539
|
+
"required": false,
|
|
3540
|
+
"description": "Additional CSS classes for the header row"
|
|
3541
|
+
},
|
|
3542
|
+
{
|
|
3543
|
+
"name": "style",
|
|
3544
|
+
"type": "CSSProperties",
|
|
3545
|
+
"required": false,
|
|
3546
|
+
"description": "Inline style for the panel, e.g. custom properties"
|
|
3547
|
+
},
|
|
3548
|
+
{
|
|
3549
|
+
"name": "overlayStyle",
|
|
3550
|
+
"type": "CSSProperties",
|
|
3551
|
+
"required": false,
|
|
3552
|
+
"description": "Inline style for the backdrop"
|
|
3553
|
+
},
|
|
3536
3554
|
{
|
|
3537
3555
|
"name": "bodyClassName",
|
|
3538
3556
|
"type": "string",
|
|
@@ -3778,6 +3796,18 @@
|
|
|
3778
3796
|
"required": false,
|
|
3779
3797
|
"description": "Additional CSS classes for the header row"
|
|
3780
3798
|
},
|
|
3799
|
+
{
|
|
3800
|
+
"name": "style",
|
|
3801
|
+
"type": "CSSProperties",
|
|
3802
|
+
"required": false,
|
|
3803
|
+
"description": "Inline style for the panel, e.g. custom properties"
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
"name": "overlayStyle",
|
|
3807
|
+
"type": "CSSProperties",
|
|
3808
|
+
"required": false,
|
|
3809
|
+
"description": "Inline style for the backdrop"
|
|
3810
|
+
},
|
|
3781
3811
|
{
|
|
3782
3812
|
"name": "bodyClassName",
|
|
3783
3813
|
"type": "string",
|