@epam/ai-dial-attachment-input 1.0.0-dev.533 → 1.0.0-dev.535

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":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwNlD,CAAC"}
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA6NlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileDndOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FileDndOverlay/FileDndOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAa,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,uGAAuG;AACvG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAgElD,CAAC"}
1
+ {"version":3,"file":"FileDndOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FileDndOverlay/FileDndOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAa,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,uGAAuG;AACvG,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAsElD,CAAC"}
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, Highlight as n, MIME_TYPE_EXT_MAP as r, RequestStatus as i, buildCssVars as a, mergeClasses as o } from "@epam/ai-dial-chat-shared";
2
2
  import { useCallback as s, useEffect as c, useId as l, useMemo as u, useRef as d, useState as f } from "react";
3
- import { IconChevronUp as p, IconClipboard as m, IconDownload as h, IconExternalLink as g, IconFile as _, IconFileDescription as v, IconFileTypeBmp as y, IconFileTypeCss as b, IconFileTypeCsv as x, IconFileTypeDoc as S, IconFileTypeDocx as C, IconFileTypeHtml as w, IconFileTypeJpg as T, IconFileTypeJs as E, IconFileTypeJsx as D, IconFileTypePdf as O, IconFileTypePhp as k, IconFileTypePng as A, IconFileTypePpt as j, IconFileTypeRs as M, IconFileTypeSql as N, IconFileTypeSvg as P, IconFileTypeTs as F, IconFileTypeTsx as I, IconFileTypeTxt as L, IconFileTypeVue as R, IconFileTypeXls as z, IconFileTypeXml as B, IconFileTypeZip as V, IconFileX as ee, IconMusic as te, IconPaperclip as ne, IconPhoto as H, IconReload as re, IconTerminal2 as ie, IconVideo as ae, IconX as oe } from "@tabler/icons-react";
4
- import { DIAL_ICON_SIZE as U, DialGhostIconButton as se, DialSkeleton as ce, DialSkeletonVariant as le, ElementSize as ue } from "@epam/ai-dial-ui-kit";
5
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
3
+ import { IconChevronUp as p, IconClipboard as m, IconDownload as h, IconExternalLink as g, IconFile as _, IconFileDescription as v, IconFileTypeBmp as y, IconFileTypeCss as b, IconFileTypeCsv as x, IconFileTypeDoc as S, IconFileTypeDocx as C, IconFileTypeHtml as w, IconFileTypeJpg as T, IconFileTypeJs as E, IconFileTypeJsx as D, IconFileTypePdf as O, IconFileTypePhp as k, IconFileTypePng as A, IconFileTypePpt as j, IconFileTypeRs as M, IconFileTypeSql as N, IconFileTypeSvg as P, IconFileTypeTs as F, IconFileTypeTsx as I, IconFileTypeTxt as L, IconFileTypeVue as R, IconFileTypeXls as z, IconFileTypeXml as B, IconFileTypeZip as V, IconFileX as ee, IconMusic as te, IconPaperclip as H, IconPhoto as U, IconReload as ne, IconTerminal2 as re, IconVideo as ie, IconX as ae } from "@tabler/icons-react";
4
+ import { DIAL_ICON_SIZE as W, DialGhostIconButton as oe, DialSkeleton as se, DialSkeletonVariant as ce, ElementSize as le } from "@epam/ai-dial-ui-kit";
5
+ import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
6
6
  //#region src/constants/attachment-group.ts
7
- var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl border", J = /* @__PURE__ */ function(e) {
7
+ var ue = 5, de = 4, fe = "flex size-[84px] items-center justify-center rounded-xl border", J = /* @__PURE__ */ function(e) {
8
8
  return e.None = "none", e.AllVisible = "all-visible", e.Collapsed = "collapsed", e;
9
9
  }({}), pe = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, me = (e) => {
10
10
  let t = e.lastIndexOf(".");
@@ -36,9 +36,9 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
36
36
  case "image/png": return A;
37
37
  case "image/svg+xml": return P;
38
38
  case "image/bmp": return y;
39
- default: return H;
39
+ default: return U;
40
40
  }
41
- if (e.startsWith("video/")) return ae;
41
+ if (e.startsWith("video/")) return ie;
42
42
  if (e.startsWith("audio/")) return te;
43
43
  switch (e) {
44
44
  case "application/pdf": return O;
@@ -79,7 +79,7 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
79
79
  }
80
80
  }, ye = (e) => {
81
81
  let { type: n, contentType: r } = e;
82
- return n === t.Prompt ? ie : n === t.Pasted ? m : n === t.Image ? H : ve(r ?? "");
82
+ return n === t.Prompt ? re : n === t.Pasted ? m : n === t.Image ? U : ve(r ?? "");
83
83
  }, be = (e) => {
84
84
  let t = e.toLowerCase().split(";")[0].trim(), n = r[t];
85
85
  if (n) return n;
@@ -130,62 +130,62 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
130
130
  track: "_track_3x6ks_48",
131
131
  indeterminateFill: "_indeterminateFill_3x6ks_52",
132
132
  "attachment-tile-indeterminate": "_attachment-tile-indeterminate_3x6ks_1"
133
- }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s }) => /* @__PURE__ */ G(se, {
133
+ }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s }) => /* @__PURE__ */ K(oe, {
134
134
  icon: a,
135
- size: ue.Small,
135
+ size: le.Small,
136
136
  className: o("absolute end-1 top-1 h-6 w-6 rounded-lg", s ?? X.hoverIcon),
137
137
  "aria-label": e,
138
138
  "aria-describedby": t ? n : void 0,
139
139
  onClick: (e) => {
140
140
  e.stopPropagation(), r(i);
141
141
  }
142
- }), Ce = ({ ...e }) => /* @__PURE__ */ G(Z, {
143
- icon: /* @__PURE__ */ G(re, {
144
- size: U.SM,
142
+ }), Ce = ({ ...e }) => /* @__PURE__ */ K(Z, {
143
+ icon: /* @__PURE__ */ K(ne, {
144
+ size: W.SM,
145
145
  "aria-hidden": !0
146
146
  }),
147
147
  className: X.retryIcon,
148
148
  ...e
149
- }), we = ({ ...e }) => /* @__PURE__ */ G(Z, {
150
- icon: /* @__PURE__ */ G(h, {
151
- size: U.SM,
149
+ }), we = ({ ...e }) => /* @__PURE__ */ K(Z, {
150
+ icon: /* @__PURE__ */ K(h, {
151
+ size: W.SM,
152
152
  "aria-hidden": !0
153
153
  }),
154
154
  ...e
155
- }), Te = ({ ...e }) => /* @__PURE__ */ G(Z, {
156
- icon: /* @__PURE__ */ G(g, {
157
- size: U.SM,
155
+ }), Te = ({ ...e }) => /* @__PURE__ */ K(Z, {
156
+ icon: /* @__PURE__ */ K(g, {
157
+ size: W.SM,
158
158
  "aria-hidden": !0
159
159
  }),
160
160
  ...e
161
- }), Ee = ({ ...e }) => /* @__PURE__ */ G(Z, {
162
- icon: /* @__PURE__ */ G(oe, {
163
- size: U.SM,
161
+ }), Ee = ({ ...e }) => /* @__PURE__ */ K(Z, {
162
+ icon: /* @__PURE__ */ K(ae, {
163
+ size: W.SM,
164
164
  "aria-hidden": !0
165
165
  }),
166
166
  className: X.hoverIcon,
167
167
  ...e
168
168
  }), De = ({ attachment: e, searchQuery: t = "", onClick: r, labels: i, styles: a, cssVars: s }) => {
169
169
  let { clickLabel: c = "Open attachment" } = i ?? {}, { typography: l, className: u } = a ?? {};
170
- return /* @__PURE__ */ K("div", {
170
+ return /* @__PURE__ */ q("div", {
171
171
  style: s,
172
172
  className: o("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 rounded-xl border p-3", u),
173
- children: [/* @__PURE__ */ K("div", {
173
+ children: [/* @__PURE__ */ q("div", {
174
174
  className: "flex items-center justify-between gap-2",
175
- children: [/* @__PURE__ */ G("span", {
175
+ children: [/* @__PURE__ */ K("span", {
176
176
  title: e.name,
177
177
  className: o(l?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", X.nameText),
178
- children: t ? /* @__PURE__ */ G(n, {
178
+ children: t ? /* @__PURE__ */ K(n, {
179
179
  text: e.name,
180
180
  query: t,
181
181
  maxLines: 1
182
182
  }) : e.name
183
- }), r && /* @__PURE__ */ G(we, {
183
+ }), r && /* @__PURE__ */ K(we, {
184
184
  ariaLabel: c,
185
185
  onClick: r,
186
186
  id: e.id
187
187
  })]
188
- }), e.playUrl && /* @__PURE__ */ G("audio", {
188
+ }), e.playUrl && /* @__PURE__ */ K("audio", {
189
189
  controls: !0,
190
190
  src: e.playUrl,
191
191
  "aria-label": e.name,
@@ -201,58 +201,58 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
201
201
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.(t.id));
202
202
  }, V = u(() => f ? O : me(O), [f, O]), ee = s(() => {
203
203
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
204
- }, [t]), te = o(q, "group relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, !M && X.tileLight, M && X.tileError), ne = /* @__PURE__ */ G("div", {
204
+ }, [t]), te = o(fe, "group relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, !M && X.tileLight, M && X.tileError), H = /* @__PURE__ */ K("div", {
205
205
  title: V,
206
206
  className: o(w, "line-clamp-2 min-w-0 break-all", X.nameText, !M && z),
207
207
  children: V
208
- }), H = F && /* @__PURE__ */ K("div", {
209
- className: o("flex items-center gap-1 overflow-hidden", M && z),
210
- children: [/* @__PURE__ */ G(F, {
208
+ }), U = F && /* @__PURE__ */ q("div", {
209
+ className: o("flex w-full items-center gap-1", M && z),
210
+ children: [/* @__PURE__ */ K(F, {
211
211
  size: 16,
212
212
  className: X.typeText,
213
213
  "aria-hidden": !0
214
- }), /* @__PURE__ */ G("span", {
215
- className: o(T, "truncate", X.typeText),
214
+ }), /* @__PURE__ */ K("span", {
215
+ className: o(T, "min-w-0 flex-1 truncate", X.typeText),
216
216
  children: b ? `${I} · ${b}` : I
217
217
  })]
218
- }), re = () => {
218
+ }), ne = () => {
219
219
  g && h ? h(D) : n && n(D);
220
- }, ie = /* @__PURE__ */ K(W, { children: [
221
- M ? /* @__PURE__ */ K(W, { children: [H, ne] }) : /* @__PURE__ */ K(W, { children: [ne, H] }),
222
- j && /* @__PURE__ */ G("div", {
220
+ }, re = /* @__PURE__ */ q(G, { children: [
221
+ M ? /* @__PURE__ */ q(G, { children: [U, H] }) : /* @__PURE__ */ q(G, { children: [H, U] }),
222
+ j && /* @__PURE__ */ K("div", {
223
223
  role: "progressbar",
224
224
  "aria-label": x,
225
225
  className: o("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", X.track),
226
- children: /* @__PURE__ */ G("div", { className: o("h-full w-1/3 rounded-full", X.indeterminateFill) })
226
+ children: /* @__PURE__ */ K("div", { className: o("h-full w-1/3 rounded-full", X.indeterminateFill) })
227
227
  }),
228
- L && /* @__PURE__ */ G(we, {
228
+ L && /* @__PURE__ */ K(we, {
229
229
  ariaLabel: v,
230
230
  errorTitle: P,
231
231
  errorDescId: N,
232
232
  onClick: d,
233
233
  id: D
234
234
  }),
235
- R && /* @__PURE__ */ G(Ce, {
235
+ R && /* @__PURE__ */ K(Ce, {
236
236
  ariaLabel: y,
237
237
  errorTitle: P,
238
238
  errorDescId: N,
239
239
  onClick: r,
240
240
  id: D
241
241
  }),
242
- p && /* @__PURE__ */ G(Te, {
242
+ p && /* @__PURE__ */ K(Te, {
243
243
  ariaLabel: y,
244
244
  errorTitle: P,
245
245
  errorDescId: N,
246
246
  onClick: ee
247
247
  }),
248
- _ && /* @__PURE__ */ G(Ee, {
248
+ _ && /* @__PURE__ */ K(Ee, {
249
249
  ariaLabel: y,
250
250
  errorTitle: P,
251
251
  errorDescId: N,
252
252
  onClick: _,
253
253
  id: D
254
254
  }),
255
- M && /* @__PURE__ */ G("span", {
255
+ M && /* @__PURE__ */ K("span", {
256
256
  id: N,
257
257
  role: "status",
258
258
  "aria-live": "polite",
@@ -260,18 +260,18 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
260
260
  children: P
261
261
  })
262
262
  ] });
263
- return /* @__PURE__ */ G("div", {
263
+ return /* @__PURE__ */ K("div", {
264
264
  style: m,
265
265
  className: o("inline-flex", E),
266
- children: /* @__PURE__ */ G("div", {
266
+ children: /* @__PURE__ */ K("div", {
267
267
  role: "button",
268
268
  tabIndex: 0,
269
269
  "aria-label": v,
270
- onClick: re,
270
+ onClick: ne,
271
271
  onKeyDown: B,
272
272
  style: m,
273
273
  className: o(te, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
274
- children: ie
274
+ children: re
275
275
  })
276
276
  });
277
277
  }, Q = /* @__PURE__ */ function(e) {
@@ -298,8 +298,8 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
298
298
  }), T = () => {
299
299
  v && n ? n(h) : S && r && r(h);
300
300
  };
301
- return /* @__PURE__ */ G("div", {
302
- className: o(q, S && "cursor-pointer", X.tile, m),
301
+ return /* @__PURE__ */ K("div", {
302
+ className: o(fe, S && "cursor-pointer", X.tile, m),
303
303
  onClick: T,
304
304
  onKeyDown: (e) => {
305
305
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T());
@@ -308,30 +308,30 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
308
308
  role: "button",
309
309
  style: s,
310
310
  "aria-label": S ? d : v ? f : void 0,
311
- children: /* @__PURE__ */ K("div", {
311
+ children: /* @__PURE__ */ q("div", {
312
312
  className: "relative h-full w-full overflow-hidden",
313
313
  children: [
314
- a && /* @__PURE__ */ G(Ee, {
314
+ a && /* @__PURE__ */ K(Ee, {
315
315
  onClick: a,
316
316
  id: h
317
317
  }),
318
- c && /* @__PURE__ */ G(we, {
318
+ c && /* @__PURE__ */ K(we, {
319
319
  onClick: c,
320
320
  id: h
321
321
  }),
322
- w !== Q.Loaded && /* @__PURE__ */ G(ce, {
323
- variant: le.Rectangular,
322
+ w !== Q.Loaded && /* @__PURE__ */ K(se, {
323
+ variant: ce.Rectangular,
324
324
  width: "100%",
325
325
  height: "100%",
326
326
  active: w === Q.Loading,
327
- overlay: /* @__PURE__ */ G(H, {
328
- size: U.LG,
327
+ overlay: /* @__PURE__ */ K(U, {
328
+ size: W.LG,
329
329
  className: p?.placeholderIconClassName ?? "text-secondary",
330
330
  "aria-hidden": !0
331
331
  }),
332
332
  className: "absolute inset-0 rounded-xl"
333
333
  }),
334
- /* @__PURE__ */ G("img", {
334
+ /* @__PURE__ */ K("img", {
335
335
  ref: C,
336
336
  src: _,
337
337
  alt: g,
@@ -358,14 +358,14 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
358
358
  "--ci-tile-track-bg": f?.trackBackground,
359
359
  "--ci-tile-fill-bg": f?.fillBackground
360
360
  }), { isImage: g, isAudio: _, isLink: v } = u(() => Y(e), [e]);
361
- return _ ? /* @__PURE__ */ G(De, {
361
+ return _ ? /* @__PURE__ */ K(De, {
362
362
  attachment: e,
363
363
  labels: l,
364
364
  onClick: s,
365
365
  searchQuery: n,
366
366
  styles: d,
367
367
  cssVars: h
368
- }) : g ? /* @__PURE__ */ G(je, {
368
+ }) : g ? /* @__PURE__ */ K(je, {
369
369
  attachment: e,
370
370
  labels: l,
371
371
  onClick: s,
@@ -374,7 +374,7 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
374
374
  onRemove: r,
375
375
  cssVars: h,
376
376
  onDownload: c
377
- }) : /* @__PURE__ */ G(ke, {
377
+ }) : /* @__PURE__ */ K(ke, {
378
378
  attachment: e,
379
379
  onClick: s,
380
380
  onRetry: i,
@@ -390,13 +390,13 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
390
390
  });
391
391
  }, Ne = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: a, styles: s }) => {
392
392
  let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d } = a ?? {}, { className: f } = s ?? {};
393
- return e.length === 0 ? null : /* @__PURE__ */ G("div", {
393
+ return e.length === 0 ? null : /* @__PURE__ */ K("div", {
394
394
  role: "list",
395
395
  "aria-label": c,
396
396
  className: o("flex w-full min-w-0 gap-2 overflow-x-auto", f),
397
- children: e.map((e) => /* @__PURE__ */ G("div", {
397
+ children: e.map((e) => /* @__PURE__ */ K("div", {
398
398
  role: "listitem",
399
- children: /* @__PURE__ */ G(Me, {
399
+ children: /* @__PURE__ */ K(Me, {
400
400
  attachment: e,
401
401
  onRemove: t,
402
402
  onRetry: n,
@@ -420,13 +420,13 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
420
420
  "--ci-more-tile-border-hover": u?.borderHover,
421
421
  "--ci-more-tile-focus-outline": u?.focusOutline
422
422
  });
423
- return /* @__PURE__ */ G("button", {
423
+ return /* @__PURE__ */ K("button", {
424
424
  type: "button",
425
425
  onClick: t,
426
426
  "aria-label": s ?? `Show ${e} more attachments`,
427
427
  style: d,
428
- className: o(q, c, Pe.tile, l),
429
- children: r ?? /* @__PURE__ */ G("bdi", {
428
+ className: o(fe, c, Pe.tile, l),
429
+ children: r ?? /* @__PURE__ */ K("bdi", {
430
430
  dir: "ltr",
431
431
  children: `+${e}`
432
432
  })
@@ -444,33 +444,33 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
444
444
  "--ci-group-text": E?.text
445
445
  }), [k, A] = f(!1), j = u(() => Se(e.length, k), [e.length, k]);
446
446
  if (e.length === 0) return null;
447
- let M = e.some((e) => e.type === t.Image), N = e.some((e) => e.type !== t.Image), P = M && N, F = e.length >= 5, I = P ? ne : M ? H : _, L = x(e.length), R = e.slice(0, j.visibleCount), z = () => {
447
+ let M = e.some((e) => e.type === t.Image), N = e.some((e) => e.type !== t.Image), P = M && N, F = e.length >= 5, I = P ? H : M ? U : _, L = x(e.length), R = e.slice(0, j.visibleCount), z = () => {
448
448
  let t = e.filter((e) => e.status === i.Idle);
449
449
  r ? r(t) : t.forEach((e) => n?.(e.id));
450
450
  }, B = (t) => {
451
451
  let n = e.find((e) => e.id === t);
452
452
  n && r?.([n]);
453
453
  };
454
- return /* @__PURE__ */ K("div", {
454
+ return /* @__PURE__ */ q("div", {
455
455
  role: "group",
456
456
  "aria-label": d,
457
457
  style: O,
458
458
  className: o("rounded-2xl border p-3", F ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", $.container, D),
459
- children: [/* @__PURE__ */ K("div", {
459
+ children: [/* @__PURE__ */ q("div", {
460
460
  className: "mb-3 flex min-h-6 items-center gap-2",
461
461
  children: [
462
- /* @__PURE__ */ G(I, {
463
- size: U.SM,
462
+ /* @__PURE__ */ K(I, {
463
+ size: W.SM,
464
464
  className: o("shrink-0", $.headerIcon),
465
465
  "aria-hidden": !0
466
466
  }),
467
- /* @__PURE__ */ G("span", {
467
+ /* @__PURE__ */ K("span", {
468
468
  className: o(T, $.headerLabel),
469
469
  children: L
470
470
  }),
471
- e.length >= 2 && (r || n) && /* @__PURE__ */ G(se, {
472
- icon: /* @__PURE__ */ G(h, {
473
- size: U.SM,
471
+ e.length >= 2 && (r || n) && /* @__PURE__ */ K(oe, {
472
+ icon: /* @__PURE__ */ K(h, {
473
+ size: W.SM,
474
474
  "aria-hidden": !0
475
475
  }),
476
476
  className: o("ms-auto h-6 w-6 rounded-lg", $.downloadAllButton),
@@ -478,14 +478,14 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
478
478
  onClick: z
479
479
  })
480
480
  ]
481
- }), /* @__PURE__ */ K("div", {
481
+ }), /* @__PURE__ */ q("div", {
482
482
  role: "list",
483
483
  "aria-label": L,
484
484
  className: o("gap-3", F ? "grid grid-cols-[repeat(5,83px)] overflow-x-auto" : "flex flex-wrap"),
485
485
  children: [
486
- R.map((e) => /* @__PURE__ */ G("div", {
486
+ R.map((e) => /* @__PURE__ */ K("div", {
487
487
  role: "listitem",
488
- children: /* @__PURE__ */ G(Me, {
488
+ children: /* @__PURE__ */ K(Me, {
489
489
  attachment: e,
490
490
  onClick: n,
491
491
  onDownload: B,
@@ -500,21 +500,21 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
500
500
  }
501
501
  })
502
502
  }, e.id)),
503
- j.layout === J.Collapsed && /* @__PURE__ */ G("div", {
503
+ j.layout === J.Collapsed && /* @__PURE__ */ K("div", {
504
504
  role: "listitem",
505
- children: /* @__PURE__ */ G(Fe, {
505
+ children: /* @__PURE__ */ K(Fe, {
506
506
  count: j.hiddenCount,
507
507
  onClick: () => A(!0)
508
508
  })
509
509
  }),
510
- F && k && /* @__PURE__ */ G("div", {
510
+ F && k && /* @__PURE__ */ K("div", {
511
511
  role: "listitem",
512
- children: /* @__PURE__ */ G(Fe, {
512
+ children: /* @__PURE__ */ K(Fe, {
513
513
  count: 0,
514
514
  onClick: () => A(!1),
515
515
  labels: { ariaLabel: v },
516
- children: /* @__PURE__ */ G(p, {
517
- size: U.MD,
516
+ children: /* @__PURE__ */ K(p, {
517
+ size: W.MD,
518
518
  "aria-hidden": !0
519
519
  })
520
520
  })
@@ -527,37 +527,37 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
527
527
  icon: "_icon_wr7ez_5",
528
528
  deniedIcon: "_deniedIcon_wr7ez_9"
529
529
  }, ze = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
530
- let { title: i, subtitle: s } = n ?? {}, { colors: c, typography: l } = r ?? {}, { titleClassName: u = "heading-3 font-semibold", subtitleClassName: d = "dial-small-text" } = l ?? {};
530
+ let { title: i, subtitle: s } = n ?? {}, { colors: c, typography: l } = r ?? {};
531
531
  if (!e) return null;
532
- let f = a({
532
+ let u = a({
533
533
  "--fd-bg": c?.background,
534
534
  "--fd-icon": c?.icon,
535
535
  "--fd-denied-icon": c?.deniedIcon
536
- }), p = i ?? (t ? "Attach files" : "No attachments allowed"), m = s ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), h = t ? Re.icon : Re.deniedIcon, g = (e) => {
536
+ }), d = i ?? (t ? "Attach files" : "No attachments allowed"), f = s ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), p = t ? Re.icon : Re.deniedIcon, m = (e) => {
537
537
  e.preventDefault();
538
- }, _ = t ? v : ee;
539
- return /* @__PURE__ */ G("div", {
538
+ }, h = t ? v : ee;
539
+ return /* @__PURE__ */ K("div", {
540
540
  role: "status",
541
541
  "aria-live": "polite",
542
542
  className: o("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", Re.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
543
- onDragOver: t ? void 0 : g,
544
- onDrop: t ? void 0 : g,
545
- style: f,
546
- children: /* @__PURE__ */ K("div", {
543
+ onDragOver: t ? void 0 : m,
544
+ onDrop: t ? void 0 : m,
545
+ style: u,
546
+ children: /* @__PURE__ */ q("div", {
547
547
  className: "flex flex-col items-center text-center",
548
548
  children: [
549
- /* @__PURE__ */ G(_, {
549
+ /* @__PURE__ */ K(h, {
550
550
  size: 100,
551
- className: h,
551
+ className: p,
552
552
  "aria-hidden": !0
553
553
  }),
554
- /* @__PURE__ */ G("span", {
555
- className: o("mt-5", u),
556
- children: p
554
+ /* @__PURE__ */ K("span", {
555
+ className: o("mt-5", l?.titleClassName ?? "dial-h3-text"),
556
+ children: d
557
557
  }),
558
- /* @__PURE__ */ G("span", {
559
- className: o("mt-4", d),
560
- children: m
558
+ /* @__PURE__ */ K("span", {
559
+ className: o("mt-4", l?.subtitleClassName ?? "dial-small-text"),
560
+ children: f
561
561
  })
562
562
  ]
563
563
  })
@@ -606,4 +606,4 @@ var de = 5, fe = 4, q = "flex size-[84px] items-center justify-center rounded-xl
606
606
  ]) };
607
607
  }, Ve = 100;
608
608
  //#endregion
609
- export { fe as ATTACHMENT_COLLAPSED_VISIBLE_COUNT, de as ATTACHMENT_COLLAPSE_THRESHOLD, Me as AttachmentCard, Le as AttachmentGroup, Fe as AttachmentMoreTile, J as AttachmentTilesLayout, Ne as AttachmentTray, ze as FileDndOverlay, Q as LazyImageLoadStatus, Ve as MAX_UPLOADS_PER_MINUTE, pe as generateAttachmentId, Y as getAttachmentCardState, ve as getAttachmentIcon, Se as getAttachmentTilesPlan, be as getExtFromContentType, me as getNameWithoutExtension, _e as isMimeTypeAllowed, ge as mimeTypesToExtensionLabels, Be as useClipboardPaste, Ae as useLazyImageLoad };
609
+ export { de as ATTACHMENT_COLLAPSED_VISIBLE_COUNT, ue as ATTACHMENT_COLLAPSE_THRESHOLD, Me as AttachmentCard, Le as AttachmentGroup, Fe as AttachmentMoreTile, J as AttachmentTilesLayout, Ne as AttachmentTray, ze as FileDndOverlay, Q as LazyImageLoadStatus, Ve as MAX_UPLOADS_PER_MINUTE, pe as generateAttachmentId, Y as getAttachmentCardState, ve as getAttachmentIcon, Se as getAttachmentTilesPlan, be as getExtFromContentType, me as getNameWithoutExtension, _e as isMimeTypeAllowed, ge as mimeTypesToExtensionLabels, Be as useClipboardPaste, Ae as useLazyImageLoad };
@@ -9,7 +9,7 @@ export interface FileDndOverlayColors {
9
9
  }
10
10
  /** Typography overrides for the `FileDndOverlay` component. */
11
11
  export interface FileDndOverlayTypography {
12
- /** CSS class applied to the title. Defaults to `'heading-3 font-semibold'`. */
12
+ /** CSS class applied to the title. Defaults to `'dial-h3-text'`. */
13
13
  titleClassName?: string;
14
14
  /** CSS class applied to the subtitle. Defaults to `'dial-small-text'`. */
15
15
  subtitleClassName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"file-dnd-overlay.d.ts","sourceRoot":"","sources":["../../src/models/file-dnd-overlay.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,wBAAwB,CAAC;CACvC;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,2IAA2I;IAC3I,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2LAA2L;IAC3L,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
1
+ {"version":3,"file":"file-dnd-overlay.d.ts","sourceRoot":"","sources":["../../src/models/file-dnd-overlay.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,wBAAwB,CAAC;CACvC;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,2IAA2I;IAC3I,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2LAA2L;IAC3L,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-attachment-input",
3
3
  "description": "File attachment input components with upload validation, drag-and-drop, and progress tracking",
4
- "version": "1.0.0-dev.533",
4
+ "version": "1.0.0-dev.535",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,8 +17,8 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.0.0-dev.533",
21
- "@epam/ai-dial-ui-kit": "0.12.0-dev.28",
20
+ "@epam/ai-dial-chat-shared": "1.0.0-dev.535",
21
+ "@epam/ai-dial-ui-kit": "0.12.0-dev.36",
22
22
  "@tabler/icons-react": "^3.44.0",
23
23
  "react": "^19.0.0"
24
24
  },