@epam/ai-dial-sidebar 1.1.0-dev.294 → 1.1.0-dev.296
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconFileSad } from '@tabler/icons-react';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
/** Props for `PanelNoResults`. */
|
|
4
4
|
export interface PanelNoResultsProps {
|
|
5
5
|
/** Primary message shown beneath the icon. */
|
|
6
6
|
label: string;
|
|
7
|
-
/** Icon component rendered above the label. Defaults to `
|
|
8
|
-
icon?: typeof
|
|
9
|
-
/** Icon size in px. Defaults to `
|
|
7
|
+
/** Icon component rendered above the label. Defaults to `IconFileSad`. */
|
|
8
|
+
icon?: typeof IconFileSad;
|
|
9
|
+
/** Icon size in px. Defaults to `32`. */
|
|
10
10
|
iconSize?: number;
|
|
11
11
|
}
|
|
12
12
|
/** Empty-state block rendered when a search or filter produces no matches. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelNoResults.d.ts","sourceRoot":"","sources":["../../../src/components/PanelEmptyState/PanelNoResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PanelNoResults.d.ts","sourceRoot":"","sources":["../../../src/components/PanelEmptyState/PanelNoResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtC,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,WAAW,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAQlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarPanel/SidebarPanel.tsx"],"names":[],"mappings":"AAQA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,6GAA6G;AAC7G,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SidebarPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarPanel/SidebarPanel.tsx"],"names":[],"mappings":"AAQA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,6GAA6G;AAC7G,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAiM9C,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PanelEmptyState as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { DIAL_ICON_SIZE as r, DialConditionalResizableContainer as i, EllipsisTooltip as a, GhostIconButton as o, ResizableContainerSide as s } from "@epam/ai-dial-ui-kit";
|
|
3
|
-
import {
|
|
3
|
+
import { IconFileSad as c, IconMessageCircle as l, IconX as u } from "@tabler/icons-react";
|
|
4
4
|
import { memo as d, useCallback as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
5
5
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
6
6
|
//#region src/types/orientation.ts
|
|
@@ -28,7 +28,7 @@ var b = /* @__PURE__ */ function(e) {
|
|
|
28
28
|
children: o
|
|
29
29
|
})
|
|
30
30
|
]
|
|
31
|
-
})), C = ({ isOpen: e, orientation: a, title: c, leftActions:
|
|
31
|
+
})), C = ({ isOpen: e, orientation: a, title: c, leftActions: l, rightActions: d, onClose: C, labels: w, children: T, styles: E, resizable: D, defaultWidth: O = 360, minWidth: k = 280, maxWidth: A = 600, onResizeStop: j }) => {
|
|
32
32
|
let { colors: M, typography: N, bodyClassName: P, cssVars: F, titleClassName: I, className: L, headerClassName: R } = E ?? {}, z = m(() => t({
|
|
33
33
|
"--sb-bg": M?.background,
|
|
34
34
|
"--sb-border": M?.border,
|
|
@@ -49,8 +49,8 @@ var b = /* @__PURE__ */ function(e) {
|
|
|
49
49
|
forDefault: O,
|
|
50
50
|
width: e
|
|
51
51
|
}, B.current = e, H(e), W(!1), j?.(e);
|
|
52
|
-
}, [O, j]), J = e ? V || B.current : 0, Y = L?.includes("w-full"), X = a === b.
|
|
53
|
-
icon: /* @__PURE__ */ v(
|
|
52
|
+
}, [O, j]), J = e ? V || B.current : 0, Y = L?.includes("w-full"), X = a === b.Left && e ? "border-s" : void 0, Z = a === b.Right ? s.Left : s.Right, Q = C ? /* @__PURE__ */ v(o, {
|
|
53
|
+
icon: /* @__PURE__ */ v(u, {
|
|
54
54
|
size: r.LG,
|
|
55
55
|
stroke: 1.5,
|
|
56
56
|
"aria-hidden": !0
|
|
@@ -61,7 +61,7 @@ var b = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
}) : null;
|
|
62
62
|
return /* @__PURE__ */ v("div", {
|
|
63
63
|
style: Y ? void 0 : { width: J },
|
|
64
|
-
className: n("h-full flex-shrink-0 gap-3 overflow-hidden shadow-
|
|
64
|
+
className: n("h-full flex-shrink-0 gap-3 overflow-hidden shadow-md", a === b.Left && "[clip-path:inset(-24px_-24px_-24px_0)] rtl:[clip-path:inset(-24px_0_-24px_-24px)]", !U && "transition-[width] duration-200 ease-in-out", e && "relative z-50", L, x.panel),
|
|
65
65
|
children: /* @__PURE__ */ v(i, {
|
|
66
66
|
enabled: (D ?? !1) && e,
|
|
67
67
|
side: Z,
|
|
@@ -85,7 +85,7 @@ var b = /* @__PURE__ */ function(e) {
|
|
|
85
85
|
title: c,
|
|
86
86
|
className: R,
|
|
87
87
|
titleClassName: I,
|
|
88
|
-
leftActions: e &&
|
|
88
|
+
leftActions: e && l,
|
|
89
89
|
rightActions: e && /* @__PURE__ */ y(_, { children: [d, Q] })
|
|
90
90
|
}), /* @__PURE__ */ v("div", {
|
|
91
91
|
className: n("flex-1 overflow-y-auto p-4 pt-0", P),
|
|
@@ -94,20 +94,21 @@ var b = /* @__PURE__ */ function(e) {
|
|
|
94
94
|
})
|
|
95
95
|
})
|
|
96
96
|
});
|
|
97
|
-
}, w = d(({ label: t, icon: n =
|
|
97
|
+
}, w = d(({ label: t, icon: n = l, iconSize: r = 48 }) => /* @__PURE__ */ v(e, {
|
|
98
98
|
icon: /* @__PURE__ */ v(n, {
|
|
99
99
|
"aria-hidden": !0,
|
|
100
100
|
size: r,
|
|
101
101
|
stroke: 1
|
|
102
102
|
}),
|
|
103
103
|
label: t
|
|
104
|
-
})), T = d(({ label: t, icon: n =
|
|
104
|
+
})), T = d(({ label: t, icon: n = c, iconSize: r = 32 }) => /* @__PURE__ */ v(e, {
|
|
105
105
|
icon: /* @__PURE__ */ v(n, {
|
|
106
106
|
"aria-hidden": !0,
|
|
107
107
|
size: r,
|
|
108
108
|
stroke: 1
|
|
109
109
|
}),
|
|
110
|
-
label: t
|
|
110
|
+
label: t,
|
|
111
|
+
containerClassName: "pt-6"
|
|
111
112
|
}));
|
|
112
113
|
//#endregion
|
|
113
114
|
export { w as PanelEmpty, T as PanelNoResults, b as SidebarOrientation, C as SidebarPanel };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-sidebar",
|
|
3
3
|
"description": "Resizable sidebar panel shell with header, search, and empty state components",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.296",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.296",
|
|
21
21
|
"@tabler/icons-react": "^3.44.0",
|
|
22
22
|
"react": "^19.0.0",
|
|
23
23
|
"@epam/ai-dial-ui-kit": "*"
|