@epam/ai-dial-source-panel 1.3.0-dev.34 → 1.3.0-dev.343

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 +1 @@
1
- {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAyLnG,wBAA8C"}
1
+ {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAoMnG,wBAA8C"}
@@ -9,6 +9,8 @@ interface FilesSectionProps {
9
9
  searchQuery?: string;
10
10
  /** CSS class applied to the section heading. Defaults to `'dial-body-semi-text'`. */
11
11
  titleClassName?: string;
12
+ /** Extra class name(s) merged onto the section root. */
13
+ className?: string;
12
14
  /** Called when the user clicks an attachment card. */
13
15
  onAttachmentClick?: (attachment: DisplayAttachment) => void;
14
16
  /** Accessible label for the attachment click action, forwarded to `AttachmentCard`. */
@@ -1 +1 @@
1
- {"version":3,"file":"FilesSection.d.ts","sourceRoot":"","sources":["../../../src/components/FilesSection/FilesSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,4CAA4C;AAC5C,UAAU,iBAAiB;IACzB,kEAAkE;IAClE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;;AAuCD,wBAAkC"}
1
+ {"version":3,"file":"FilesSection.d.ts","sourceRoot":"","sources":["../../../src/components/FilesSection/FilesSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,4CAA4C;AAC5C,UAAU,iBAAiB;IACzB,kEAAkE;IAClE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;;AAwCD,wBAAkC"}
@@ -27,6 +27,8 @@ interface SourcesSectionProps {
27
27
  typography?: ConversationSourcesPanelTypography;
28
28
  /** Color overrides applied as CSS custom properties. */
29
29
  colors?: ConversationSourcesPanelColors;
30
+ /** Extra class name(s) merged onto the section root. */
31
+ className?: string;
30
32
  /** When provided, called on source link click instead of following the href. */
31
33
  onSourceClick?: (source: QuotationSource) => void;
32
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EACV,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,gDAAgD;AAChD,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mHAAmH;IACnH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kHAAkH;IAClH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uHAAuH;IACvH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+GAA+G;IAC/G,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,uHAAuH;IACvH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;AA0HD,wBAAoC"}
1
+ {"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EACV,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,gDAAgD;AAChD,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mHAAmH;IACnH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kHAAkH;IAClH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uHAAuH;IACvH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+GAA+G;IAC/G,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,uHAAuH;IACvH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;AA2HD,wBAAoC"}
package/index.css CHANGED
@@ -1,2 +1,3 @@
1
1
  ._link_12icw_1{color:var(--sp-source-link,var(--text-info,#1d4ed8))}._quote_12icw_5{color:var(--sp-source-quote,var(--text-primary,#161b2d))}
2
- /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.mb-3{margin-bottom:.75rem}.mb-6{margin-bottom:1.5rem}.line-clamp-5{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:5}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-full{height:100%}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}.resize{resize:both}.grid-cols-\[repeat\(auto-fill\2c minmax\(84px\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-0{padding:0}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pt-0{padding-top:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[\&\>div\>\*\+\*\]\:mt-1>div>*+*{margin-top:.25rem}
2
+ /*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3
+ .mb-3{margin-bottom:.75rem}.mb-6{margin-bottom:1.5rem}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.table{display:table}.h-full{height:100%}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1}.resize{resize:both}.grid-cols-\[repeat\(auto-fill\,minmax\(100px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.p-0{padding:0}.p-4{padding:1rem}.px-3{padding-inline:.75rem}.py-2{padding-block:.5rem}.pt-0{padding-top:0}.\[\&\>div\>\*\+\*\]\:mt-1>div>*+*{margin-top:.25rem}
package/index.js CHANGED
@@ -1,189 +1,197 @@
1
1
  import { BASE_LG_ICON_PROPS as e, MarkdownRenderer as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
2
  import { PanelNoResults as i, SidebarOrientation as a, SidebarPanel as o } from "@epam/ai-dial-sidebar";
3
- import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, ElementSize as l, GhostIconButton as u, Highlight as d, LinkButton as f, NoDataContent as p, Search as m, mergeClasses as h } from "@epam/ai-dial-ui-kit";
4
- import { IconCopy as g, IconDownload as _ } from "@tabler/icons-react";
5
- import { memo as v, useLayoutEffect as y, useMemo as b, useState as x } from "react";
6
- import { AttachmentCard as S } from "@epam/ai-dial-attachment-input";
7
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
3
+ import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, ElementSize as l, GhostIconButton as u, Highlight as d, LinkButton as f, LiveRegion as p, LiveRegionElement as m, NoDataContent as h, Search as g, mergeClasses as _ } from "@epam/ai-dial-ui-kit";
4
+ import { IconCopy as v, IconDownload as y } from "@tabler/icons-react";
5
+ import { memo as b, useLayoutEffect as x, useMemo as S, useState as C } from "react";
6
+ import { AttachmentCard as w } from "@epam/ai-dial-attachment-input";
7
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
8
8
  //#region src/constants/public-class-names.ts
9
- var E = { panel: "dial-source-panel-panel" }, D = v(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", onAttachmentClick: a, attachmentClickLabel: o }) => e.length === 0 ? null : /* @__PURE__ */ T("section", {
10
- className: "mb-6",
11
- children: [/* @__PURE__ */ w("h2", {
9
+ var O = { panel: "dial-source-panel-panel" }, k = b(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", className: a, onAttachmentClick: o, attachmentClickLabel: s }) => e.length === 0 ? null : /* @__PURE__ */ D("section", {
10
+ className: r("mb-6", a),
11
+ children: [/* @__PURE__ */ E("h2", {
12
12
  className: r(i, "mb-3"),
13
13
  children: t
14
- }), /* @__PURE__ */ w("div", {
14
+ }), /* @__PURE__ */ E("div", {
15
15
  role: "list",
16
- className: "grid grid-cols-[repeat(auto-fill,minmax(84px,1fr))] gap-3",
17
- children: e.map((e, t) => /* @__PURE__ */ w("div", {
16
+ className: "grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-3",
17
+ children: e.map((e, t) => /* @__PURE__ */ E("div", {
18
18
  role: "listitem",
19
- children: /* @__PURE__ */ w(S, {
19
+ children: /* @__PURE__ */ E(w, {
20
20
  attachment: e,
21
21
  searchQuery: n,
22
- onClick: a ? () => a(e) : void 0,
23
- labels: { clickLabel: o }
22
+ onClick: o ? () => o(e) : void 0,
23
+ labels: { clickLabel: s }
24
24
  })
25
25
  }, `${e.id}-${t}`))
26
26
  })]
27
- })), O = {
27
+ })), A = {
28
28
  link: "_link_12icw_1",
29
29
  quote: "_quote_12icw_5"
30
- }, k = v(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", codeBlockCopyLabel: p, codeBlockCopiedLabel: m, codeBlockDownloadLabel: h, tableScrollRegionAriaLabel: _, mathScrollRegionAriaLabel: v, searchQuery: y = "", typography: S, colors: C, onSourceClick: E }) => {
31
- let [D, k] = x(""), A = S?.sectionTitleClassName ?? "dial-body-semi-text", j = S?.sourceLinkClassName ?? "dial-small-text", M = S?.sourceQuoteClassName ?? "dial-tiny-text", N = b(() => n({
32
- "--sp-source-link": C?.sourceLink,
33
- "--sp-source-quote": C?.sourceQuote
34
- }), [C]);
30
+ }, j = b(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", codeBlockCopyLabel: h, codeBlockCopiedLabel: g, codeBlockDownloadLabel: _, tableScrollRegionAriaLabel: y, mathScrollRegionAriaLabel: b, searchQuery: x = "", typography: w, colors: T, className: O, onSourceClick: k }) => {
31
+ let [j, M] = C(""), N = w?.sectionTitleClassName ?? "dial-body-semi-text", P = w?.sourceLinkClassName ?? "dial-small-text", F = w?.sourceQuoteClassName ?? "dial-tiny-text", I = S(() => n({
32
+ "--sp-source-link": T?.sourceLink,
33
+ "--sp-source-quote": T?.sourceQuote
34
+ }), [T]);
35
35
  if (i.length === 0) return null;
36
- let P = async (e) => {
37
- await navigator.clipboard.writeText(e), k(o);
36
+ let L = async (e) => {
37
+ await navigator.clipboard.writeText(e), M(o);
38
38
  };
39
- return /* @__PURE__ */ T("section", {
40
- className: "mb-6",
41
- style: N,
39
+ return /* @__PURE__ */ D("section", {
40
+ className: r("mb-6", O),
41
+ style: I,
42
42
  children: [
43
- /* @__PURE__ */ w("h2", {
44
- className: r(A, "mb-3"),
43
+ /* @__PURE__ */ E("h2", {
44
+ className: r(N, "mb-3"),
45
45
  children: e
46
46
  }),
47
- /* @__PURE__ */ w("ul", {
47
+ /* @__PURE__ */ E("ul", {
48
48
  className: "flex flex-col gap-3",
49
- children: i.map((e) => /* @__PURE__ */ T("li", {
49
+ children: i.map((e) => /* @__PURE__ */ D("li", {
50
50
  className: "flex flex-col gap-1",
51
- children: [/* @__PURE__ */ T("div", {
51
+ children: [/* @__PURE__ */ D("div", {
52
52
  className: "flex min-w-0 items-center justify-between gap-2",
53
- children: [/* @__PURE__ */ w(f, {
53
+ children: [/* @__PURE__ */ E(f, {
54
54
  href: e.url,
55
55
  target: "_blank",
56
56
  size: l.Small,
57
- className: r(O.link, "min-w-0 flex-1 justify-start"),
58
- textClassName: r(j, "min-w-0 truncate"),
59
- label: /* @__PURE__ */ w(d, {
57
+ className: r(A.link, "min-w-0 flex-1 justify-start"),
58
+ textClassName: r(P, "min-w-0 truncate"),
59
+ label: /* @__PURE__ */ E(d, {
60
60
  text: e.title,
61
- query: y,
61
+ query: x,
62
62
  maxLines: 1
63
63
  }),
64
64
  "aria-label": e.title,
65
- onClick: E ? (t) => {
66
- t.preventDefault(), E(e);
65
+ onClick: k ? (t) => {
66
+ t.preventDefault(), k(e);
67
67
  } : void 0
68
- }), /* @__PURE__ */ w(u, {
68
+ }), /* @__PURE__ */ E(u, {
69
69
  size: l.Small,
70
- icon: /* @__PURE__ */ w(g, {
70
+ icon: /* @__PURE__ */ E(v, {
71
71
  size: s.SM,
72
72
  stroke: c,
73
73
  "aria-hidden": !0
74
74
  }),
75
75
  "aria-label": a,
76
- onClick: () => void P(e.url)
76
+ onClick: () => void L(e.url)
77
77
  })]
78
- }), e.quote && /* @__PURE__ */ w("div", {
79
- className: r(M, O.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
80
- children: /* @__PURE__ */ w(t, {
78
+ }), e.quote && /* @__PURE__ */ E("div", {
79
+ className: r(F, A.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
80
+ children: /* @__PURE__ */ E(t, {
81
81
  content: e.quote,
82
- codeBlockCopyLabel: p,
83
- codeBlockCopiedLabel: m,
84
- codeBlockDownloadLabel: h,
85
- tableScrollRegionAriaLabel: _,
86
- mathScrollRegionAriaLabel: v
82
+ codeBlockCopyLabel: h,
83
+ codeBlockCopiedLabel: g,
84
+ codeBlockDownloadLabel: _,
85
+ tableScrollRegionAriaLabel: y,
86
+ mathScrollRegionAriaLabel: b
87
87
  })
88
88
  })]
89
89
  }, e.url))
90
90
  }),
91
- /* @__PURE__ */ w("span", {
92
- role: "status",
93
- "aria-live": "polite",
94
- className: "sr-only",
95
- children: D
91
+ /* @__PURE__ */ E(p, {
92
+ visuallyHidden: !0,
93
+ as: m.Span,
94
+ children: j
96
95
  })
97
96
  ]
98
97
  });
99
- }), A = (e, t) => e.toLowerCase().includes(t.toLowerCase()), j = v(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: g, defaultWidth: v, minWidth: S, maxWidth: O, onResizeStop: j, labels: M, styles: N, title: P, additionalSections: F }) => {
100
- let [I, L] = x(""), R = (e) => {
101
- L(e ?? "");
98
+ }), M = (e, t) => e.toLowerCase().includes(t.toLowerCase()), N = b(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: v, isBoundedOverlay: b = !1, defaultWidth: w, minWidth: A, maxWidth: N, onResizeStop: P, labels: F, styles: I, title: L, additionalSections: R }) => {
99
+ let [z, B] = C(""), V = (e) => {
100
+ B(e ?? "");
102
101
  };
103
- y(() => {
104
- t || L("");
102
+ x(() => {
103
+ t || B("");
105
104
  }, [t]);
106
- let z = b(() => I ? r.filter((e) => A(e.name, I)) : r, [r, I]), B = b(() => I ? s.filter((e) => A(e.name, I)) : s, [s, I]), V = b(() => I ? c.filter((e) => A(e.title, I) || A(e.url, I) || e.quote != null && A(e.quote, I)) : c, [c, I]), H = r.length > 0 || s.length > 0 || c.length > 0, U = !H && !F, W = I !== "" && z.length === 0 && B.length === 0 && V.length === 0, G;
107
- return G = U ? /* @__PURE__ */ w("div", {
105
+ let H = S(() => z ? r.filter((e) => M(e.name, z)) : r, [r, z]), U = S(() => z ? s.filter((e) => M(e.name, z)) : s, [s, z]), W = S(() => z ? c.filter((e) => M(e.title, z) || M(e.url, z) || e.quote != null && M(e.quote, z)) : c, [c, z]), G = r.length > 0 || s.length > 0 || c.length > 0, K = !G && !R, q = z !== "" && H.length === 0 && U.length === 0 && W.length === 0, J;
106
+ return J = K ? /* @__PURE__ */ E("div", {
108
107
  className: "flex h-full items-center justify-center",
109
- children: /* @__PURE__ */ w(p, { title: M.noDataLabel })
110
- }) : /* @__PURE__ */ T(C, { children: [F, W ? /* @__PURE__ */ w(i, { label: M.noResultsLabel }) : /* @__PURE__ */ T(C, { children: [
111
- /* @__PURE__ */ w(D, {
112
- attachments: z,
113
- title: M.uploadedSectionTitle,
114
- searchQuery: I,
115
- titleClassName: N?.typography?.sectionTitleClassName,
108
+ children: /* @__PURE__ */ E(h, {
109
+ title: F.noDataLabel,
110
+ description: F.noDataDescription
111
+ })
112
+ }) : /* @__PURE__ */ D(T, { children: [R, q ? /* @__PURE__ */ E(i, {
113
+ label: F.noResultsLabel,
114
+ description: F.noResultsDescription
115
+ }) : /* @__PURE__ */ D(T, { children: [
116
+ /* @__PURE__ */ E(k, {
117
+ attachments: H,
118
+ title: F.uploadedSectionTitle,
119
+ searchQuery: z,
120
+ titleClassName: I?.typography?.sectionTitleClassName,
121
+ className: I?.sectionClassName,
116
122
  onAttachmentClick: l,
117
- attachmentClickLabel: M.attachmentClickLabel
123
+ attachmentClickLabel: F.attachmentClickLabel
118
124
  }),
119
- /* @__PURE__ */ w(D, {
120
- attachments: B,
121
- title: M.generatedSectionTitle,
122
- searchQuery: I,
123
- titleClassName: N?.typography?.sectionTitleClassName,
125
+ /* @__PURE__ */ E(k, {
126
+ attachments: U,
127
+ title: F.generatedSectionTitle,
128
+ searchQuery: z,
129
+ titleClassName: I?.typography?.sectionTitleClassName,
130
+ className: I?.sectionClassName,
124
131
  onAttachmentClick: l,
125
- attachmentClickLabel: M.attachmentClickLabel
132
+ attachmentClickLabel: F.attachmentClickLabel
126
133
  }),
127
- /* @__PURE__ */ w(k, {
128
- sources: V,
129
- title: M.sourcesSectionTitle,
130
- searchQuery: I,
131
- typography: N?.typography,
132
- colors: N?.colors,
133
- copyLabel: M.copySourceLabel,
134
- copiedLabel: M.sourceCopiedLabel,
135
- codeBlockCopyLabel: M.codeBlockCopyLabel,
136
- codeBlockCopiedLabel: M.codeBlockCopiedLabel,
137
- codeBlockDownloadLabel: M.codeBlockDownloadLabel,
138
- tableScrollRegionAriaLabel: M.tableScrollRegionAriaLabel,
139
- mathScrollRegionAriaLabel: M.mathScrollRegionAriaLabel,
134
+ /* @__PURE__ */ E(j, {
135
+ sources: W,
136
+ title: F.sourcesSectionTitle,
137
+ searchQuery: z,
138
+ typography: I?.typography,
139
+ colors: I?.colors,
140
+ className: I?.sectionClassName,
141
+ copyLabel: F.copySourceLabel,
142
+ copiedLabel: F.sourceCopiedLabel,
143
+ codeBlockCopyLabel: F.codeBlockCopyLabel,
144
+ codeBlockCopiedLabel: F.codeBlockCopiedLabel,
145
+ codeBlockDownloadLabel: F.codeBlockDownloadLabel,
146
+ tableScrollRegionAriaLabel: F.tableScrollRegionAriaLabel,
147
+ mathScrollRegionAriaLabel: F.mathScrollRegionAriaLabel,
140
148
  onSourceClick: d
141
149
  })
142
- ] })] }), /* @__PURE__ */ T(o, {
150
+ ] })] }), /* @__PURE__ */ D(o, {
143
151
  isOpen: t,
152
+ isBoundedOverlay: b,
144
153
  orientation: a.Right,
145
154
  styles: {
146
- className: h(g && t && "w-full", E.panel),
155
+ className: _(v && !b && t && "w-full", O.panel),
147
156
  bodyClassName: "flex flex-col overflow-hidden p-0"
148
157
  },
149
- labels: M,
150
- title: P,
158
+ labels: F,
159
+ title: L,
151
160
  onClose: n,
152
- resizable: !g,
153
- defaultWidth: v,
154
- minWidth: S,
155
- maxWidth: O,
156
- onResizeStop: j,
157
- rightActions: H && f && /* @__PURE__ */ w(u, {
158
- icon: /* @__PURE__ */ w(_, { ...e }),
159
- "aria-label": M.downloadAllLabel,
160
- tooltipProps: { tooltip: M.downloadAllLabel },
161
+ resizable: !v || b,
162
+ defaultWidth: w,
163
+ minWidth: A,
164
+ maxWidth: N,
165
+ onResizeStop: P,
166
+ rightActions: G && f && /* @__PURE__ */ E(u, {
167
+ icon: /* @__PURE__ */ E(y, { ...e }),
168
+ "aria-label": F.downloadAllLabel,
169
+ tooltipProps: { tooltip: F.downloadAllLabel },
161
170
  onClick: f
162
171
  }),
163
172
  children: [
164
- H && /* @__PURE__ */ w("div", {
173
+ G && /* @__PURE__ */ E("div", {
165
174
  role: "search",
166
175
  className: "px-3 py-2",
167
- children: /* @__PURE__ */ w(m, {
168
- value: I,
169
- onChange: R,
170
- placeholder: M.searchPlaceholder,
171
- clearLabel: M.searchClearLabel,
172
- "aria-label": M.searchPlaceholder
176
+ children: /* @__PURE__ */ E(g, {
177
+ value: z,
178
+ onChange: V,
179
+ placeholder: F.searchPlaceholder,
180
+ clearLabel: F.searchClearLabel,
181
+ "aria-label": F.searchPlaceholder
173
182
  })
174
183
  }),
175
- /* @__PURE__ */ w("span", {
176
- role: "status",
177
- "aria-live": "polite",
178
- className: "sr-only",
179
- children: W ? M.noResultsLabel : ""
184
+ /* @__PURE__ */ E(p, {
185
+ visuallyHidden: !0,
186
+ as: m.Span,
187
+ children: q ? F.noResultsLabel : ""
180
188
  }),
181
- /* @__PURE__ */ w("div", {
189
+ /* @__PURE__ */ E("div", {
182
190
  className: "flex-1 overflow-y-auto p-4 pt-0",
183
- children: G
191
+ children: J
184
192
  })
185
193
  ]
186
194
  });
187
195
  });
188
196
  //#endregion
189
- export { j as ConversationSourcesPanel, E as SOURCE_PANEL_CLASS };
197
+ export { N as ConversationSourcesPanel, O as SOURCE_PANEL_CLASS };
@@ -15,8 +15,12 @@ export interface ConversationSourcesPanelLabels {
15
15
  searchClearLabel: string;
16
16
  /** Text shown in the centred empty state when the panel has no files or sources. */
17
17
  noDataLabel: string;
18
+ /** Secondary line under `noDataLabel`. Omitted when not set. */
19
+ noDataDescription?: string;
18
20
  /** Text shown when a search query matches nothing. */
19
21
  noResultsLabel: string;
22
+ /** Secondary line under `noResultsLabel`. Omitted when not set. */
23
+ noResultsDescription?: string;
20
24
  /** Accessible label for the download-all icon button. */
21
25
  downloadAllLabel: string;
22
26
  /** Heading text for the uploaded-files section. */
@@ -64,6 +68,8 @@ export interface ConversationSourcesPanelStyles {
64
68
  colors?: ConversationSourcesPanelColors;
65
69
  /** Typography overrides for section headings and source text. */
66
70
  typography?: ConversationSourcesPanelTypography;
71
+ /** Extra class name(s) merged onto each files/sources section root. Defaults to none. */
72
+ sectionClassName?: string;
67
73
  }
68
74
  /** Props for the ConversationSourcesPanel component. */
69
75
  export interface ConversationSourcesPanelProps {
@@ -85,6 +91,8 @@ export interface ConversationSourcesPanelProps {
85
91
  onDownloadAll?: () => void;
86
92
  /** Whether the viewport is in mobile breakpoint (disables resizing). */
87
93
  isMobile: boolean;
94
+ /** Opt into a bounded overlay without changing mobile content semantics. */
95
+ isBoundedOverlay?: boolean;
88
96
  /** Initial panel width in pixels. */
89
97
  defaultWidth?: number;
90
98
  /** Minimum panel width in pixels. */
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,4CAA4C;IAC5C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,yHAAyH;IACzH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oHAAoH;IACpH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iHAAiH;IACjH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4HAA4H;I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CAAC;IAClB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gEAAgE;IAChE,MAAM,EAAE,8BAA8B,CAAC;IACvC,wEAAwE;IACxE,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC"}
1
+ {"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yDAAyD;IACzD,gBAAgB,EAAE,MAAM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;IAChB,wDAAwD;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,6DAA6D;IAC7D,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,mEAAmE;IACnE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,gDAAgD;IAChD,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,4FAA4F;IAC5F,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,uFAAuF;IACvF,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gEAAgE;IAChE,MAAM,EAAE,8BAA8B,CAAC;IACvC,wEAAwE;IACxE,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-source-panel",
3
3
  "description": "Panel for displaying conversation sources — uploaded files and generated citations",
4
- "version": "1.3.0-dev.34",
4
+ "version": "1.3.0-dev.343",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,14 +17,14 @@
17
17
  }
18
18
  },
19
19
  "dependencies": {
20
- "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-attachment-input": "1.3.0-dev.34",
22
- "@epam/ai-dial-sidebar": "1.3.0-dev.34"
20
+ "@tabler/icons-react": "^3.50.0",
21
+ "@epam/ai-dial-attachment-input": "1.3.0-dev.343",
22
+ "@epam/ai-dial-sidebar": "1.3.0-dev.343"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "^19.2.8",
26
- "@epam/ai-dial-chat-shared": "1.3.0-dev.34",
27
- "@epam/ai-dial-ui-kit": "^0.15.3"
26
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.343",
27
+ "@epam/ai-dial-ui-kit": "^0.16.0"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",