@epam/ai-dial-attachment-input 1.2.0-dev.48 → 1.2.0-dev.58

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":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Actions.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAG5D,UAAU,WAAW;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AA+BD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CActD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAatD,CAAC"}
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Actions.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAI5D,UAAU,WAAW;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAgCD,uCAAuC;AACvC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CActD,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAaxD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAatD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAkPlD,CAAC"}
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,EAAE,EAKR,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAmB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAsPlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAM5E,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAKzC,UAAU,oBAAoB;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAkIpD,CAAC"}
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAO5E,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAKzC,UAAU,oBAAoB;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uHAAuH;IACvH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAoIpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentTray.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentTray/AttachmentTray.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,gHAAgH;AAChH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA2ClD,CAAC"}
1
+ {"version":3,"file":"AttachmentTray.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentTray/AttachmentTray.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,gHAAgH;AAChH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAgDlD,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const ATTACHMENT_INPUT_CLASS: {
2
+ /** The tray's `role="list"` root. */
3
+ readonly tray: "dial-ai-attachment-tray";
4
+ /** Each `role="listitem"` wrapper inside the tray. */
5
+ readonly trayItem: "dial-ai-attachment-tray-item";
6
+ /** The square tile element, for both image and non-previewable attachments. */
7
+ readonly tile: "dial-ai-attachment-tile";
8
+ /** The tile when selected, additive to `tile`. */
9
+ readonly tileSelected: "dial-ai-attachment-tile-selected";
10
+ /** The tile's filename element. */
11
+ readonly tileName: "dial-ai-attachment-tile-name";
12
+ /** The tile's type and size row. */
13
+ readonly tileType: "dial-ai-attachment-tile-type";
14
+ /** Every corner action button: download, retry, open-link, remove. */
15
+ readonly tileAction: "dial-ai-attachment-tile-action";
16
+ };
17
+ //# sourceMappingURL=public-class-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,sBAAsB;IACjC,qCAAqC;;IAErC,sDAAsD;;IAEtD,+EAA+E;;IAE/E,kDAAkD;;IAElD,mCAAmC;;IAEnC,oCAAoC;;IAEpC,sEAAsE;;CAE9D,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._tile_1whwz_1{background:var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--ai-tile-border,var(--stroke-secondary,#d1dbea))}._tile_1whwz_1._hovered_1whwz_5:hover{background:var(--ai-tile-bg-hover,var(--bg-control-neutral-hover-muted,#e0e6f0));border-color:var(--ai-tile-border-hover,var(--ai-tile-border,var(--stroke-secondary,#d1dbea)))}._tile_1whwz_1:focus-visible{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus-black,#161b2d))}._selected_1whwz_15{background:var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f));border-color:var(--ai-tile-border-selected,var(--stroke-accent-alpha,#2764d933))}._tileError_1whwz_20{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_1whwz_25{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_1whwz_29{color:var(--ai-tile-type-text,var(--text-secondary,#57647a))}._retryIcon_1whwz_33{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_1whwz_37{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._actionButton_1whwz_43{background:var(--ai-tile-hover-icon-bg,var(--bg-control-neutral-hover-muted,#e0e6f0))}._imageActionButton_1whwz_47{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#57647a))}._headerIcon_1dmgi_1,._headerLabel_1dmgi_2{color:var(--ai-group-text,var(--text-secondary,#57647a))}._overlay_mzpdp_1{background:var(--ai-fd-bg,var(--bg-backdrop,#161b2d4d))}._icon_mzpdp_5{color:var(--ai-fd-icon,var(--text-accent,#1d4ed8))}._deniedIcon_mzpdp_9{color:var(--ai-fd-denied-icon,var(--text-error,#ae2f2f))}
1
+ ._tile_s2es2_12{box-sizing:border-box;background:var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc));border-style:solid;border-color:var(--ai-tile-border,var(--stroke-secondary,#d1dbea))}._tile_s2es2_12._hovered_s2es2_18:hover{background:var(--ai-tile-bg-hover,var(--bg-control-neutral-hover-muted,#e0e6f0));border-color:var(--ai-tile-border-hover,var(--ai-tile-border,var(--stroke-secondary,#d1dbea)))}._tile_s2es2_12:focus-visible{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus-black,#161b2d))}._selected_s2es2_28{background:var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f));border-color:var(--ai-tile-border-selected,var(--stroke-accent-alpha,#2764d933))}._tileError_s2es2_33{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_s2es2_38{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_s2es2_42{color:var(--ai-tile-type-text,var(--text-secondary,#57647a))}._retryIcon_s2es2_46{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_s2es2_50{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._actionButton_s2es2_56{background:var(--ai-tile-hover-icon-bg,var(--bg-control-neutral-hover-muted,#e0e6f0))}._imageActionButton_s2es2_60{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#57647a))}._headerIcon_1dmgi_1,._headerLabel_1dmgi_2{color:var(--ai-group-text,var(--text-secondary,#57647a))}._overlay_mzpdp_1{background:var(--ai-fd-bg,var(--bg-backdrop,#161b2d4d))}._icon_mzpdp_5{color:var(--ai-fd-icon,var(--text-accent,#1d4ed8))}._deniedIcon_mzpdp_9{color:var(--ai-fd-denied-icon,var(--text-error,#ae2f2f))}
2
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}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.end-1{inset-inline-end:.25rem}.start-\[-1px\]{inset-inline-start:-1px}.top-1{top:.25rem}.top-\[-1px\]{top:-1px}.z-10{z-index:10}.z-\[9999\]{z-index:9999}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.line-clamp-2{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.size-\[84px\]{height:84px;width:84px}.size-full{width:100%}.h-full,.size-full{height:100%}.w-full{width:100%}.min-w-0{min-width:0}.max-w-\[420px\]{max-width:420px}.max-w-\[492px\]{max-width:492px}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(5\2c 83px\)\]{grid-template-columns:repeat(5,83px)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.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-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:4px}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.pe-11{padding-inline-end:2.75rem}.pe-5{padding-inline-end:1.25rem}.text-center{text-align:center}.opacity-0{opacity:0}.opacity-100{opacity:1}.outline{outline-style:solid;outline-width:1px}.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)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.focus-within\:outline:focus-within{outline-style:solid;outline-width:1px}.focus-within\:outline-1:focus-within{outline-width:1px}.focus-within\:outline-offset-1:focus-within{outline-offset:1px}.focus-visible\:opacity-100:focus-visible{opacity:1}.group\/attachment-tile:focus-within .group-focus-within\/attachment-tile\:opacity-100{opacity:1}.group\/attachment-tile:hover .group-hover\/attachment-tile\:opacity-100{opacity:1}
package/index.d.ts CHANGED
@@ -11,5 +11,6 @@ export { useClipboardPaste, type UseClipboardPasteLabels, } from './hooks/useCli
11
11
  export { useLazyImageLoad, LazyImageLoadStatus, } from './hooks/useLazyImageLoad';
12
12
  export { generateAttachmentId, getAttachmentCardState, getExtFromContentType, getAttachmentIcon, getNameWithoutExtension, mimeTypesToExtensionLabels, isMimeTypeAllowed, } from './utils/attachment';
13
13
  export { ATTACHMENT_COLLAPSE_THRESHOLD } from './constants/attachment-group';
14
+ export { ATTACHMENT_INPUT_CLASS } from './constants/public-class-names';
14
15
  export { MAX_UPLOADS_PER_MINUTE } from './constants/upload';
15
16
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, RequestStatus as r, buildCssVars as i, mergeClasses as a } from "@epam/ai-dial-chat-shared";
2
2
  import { useCallback as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { IconClipboard as f, IconDownload as p, IconExternalLink as m, IconFile as h, IconFileDescription as g, IconFileTypeBmp as _, IconFileTypeCss as v, IconFileTypeCsv as y, IconFileTypeDoc as b, IconFileTypeDocx as x, IconFileTypeHtml as S, IconFileTypeJpg as C, IconFileTypeJs as w, IconFileTypeJsx as T, IconFileTypePdf as E, IconFileTypePhp as D, IconFileTypePng as O, IconFileTypePpt as k, IconFileTypeRs as A, IconFileTypeSql as j, IconFileTypeSvg as M, IconFileTypeTs as N, IconFileTypeTsx as P, IconFileTypeTxt as F, IconFileTypeVue as I, IconFileTypeXls as L, IconFileTypeXml as R, IconFileTypeZip as ee, IconFileX as te, IconMusic as z, IconPaperclip as B, IconPhoto as V, IconReload as ne, IconTerminal2 as H, IconVideo as re, IconX as ie } from "@tabler/icons-react";
3
+ import { IconClipboard as f, IconDownload as p, IconExternalLink as m, IconFile as h, IconFileDescription as g, IconFileTypeBmp as _, IconFileTypeCss as v, IconFileTypeCsv as y, IconFileTypeDoc as b, IconFileTypeDocx as x, IconFileTypeHtml as S, IconFileTypeJpg as C, IconFileTypeJs as w, IconFileTypeJsx as T, IconFileTypePdf as E, IconFileTypePhp as D, IconFileTypePng as O, IconFileTypePpt as k, IconFileTypeRs as A, IconFileTypeSql as j, IconFileTypeSvg as M, IconFileTypeTs as N, IconFileTypeTsx as P, IconFileTypeTxt as F, IconFileTypeVue as I, IconFileTypeXls as L, IconFileTypeXml as ee, IconFileTypeZip as R, IconFileX as te, IconMusic as z, IconPaperclip as B, IconPhoto as V, IconReload as ne, IconTerminal2 as H, IconVideo as re, IconX as ie } from "@tabler/icons-react";
4
4
  import { DIAL_ICON_SIZE as U, DIAL_KIT_ICON_STROKE as W, ElementSize as ae, GhostIconButton as oe, Highlight as se, Skeleton as ce, SkeletonVariant as le, Spinner as ue, StaticIconButton as de } from "@epam/ai-dial-ui-kit";
5
5
  import { Fragment as fe, jsx as G, jsxs as K } from "react/jsx-runtime";
6
6
  //#region src/utils/attachment.ts
@@ -59,13 +59,13 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
59
59
  case "application/x-rar-compressed":
60
60
  case "application/x-7z-compressed":
61
61
  case "application/gzip":
62
- case "application/x-tar": return ee;
62
+ case "application/x-tar": return R;
63
63
  case "text/csv": return y;
64
64
  case "text/plain": return F;
65
65
  case "text/html":
66
66
  case "application/xhtml+xml": return S;
67
67
  case "text/xml":
68
- case "application/xml": return R;
68
+ case "application/xml": return ee;
69
69
  case "application/sql":
70
70
  case "text/x-sql": return j;
71
71
  case "text/javascript":
@@ -113,48 +113,56 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
113
113
  typeLabel: d ? null : xe(e, n)
114
114
  };
115
115
  }, Se = 5, Ce = "flex size-[84px] items-center justify-center rounded-xl border", Y = {
116
- tile: "_tile_1whwz_1",
117
- hovered: "_hovered_1whwz_5",
118
- selected: "_selected_1whwz_15",
119
- tileError: "_tileError_1whwz_20",
120
- nameText: "_nameText_1whwz_25",
121
- typeText: "_typeText_1whwz_29",
122
- retryIcon: "_retryIcon_1whwz_33",
123
- track: "_track_1whwz_37",
124
- actionButton: "_actionButton_1whwz_43",
125
- imageActionButton: "_imageActionButton_1whwz_47"
126
- }, X = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: o, className: s }) => /* @__PURE__ */ G(de, {
116
+ tray: "dial-ai-attachment-tray",
117
+ trayItem: "dial-ai-attachment-tray-item",
118
+ tile: "dial-ai-attachment-tile",
119
+ tileSelected: "dial-ai-attachment-tile-selected",
120
+ tileName: "dial-ai-attachment-tile-name",
121
+ tileType: "dial-ai-attachment-tile-type",
122
+ tileAction: "dial-ai-attachment-tile-action"
123
+ }, X = {
124
+ tile: "_tile_s2es2_12",
125
+ hovered: "_hovered_s2es2_18",
126
+ selected: "_selected_s2es2_28",
127
+ tileError: "_tileError_s2es2_33",
128
+ nameText: "_nameText_s2es2_38",
129
+ typeText: "_typeText_s2es2_42",
130
+ retryIcon: "_retryIcon_s2es2_46",
131
+ track: "_track_s2es2_50",
132
+ actionButton: "_actionButton_s2es2_56",
133
+ imageActionButton: "_imageActionButton_s2es2_60"
134
+ }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: o, className: s }) => /* @__PURE__ */ G(de, {
127
135
  icon: o,
128
136
  size: ae.Small,
129
- className: a("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", Y.actionButton, s),
137
+ className: a("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", X.actionButton, s, Y.tileAction),
130
138
  "aria-label": e,
131
139
  "aria-describedby": t ? n : void 0,
132
140
  onClick: (e) => {
133
141
  e.stopPropagation(), r(i);
134
142
  }
135
- }), we = ({ ...e }) => /* @__PURE__ */ G(X, {
143
+ }), we = ({ ...e }) => /* @__PURE__ */ G(Z, {
136
144
  icon: /* @__PURE__ */ G(ne, {
137
145
  size: U.SM,
138
146
  "aria-hidden": !0,
139
147
  stroke: W
140
148
  }),
141
- className: Y.retryIcon,
149
+ className: X.retryIcon,
142
150
  ...e
143
- }), Te = ({ ...e }) => /* @__PURE__ */ G(X, {
151
+ }), Te = ({ ...e }) => /* @__PURE__ */ G(Z, {
144
152
  icon: /* @__PURE__ */ G(p, {
145
153
  size: U.SM,
146
154
  "aria-hidden": !0,
147
155
  stroke: W
148
156
  }),
149
157
  ...e
150
- }), Ee = ({ ...e }) => /* @__PURE__ */ G(X, {
158
+ }), Ee = ({ ...e }) => /* @__PURE__ */ G(Z, {
151
159
  icon: /* @__PURE__ */ G(m, {
152
160
  size: U.SM,
153
161
  "aria-hidden": !0,
154
162
  stroke: W
155
163
  }),
156
164
  ...e
157
- }), De = ({ ...e }) => /* @__PURE__ */ G(X, {
165
+ }), De = ({ ...e }) => /* @__PURE__ */ G(Z, {
158
166
  icon: /* @__PURE__ */ G(ie, {
159
167
  size: U.SM,
160
168
  "aria-hidden": !0,
@@ -165,27 +173,27 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
165
173
  [e.Network]: "Upload failed · network error",
166
174
  [e.UnsupportedType]: "Upload failed · unsupported file type"
167
175
  }, ke = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: s, labels: u, styles: d, onDownload: f, isPasted: p, isLink: m, cssVars: h, onExpand: g, isExpandable: _, onRemove: v, isSelected: y }) => {
168
- let { clickLabel: b = "Download attachment", retryLabel: x = "Retry upload", removeLabel: S = "Remove attachment", openInNewTabLabel: C = "Open in new tab", sizeLabel: w, uploadingLabel: T = "Uploading", errorReasonLabels: E, genericErrorLabel: D = "Upload failed" } = u ?? {}, { typography: O, className: k } = d ?? {}, { id: A, name: j, status: M, errorReason: N } = t, P = M === r.Loading, F = M === r.Error, I = c(), L = F ? N && (E?.[N] ?? Oe[N]) || D : "", { BottomIcon: R, typeLabel: ee } = J(t), te = !F && !P && f && !m, z = F && !!s && N !== e.UnsupportedType, B = Number(!!te) + Number(!!z) + Number(!!m) + Number(!!v), V = B > 1 ? "pe-11" : B === 1 ? "pe-5" : void 0, ne = (e) => {
176
+ let { clickLabel: b = "Download attachment", retryLabel: x = "Retry upload", removeLabel: S = "Remove attachment", openInNewTabLabel: C = "Open in new tab", sizeLabel: w, uploadingLabel: T = "Uploading", errorReasonLabels: E, genericErrorLabel: D = "Upload failed" } = u ?? {}, { typography: O, className: k } = d ?? {}, { id: A, name: j, status: M, errorReason: N } = t, P = M === r.Loading, F = M === r.Error, I = c(), L = F ? N && (E?.[N] ?? Oe[N]) || D : "", { BottomIcon: ee, typeLabel: R } = J(t), te = !F && !P && f && !m, z = F && !!s && N !== e.UnsupportedType, B = Number(!!te) + Number(!!z) + Number(!!m) + Number(!!v), V = B > 1 ? "pe-11" : B === 1 ? "pe-5" : void 0, ne = (e) => {
169
177
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), i?.(t.id));
170
178
  }, H = l(() => p ? j : pe(j), [p, j]), re = o(() => {
171
179
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
172
- }, [t]), ie = a(Ce, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Y.tile, !F && Y.hovered, y && Y.selected, F && Y.tileError), U = /* @__PURE__ */ G("div", {
180
+ }, [t]), ie = a(Ce, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, !F && X.hovered, y && X.selected, F && X.tileError, Y.tile, y && Y.tileSelected), U = /* @__PURE__ */ G("div", {
173
181
  title: H,
174
- className: a(O?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", Y.nameText, !F && V),
182
+ className: a(O?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", X.nameText, !F && V, Y.tileName),
175
183
  children: n ? /* @__PURE__ */ G(se, {
176
184
  text: H,
177
185
  query: n,
178
186
  maxLines: 2
179
187
  }) : H
180
- }), W = R && /* @__PURE__ */ K("div", {
181
- className: a("flex w-full items-center gap-1", F && V),
182
- children: [/* @__PURE__ */ G(R, {
188
+ }), W = ee && /* @__PURE__ */ K("div", {
189
+ className: a("flex w-full items-center gap-1", F && V, Y.tileType),
190
+ children: [/* @__PURE__ */ G(ee, {
183
191
  size: 16,
184
- className: Y.typeText,
192
+ className: X.typeText,
185
193
  "aria-hidden": !0
186
194
  }), /* @__PURE__ */ G("span", {
187
- className: a(O?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Y.typeText),
188
- children: w ? `${ee} · ${w}` : ee
195
+ className: a(O?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", X.typeText),
196
+ children: w ? `${R} · ${w}` : R
189
197
  })]
190
198
  }), ae = () => {
191
199
  _ && g ? g(A) : i && i(A);
@@ -195,7 +203,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
195
203
  P && /* @__PURE__ */ G("div", {
196
204
  role: "progressbar",
197
205
  "aria-label": T,
198
- className: a("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Y.track),
206
+ className: a("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", X.track),
199
207
  children: /* @__PURE__ */ G(ue, { size: 32 })
200
208
  }),
201
209
  /* @__PURE__ */ K("div", {
@@ -253,7 +261,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
253
261
  children: oe
254
262
  })
255
263
  });
256
- }, Z = /* @__PURE__ */ function(e) {
264
+ }, Q = /* @__PURE__ */ function(e) {
257
265
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
258
266
  }({}), Ae = ({ enabled: e, src: t }) => {
259
267
  let n = u(null), [r, i] = d("idle");
@@ -278,7 +286,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
278
286
  b && n ? n(_) : w && r && r(_);
279
287
  };
280
288
  return /* @__PURE__ */ G("div", {
281
- className: a(Ce, "group/attachment-tile", w && "cursor-pointer", Y.tile, d && Y.selected, g),
289
+ className: a(Ce, "group/attachment-tile", w && "cursor-pointer", X.tile, d && X.selected, g, Y.tile, d && Y.tileSelected),
282
290
  onClick: D,
283
291
  onKeyDown: (e) => {
284
292
  e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), D());
@@ -296,22 +304,22 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
296
304
  ariaLabel: m,
297
305
  onClick: o,
298
306
  id: _,
299
- className: Y.imageActionButton
307
+ className: X.imageActionButton
300
308
  }), c && /* @__PURE__ */ G(Te, {
301
309
  ariaLabel: h,
302
310
  onClick: c,
303
311
  id: _,
304
- className: Y.imageActionButton
312
+ className: X.imageActionButton
305
313
  })]
306
314
  }),
307
- E !== Z.Loaded && /* @__PURE__ */ G(ce, {
315
+ E !== Q.Loaded && /* @__PURE__ */ G(ce, {
308
316
  variant: le.Rectangular,
309
317
  width: "100%",
310
318
  height: "100%",
311
- active: E === Z.Loading,
319
+ active: E === Q.Loading,
312
320
  overlay: /* @__PURE__ */ G(V, {
313
321
  size: U.LG,
314
- className: Y.typeText,
322
+ className: X.typeText,
315
323
  "aria-hidden": !0,
316
324
  stroke: W
317
325
  }),
@@ -323,12 +331,12 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
323
331
  alt: v,
324
332
  loading: "lazy",
325
333
  decoding: "async",
326
- className: a("h-full w-full rounded-xl object-cover transition-opacity duration-200", E === Z.Loaded ? "opacity-100" : "opacity-0")
334
+ className: a("h-full w-full rounded-xl object-cover transition-opacity duration-200", E === Q.Loaded ? "opacity-100" : "opacity-0")
327
335
  })
328
336
  ]
329
337
  })
330
338
  });
331
- }, Q = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: u, styles: d, isSelected: f }) => {
339
+ }, Me = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: u, styles: d, isSelected: f }) => {
332
340
  let { colors: p } = d ?? {}, m = e.type === t.Pasted, h = m && o !== void 0, g = i({
333
341
  "--ai-tile-bg": p?.background,
334
342
  "--ai-tile-border": p?.border,
@@ -372,15 +380,16 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
372
380
  isExpandable: h,
373
381
  isSelected: f
374
382
  });
375
- }, Me = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: o, styles: s }) => {
383
+ }, Ne = ({ attachments: e, onRemove: t, onRetry: n, onExpand: r, onAttachmentClick: i, labels: o, styles: s }) => {
376
384
  let { ariaLabel: c = "Attached files", removeLabel: l, retryLabel: u, clickLabel: d, uploadingLabel: f } = o ?? {}, { className: p } = s ?? {};
377
385
  return e.length === 0 ? null : /* @__PURE__ */ G("div", {
378
386
  role: "list",
379
387
  "aria-label": c,
380
- className: a("flex w-full min-w-0 gap-2 overflow-x-auto", p),
388
+ className: a("flex w-full min-w-0 gap-2 overflow-x-auto", p, Y.tray),
381
389
  children: e.map((e) => /* @__PURE__ */ G("div", {
382
390
  role: "listitem",
383
- children: /* @__PURE__ */ G(Q, {
391
+ className: Y.trayItem,
392
+ children: /* @__PURE__ */ G(Me, {
384
393
  attachment: e,
385
394
  onRemove: t,
386
395
  onRetry: n,
@@ -395,11 +404,11 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
395
404
  })
396
405
  }, e.id))
397
406
  });
398
- }, Ne = {
407
+ }, Pe = {
399
408
  headerIcon: "_headerIcon_1dmgi_1",
400
409
  headerLabel: "_headerLabel_1dmgi_2"
401
- }, Pe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Fe = ({ attachments: e, onAttachmentClick: n, onDownloadAll: o, onRetry: s, labels: c, styles: l, selectedAttachmentId: u }) => {
402
- let { ariaLabel: d = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: g = "Download all", openInNewTabLabel: _, getHeaderLabel: v = (e) => Pe(e, "attachment"), promptLabel: y, pastedLabel: b, imageLabel: x } = c ?? {}, { typography: S, colors: C, className: w } = l ?? {}, T = i({ "--ai-group-text": C?.text });
410
+ }, Fe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ie = ({ attachments: e, onAttachmentClick: n, onDownloadAll: o, onRetry: s, labels: c, styles: l, selectedAttachmentId: u }) => {
411
+ let { ariaLabel: d = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: g = "Download all", openInNewTabLabel: _, getHeaderLabel: v = (e) => Fe(e, "attachment"), promptLabel: y, pastedLabel: b, imageLabel: x } = c ?? {}, { typography: S, colors: C, className: w } = l ?? {}, T = i({ "--ai-group-text": C?.text });
403
412
  if (e.length === 0) return null;
404
413
  let E = e.some((e) => e.type === t.Image), D = e.some((e) => e.type !== t.Image), O = E && D, k = e.length >= 5, A = O ? B : E ? V : h, j = v(e.length), M = () => {
405
414
  let t = e.filter((e) => e.status === r.Idle);
@@ -412,17 +421,17 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
412
421
  role: "group",
413
422
  "aria-label": d,
414
423
  style: T,
415
- className: a("flex flex-col gap-1", k ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Ne.container, w),
424
+ className: a("flex flex-col gap-1", k ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Pe.container, w),
416
425
  children: [/* @__PURE__ */ K("div", {
417
426
  className: "flex items-center justify-between",
418
427
  children: [/* @__PURE__ */ K("div", {
419
428
  className: "flex items-center gap-1",
420
429
  children: [/* @__PURE__ */ G(A, {
421
430
  size: U.SM,
422
- className: a("shrink-0", Ne.headerIcon),
431
+ className: a("shrink-0", Pe.headerIcon),
423
432
  "aria-hidden": !0
424
433
  }), /* @__PURE__ */ G("span", {
425
- className: a(S?.headerLabelClassName ?? "dial-tiny-semi-text", Ne.headerLabel),
434
+ className: a(S?.headerLabelClassName ?? "dial-tiny-semi-text", Pe.headerLabel),
426
435
  children: j
427
436
  })]
428
437
  }), e.length >= 2 && (o || n) && /* @__PURE__ */ G(oe, {
@@ -441,7 +450,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
441
450
  className: a("gap-3", k ? "grid grid-cols-[repeat(5,83px)]" : "flex flex-wrap"),
442
451
  children: e.map((e, t) => /* @__PURE__ */ G("div", {
443
452
  role: "listitem",
444
- children: /* @__PURE__ */ G(Q, {
453
+ children: /* @__PURE__ */ G(Me, {
445
454
  attachment: e,
446
455
  onClick: n,
447
456
  onDownload: N,
@@ -459,24 +468,24 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
459
468
  }, `${e.id}-${t}`))
460
469
  })]
461
470
  });
462
- }, Ie = {
471
+ }, Le = {
463
472
  overlay: "_overlay_mzpdp_1",
464
473
  icon: "_icon_mzpdp_5",
465
474
  deniedIcon: "_deniedIcon_mzpdp_9"
466
- }, Le = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
475
+ }, Re = ({ isVisible: e, isAttachmentsAllowed: t = !0, labels: n, styles: r }) => {
467
476
  let { title: o, subtitle: s } = n ?? {}, { colors: c, typography: l } = r ?? {};
468
477
  if (!e) return null;
469
478
  let u = i({
470
479
  "--ai-fd-bg": c?.background,
471
480
  "--ai-fd-icon": c?.icon,
472
481
  "--ai-fd-denied-icon": c?.deniedIcon
473
- }), d = o ?? (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 ? Ie.icon : Ie.deniedIcon, m = (e) => {
482
+ }), d = o ?? (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 ? Le.icon : Le.deniedIcon, m = (e) => {
474
483
  e.preventDefault();
475
484
  }, h = t ? g : te;
476
485
  return /* @__PURE__ */ G("div", {
477
486
  role: "status",
478
487
  "aria-live": "polite",
479
- className: a("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", Ie.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
488
+ className: a("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", Le.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
480
489
  onDragOver: t ? void 0 : m,
481
490
  onDrop: t ? void 0 : m,
482
491
  style: u,
@@ -499,10 +508,10 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
499
508
  ]
500
509
  })
501
510
  });
502
- }, $ = (e) => String(e).padStart(2, "0"), Re = (e) => `${e.getFullYear()}-${$(e.getMonth() + 1)}-${$(e.getDate())} ${$(e.getHours())}-${$(e.getMinutes())}-${$(e.getSeconds())}`, ze = (e, t, n) => {
511
+ }, $ = (e) => String(e).padStart(2, "0"), ze = (e) => `${e.getFullYear()}-${$(e.getMonth() + 1)}-${$(e.getDate())} ${$(e.getHours())}-${$(e.getMinutes())}-${$(e.getSeconds())}`, Be = (e, t, n) => {
503
512
  let r = e.lastIndexOf("."), i = r > 0, a = i ? e.slice(0, r) : e, o = i ? e.slice(r) : "", s = n === 0 ? "" : ` (${n + 1})`;
504
- return `${a} ${Re(t)}${s}${o}`;
505
- }, Be = (e, n, i = {}) => {
513
+ return `${a} ${ze(t)}${s}${o}`;
514
+ }, Ve = (e, n, i = {}) => {
506
515
  let { screenshotName: a = "Screenshot.png", pastedTextName: s = "Pasted text" } = i;
507
516
  return { handlePaste: o((i) => {
508
517
  if (!i.clipboardData) return;
@@ -512,7 +521,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
512
521
  for (let e of o) {
513
522
  let i = e.getAsFile();
514
523
  if (!i) continue;
515
- let o = ze(a, s, n.length), c = new File([i], o, { type: i.type }), l = {
524
+ let o = Be(a, s, n.length), c = new File([i], o, { type: i.type }), l = {
516
525
  id: q(),
517
526
  name: o,
518
527
  contentType: i.type,
@@ -544,6 +553,6 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, pe = (e) =
544
553
  a,
545
554
  s
546
555
  ]) };
547
- }, Ve = 100;
556
+ }, He = 100;
548
557
  //#endregion
549
- export { Se as ATTACHMENT_COLLAPSE_THRESHOLD, Q as AttachmentCard, Fe as AttachmentGroup, Me as AttachmentTray, Le as FileDndOverlay, Z as LazyImageLoadStatus, Ve as MAX_UPLOADS_PER_MINUTE, q as generateAttachmentId, J as getAttachmentCardState, ve as getAttachmentIcon, be as getExtFromContentType, pe as getNameWithoutExtension, _e as isMimeTypeAllowed, ge as mimeTypesToExtensionLabels, Be as useClipboardPaste, Ae as useLazyImageLoad };
558
+ export { Se as ATTACHMENT_COLLAPSE_THRESHOLD, Y as ATTACHMENT_INPUT_CLASS, Me as AttachmentCard, Ie as AttachmentGroup, Ne as AttachmentTray, Re as FileDndOverlay, Q as LazyImageLoadStatus, He as MAX_UPLOADS_PER_MINUTE, q as generateAttachmentId, J as getAttachmentCardState, ve as getAttachmentIcon, be as getExtFromContentType, pe as getNameWithoutExtension, _e as isMimeTypeAllowed, ge as mimeTypesToExtensionLabels, Ve as useClipboardPaste, Ae as useLazyImageLoad };
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.2.0-dev.48",
4
+ "version": "1.2.0-dev.58",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,9 +20,9 @@
20
20
  "@tabler/icons-react": "^3.44.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@epam/ai-dial-chat-shared": "1.2.0-dev.48",
23
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.58",
24
24
  "react": "^19.2.8",
25
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.7"
25
+ "@epam/ai-dial-ui-kit": "^0.15.0-dev.9"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",