@epam/ai-dial-attachment-input 1.3.0-dev.253 → 1.3.0-dev.256

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":"AAeA,OAAO,EACL,KAAK,EAAE,EAMR,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAsB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAmRlD,CAAC"}
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentCard/Attachments/File.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAM7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAsB/E,2HAA2H;AAC3H,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAqQlD,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;AASnC,OAAO,EACL,aAAa,EACb,KAAK,EAAE,EAIR,MAAM,OAAO,CAAC;AAUf,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,CAwKpD,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;AASnC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAUxD,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,CAsJpD,CAAC"}
package/index.css CHANGED
@@ -1,3 +1,3 @@
1
- ._tile_23kve_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_23kve_12._hovered_23kve_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_23kve_12{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus,#161b2d))}._selected_23kve_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_23kve_33{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_23kve_38{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_23kve_42{color:var(--ai-tile-type-text,var(--text-primary,#161b2d))}._placeholderIcon_23kve_46{color:var(--ai-tile-placeholder-icon,var(--text-secondary,#57647a))}._retryIcon_23kve_50{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_23kve_54{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._tile_23kve_12 ._actionButton_23kve_65{background:var(--ai-tile-hover-icon-bg,var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc)))}._tile_23kve_12._hovered_23kve_18:hover ._actionButton_23kve_65{background:var(--ai-tile-hover-icon-bg,var(--ai-tile-bg-hover,var(--bg-control-neutral-hover-muted,#e0e6f0)))}._tile_23kve_12._selected_23kve_28 ._actionButton_23kve_65{background:var(--ai-tile-hover-icon-bg,linear-gradient(var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f)), var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f))), var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc)))}._tile_23kve_12._tileError_23kve_33 ._actionButton_23kve_65{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._tile_23kve_12._loading_23kve_86 ._actionButton_23kve_65,._tile_23kve_12 ._imageActionButton_23kve_87,._tile_23kve_12._selected_23kve_28 ._imageActionButton_23kve_87{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#57647a))}._tile_23kve_12._proxyFocus_23kve_96:has(:focus-visible){outline-width:1px;outline-style:solid}._tile_23kve_12._proxyFocus_23kve_96 ._actionButton_23kve_65:focus-visible{outline:none}._loading_23kve_86{cursor:progress}._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_hb2mo_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_hb2mo_12._hovered_hb2mo_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_hb2mo_12{outline-color:var(--ai-tile-focus-outline,var(--stroke-focus,#161b2d))}._selected_hb2mo_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_hb2mo_33{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ai-tile-border-error,var(--stroke-error,#ae2f2f))}._nameText_hb2mo_38{color:var(--ai-tile-name-text,var(--text-primary,#161b2d))}._typeText_hb2mo_42{color:var(--ai-tile-type-text,var(--text-primary,#161b2d))}._placeholderIcon_hb2mo_46{color:var(--ai-tile-placeholder-icon,var(--text-secondary,#57647a))}._retryIcon_hb2mo_50{color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._track_hb2mo_54{background:var(--ai-tile-progress-track,var(--bg-backdrop,#161b2d4d))}._tile_hb2mo_12 ._actionButton_hb2mo_65{background:var(--ai-tile-hover-icon-bg,var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc)))}._tile_hb2mo_12._hovered_hb2mo_18:hover ._actionButton_hb2mo_65{background:var(--ai-tile-hover-icon-bg,var(--ai-tile-bg-hover,var(--bg-control-neutral-hover-muted,#e0e6f0)))}._tile_hb2mo_12._selected_hb2mo_28 ._actionButton_hb2mo_65{background:var(--ai-tile-hover-icon-bg,linear-gradient(var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f)), var(--ai-tile-bg-selected,var(--bg-control-accent-alpha,#2764d90f))), var(--ai-tile-bg,var(--bg-layer-raised,#fcfcfc)))}._tile_hb2mo_12._tileError_hb2mo_33 ._actionButton_hb2mo_65{background:var(--ai-tile-bg-error,var(--bg-error,#f3d6d8));color:var(--ai-tile-error-text,var(--text-error,#ae2f2f))}._tile_hb2mo_12._loading_hb2mo_86 ._actionButton_hb2mo_65,._tile_hb2mo_12 ._imageActionButton_hb2mo_87,._tile_hb2mo_12._selected_hb2mo_28 ._imageActionButton_hb2mo_87{background:var(--ai-tile-hover-icon-bg,var(--bg-layer-base,#f5f7fa));color:var(--ai-tile-hover-icon-color,var(--text-secondary,#57647a))}._tile_hb2mo_12:has(._tileAction_hb2mo_99:focus-visible){outline-width:1px;outline-style:solid}._tileAction_hb2mo_99:focus-visible{outline:none}._tile_hb2mo_12._proxyFocus_hb2mo_108:has(:focus-visible){outline-width:1px;outline-style:solid}._tile_hb2mo_12._proxyFocus_hb2mo_108 ._actionButton_hb2mo_65:focus-visible{outline:none}._loading_hb2mo_86{cursor:progress}._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*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
3
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-e-1{inset-inline-end:.25rem}.top-1{top:.25rem}.z-10{z-index:10}.z-\[9999\]{z-index:9999}.-m-0\.5{margin:-.125rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.size-\[100px\]{width:100px;height:100px}.h-full{height:100%}.w-full{width:100%}.max-w-\[424px\]{max-width:424px}.max-w-\[532px\]{max-width:532px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(5\,100px\)\]{grid-template-columns:repeat(5,100px)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-\[11px\]{border-radius:11px}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.object-cover{object-fit:cover}.p-0\.5{padding:.125rem}.p-3{padding:.75rem}.text-center{text-align:center}.break-words{overflow-wrap:break-word}.opacity-0{opacity:0}.opacity-100{opacity:1}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.outline-offset-1{outline-offset:1px}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-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,);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-property:opacity;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media (hover:hover){.group-hover\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):hover *){opacity:1}}.group-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):focus-visible *),.group-has-\[\:focus-visible\]\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):has(:focus-visible) *){opacity:1}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}@media (max-width:1279px){.mobile\:opacity-100{opacity:1}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}
3
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-e-1{inset-inline-end:.25rem}.top-1{top:.25rem}.z-10{z-index:10}.z-9999{z-index:9999}.-m-0\.5{margin:-.125rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.size-\[100px\]{width:100px;height:100px}.h-full{height:100%}.w-full{width:100%}.max-w-\[424px\]{max-width:424px}.max-w-\[532px\]{max-width:532px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-\[repeat\(5\,100px\)\]{grid-template-columns:repeat(5,100px)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-\[11px\]{border-radius:11px}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.object-cover{object-fit:cover}.p-0\.5{padding:.125rem}.p-3{padding:.75rem}.text-center{text-align:center}.break-words,.wrap-break-word{overflow-wrap:break-word}.opacity-0{opacity:0}.opacity-100{opacity:1}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.outline-offset-1{outline-offset:1px}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-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,);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-property:opacity;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media (hover:hover){.group-hover\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):hover *){opacity:1}}.group-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):focus-visible *),.group-has-focus-visible\/attachment-tile\:opacity-100:is(:where(.group\/attachment-tile):has(:focus-visible) *){opacity:1}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}@media (max-width:1279px){.mobile\:opacity-100{opacity:1}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}
package/index.js CHANGED
@@ -1,32 +1,32 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, RequestStatus as r, buildCssVars as i, getBaseMimeType as a, mergeClasses as o, normalizeMimeType as s } from "@epam/ai-dial-chat-shared";
2
2
  import { useCallback as c, useEffect as l, useId as u, useMemo as d, useRef as f, useState as p } from "react";
3
- import { 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 ee, IconFileTypeZip as te, IconFileX as ne, IconMusic as re, IconPaperclip as B, IconPhoto as V, IconReload as ie, IconTerminal2 as ae, IconVideo as oe, IconX as se } from "@tabler/icons-react";
4
- import { DIAL_ICON_SIZE as H, DIAL_KIT_ICON_STROKE as U, DialItemType as ce, ElementSize as W, FileIcon as le, GhostIconButton as ue, Highlight as de, LiveRegion as fe, LiveRegionElement as pe, Skeleton as me, SkeletonVariant as he, Spinner as ge, StaticIconButton as _e } from "@epam/ai-dial-ui-kit";
3
+ import { 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 ee, IconFileTypeZip as te, IconFileX as ne, IconMusic as re, IconPaperclip as B, IconPhoto as V, IconReload as ie, IconTerminal2 as ae, IconVideo as oe, IconX as H } from "@tabler/icons-react";
4
+ import { DIAL_ICON_SIZE as U, DIAL_KIT_ICON_STROKE as W, DialItemType as se, ElementSize as ce, FileIcon as le, GhostIconButton as ue, Highlight as de, LiveRegion as fe, LiveRegionElement as pe, Skeleton as me, SkeletonVariant as he, Spinner as ge, StaticIconButton as _e } from "@epam/ai-dial-ui-kit";
5
5
  import { Fragment as ve, jsx as G, jsxs as K } from "react/jsx-runtime";
6
6
  //#region src/utils/attachment.ts
7
- var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) => {
7
+ var ye = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, be = (e) => {
8
8
  if (e == null) return "";
9
9
  let t = e.lastIndexOf(".");
10
10
  return t > 0 ? e.slice(0, t) : e;
11
- }, be = {
11
+ }, xe = {
12
12
  image: "Image files",
13
13
  audio: "Audio files",
14
14
  video: "Video files",
15
15
  text: "Text files",
16
16
  "*": "All files"
17
- }, xe = { "image/jpeg": "JPEG" }, Se = (e, t = be) => e.map((e) => {
17
+ }, Se = { "image/jpeg": "JPEG" }, Ce = (e, t = xe) => e.map((e) => {
18
18
  let r = a(e);
19
19
  if (r.endsWith("/*")) {
20
20
  let e = r.slice(0, -2);
21
21
  return t[e] ?? `${e} files`;
22
22
  }
23
- let i = s(r), o = xe[i];
23
+ let i = s(r), o = Se[i];
24
24
  if (o) return o;
25
25
  let c = n[i];
26
26
  if (c) return c.toUpperCase();
27
27
  let l = i.split("/")[1];
28
28
  return l == null ? e.toUpperCase() : l.toUpperCase();
29
- }).join(", "), Ce = (e, t) => {
29
+ }).join(", "), we = (e, t) => {
30
30
  if (t.length === 0) return !1;
31
31
  let n = a(e), r = s(n);
32
32
  return t.some((e) => {
@@ -38,7 +38,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
38
38
  }
39
39
  return r === s(t);
40
40
  });
41
- }, we = (e) => {
41
+ }, Te = (e) => {
42
42
  if (!e) return _;
43
43
  let t = s(e);
44
44
  if (t.startsWith("image/")) switch (t) {
@@ -79,41 +79,41 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
79
79
  case "text/x-vue": return R;
80
80
  default: return _;
81
81
  }
82
- }, Te = (e) => {
83
- let { type: n, contentType: r } = e;
84
- return n === t.Prompt ? ae : n === t.Pasted ? m : n === t.Image ? V : we(r ?? "");
85
82
  }, Ee = (e) => {
83
+ let { type: n, contentType: r } = e;
84
+ return n === t.Prompt ? ae : n === t.Pasted ? m : n === t.Image ? V : Te(r ?? "");
85
+ }, De = (e) => {
86
86
  let t = s(e), r = n[t];
87
87
  if (r) return r;
88
88
  let i = t.split("/")[1];
89
89
  if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
90
- }, De = (e) => {
90
+ }, Oe = (e) => {
91
91
  let { name: t, contentType: n } = e;
92
92
  if (n) {
93
- let e = Ee(n);
93
+ let e = De(n);
94
94
  if (e) return e;
95
95
  }
96
96
  if (t == null) return;
97
97
  let r = t.lastIndexOf(".");
98
98
  if (r > 0 && r < t.length - 1) return t.slice(r + 1).toLowerCase();
99
- }, Oe = (e) => e.type !== t.Prompt && e.type !== t.Pasted, ke = (e, n) => {
99
+ }, ke = (e) => e.type !== t.Prompt && e.type !== t.Pasted, Ae = (e, n) => {
100
100
  let { type: r, name: i } = e;
101
101
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
102
102
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
103
103
  if (r === t.Image) return n.imageLabel ?? "Image";
104
- let a = De(e);
104
+ let a = Oe(e);
105
105
  return a ? `.${a}` : i ?? "";
106
- }, J = (e, n = {}) => {
106
+ }, q = (e, n = {}) => {
107
107
  let { type: i, status: a, previewUrl: o, url: s } = e, c = a === r.Loading, l = a === r.Error, u = i === t.Image && !!(o ?? s) && !l, d = i === t.Link && !l;
108
108
  return {
109
109
  isLoading: c,
110
110
  isError: l,
111
111
  isImage: u,
112
112
  isLink: d,
113
- BottomIcon: d ? null : Te(e),
114
- typeLabel: d ? null : ke(e, n)
113
+ BottomIcon: d ? null : Ee(e),
114
+ typeLabel: d ? null : Ae(e, n)
115
115
  };
116
- }, Ae = 5, je = "flex size-[100px] items-center justify-center rounded-xl border", Me = "outline-offset-1 focus-visible:outline-1", Y = {
116
+ }, je = 5, Me = "flex size-[100px] items-center justify-center rounded-xl border", Ne = "outline-offset-1 focus-visible:outline-1", J = {
117
117
  tray: "dial-ai-attachment-tray",
118
118
  trayItem: "dial-ai-attachment-tray-item",
119
119
  tile: "dial-ai-attachment-tile",
@@ -121,134 +121,133 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
121
121
  tileName: "dial-ai-attachment-tile-name",
122
122
  tileType: "dial-ai-attachment-tile-type",
123
123
  tileAction: "dial-ai-attachment-tile-action"
124
- }, X = {
125
- tile: "_tile_23kve_12",
126
- hovered: "_hovered_23kve_18",
127
- selected: "_selected_23kve_28",
128
- tileError: "_tileError_23kve_33",
129
- nameText: "_nameText_23kve_38",
130
- typeText: "_typeText_23kve_42",
131
- placeholderIcon: "_placeholderIcon_23kve_46",
132
- retryIcon: "_retryIcon_23kve_50",
133
- track: "_track_23kve_54",
134
- actionButton: "_actionButton_23kve_65",
135
- loading: "_loading_23kve_86",
136
- imageActionButton: "_imageActionButton_23kve_87",
137
- proxyFocus: "_proxyFocus_23kve_96"
138
- }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s, isAlwaysVisible: c }) => /* @__PURE__ */ G(_e, {
124
+ }, Y = {
125
+ tile: "_tile_hb2mo_12",
126
+ hovered: "_hovered_hb2mo_18",
127
+ selected: "_selected_hb2mo_28",
128
+ tileError: "_tileError_hb2mo_33",
129
+ nameText: "_nameText_hb2mo_38",
130
+ typeText: "_typeText_hb2mo_42",
131
+ placeholderIcon: "_placeholderIcon_hb2mo_46",
132
+ retryIcon: "_retryIcon_hb2mo_50",
133
+ track: "_track_hb2mo_54",
134
+ actionButton: "_actionButton_hb2mo_65",
135
+ loading: "_loading_hb2mo_86",
136
+ imageActionButton: "_imageActionButton_hb2mo_87",
137
+ tileAction: "_tileAction_hb2mo_99",
138
+ proxyFocus: "_proxyFocus_hb2mo_108"
139
+ }, X = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: s, isAlwaysVisible: c }) => /* @__PURE__ */ G(_e, {
139
140
  icon: a,
140
- size: W.Small,
141
- className: o(c ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-[:focus-visible]/attachment-tile:opacity-100", X.actionButton, s, Y.tileAction),
141
+ size: ce.Small,
142
+ className: o(c ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-focus-visible/attachment-tile:opacity-100", Y.actionButton, s, J.tileAction),
142
143
  "aria-label": e,
143
144
  "aria-describedby": t ? n : void 0,
144
145
  onClick: (e) => {
145
146
  e.stopPropagation(), r(i);
146
147
  }
147
- }), Ne = ({ ...e }) => /* @__PURE__ */ G(Z, {
148
+ }), Pe = ({ ...e }) => /* @__PURE__ */ G(X, {
148
149
  icon: /* @__PURE__ */ G(ie, {
149
- size: H.SM,
150
+ size: U.SM,
150
151
  "aria-hidden": !0,
151
- stroke: U
152
+ stroke: W
152
153
  }),
153
- className: X.retryIcon,
154
+ className: Y.retryIcon,
154
155
  ...e
155
- }), Pe = ({ ...e }) => /* @__PURE__ */ G(Z, {
156
+ }), Fe = ({ ...e }) => /* @__PURE__ */ G(X, {
156
157
  icon: /* @__PURE__ */ G(h, {
157
- size: H.SM,
158
+ size: U.SM,
158
159
  "aria-hidden": !0,
159
- stroke: U
160
+ stroke: W
160
161
  }),
161
162
  ...e
162
- }), Fe = ({ ...e }) => /* @__PURE__ */ G(Z, {
163
+ }), Ie = ({ ...e }) => /* @__PURE__ */ G(X, {
163
164
  icon: /* @__PURE__ */ G(g, {
164
- size: H.SM,
165
+ size: U.SM,
165
166
  "aria-hidden": !0,
166
- stroke: U
167
+ stroke: W
167
168
  }),
168
169
  ...e
169
- }), Ie = ({ className: e, ...t }) => /* @__PURE__ */ G(Z, {
170
- icon: /* @__PURE__ */ G(se, {
171
- size: H.SM,
170
+ }), Le = ({ className: e, ...t }) => /* @__PURE__ */ G(X, {
171
+ icon: /* @__PURE__ */ G(H, {
172
+ size: U.SM,
172
173
  "aria-hidden": !0,
173
- stroke: U
174
+ stroke: W
174
175
  }),
175
176
  className: o("mobile:opacity-100", e),
176
177
  ...t
177
- }), Le = {
178
+ }), Re = {
178
179
  [e.Network]: "Upload failed · network error",
179
180
  [e.UnsupportedType]: "Upload failed · unsupported file type",
180
181
  [e.FileTooLarge]: "Upload failed · file too large"
181
- }, Re = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: a, labels: s, styles: l, onDownload: f, isLink: p, cssVars: m, onExpand: h, isExpandable: g, onRemove: _, isSelected: v }) => {
182
- let { clickLabel: y = "Download attachment", expandLabel: b = "Expand pasted text", downloadLabel: x = "Download attachment", retryLabel: S = "Retry upload", removeLabel: C = "Remove attachment", openInNewTabLabel: w = "Open in new tab", sizeLabel: T, uploadingLabel: E = "Uploading", errorReasonLabels: D, genericErrorLabel: O = "Upload failed" } = s ?? {}, { typography: k, className: A } = l ?? {}, { id: j, name: M, status: N, errorReason: P } = t, F = N === r.Loading, I = N === r.Error, L = u(), R = I ? P && (D?.[P] ?? Le[P]) || O : "", { BottomIcon: z, typeLabel: ee } = J(t), te = Oe(t), ne = !I && !F && f && !p, re = I && !!a && P !== e.UnsupportedType && P !== e.FileTooLarge, B = !!g && h !== void 0, V = B || i !== void 0, ie = Number(!!ne) + Number(!!re) + Number(!!p) + Number(!!_), ae = !V && ie === 1, oe = () => {
182
+ }, ze = ({ attachment: t, searchQuery: n = "", onClick: i, onRetry: a, labels: s, styles: l, onDownload: f, isLink: p, cssVars: m, onExpand: h, isExpandable: g, onRemove: _, isSelected: v }) => {
183
+ let { clickLabel: y = "Download attachment", expandLabel: b = "Expand pasted text", downloadLabel: x = "Download attachment", retryLabel: S = "Retry upload", removeLabel: C = "Remove attachment", openInNewTabLabel: w = "Open in new tab", sizeLabel: T, uploadingLabel: E = "Uploading", errorReasonLabels: D, genericErrorLabel: O = "Upload failed" } = s ?? {}, { typography: k, className: A } = l ?? {}, { id: j, name: M, status: N, errorReason: P } = t, F = N === r.Loading, I = N === r.Error, L = u(), R = I ? P && (D?.[P] ?? Re[P]) || O : "", { BottomIcon: z, typeLabel: ee } = q(t), te = ke(t), ne = !I && !F && f && !p, re = I && !!a && P !== e.UnsupportedType && P !== e.FileTooLarge, B = !!g && h !== void 0, V = B || i !== void 0, ie = Number(!!ne) + Number(!!re) + Number(!!p) + Number(!!_), ae = !V && ie === 1, oe = () => {
183
184
  B ? h(j) : i?.(j);
184
- }, se = (e) => {
185
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), oe());
186
- }, W = d(() => ye(M), [M]), ue = c(() => {
185
+ }, H = d(() => be(M), [M]), ce = c(() => {
187
186
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
188
- }, [t]), me = o(je, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", X.tile, V && !I && !F && X.hovered, F && X.loading, v && X.selected, I && X.tileError, ae && X.proxyFocus, Y.tile, v && Y.tileSelected), he = /* @__PURE__ */ G("div", {
189
- title: W,
190
- className: o(k?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 break-words", X.nameText, Y.tileName),
187
+ }, [t]), ue = o(Me, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", Y.tile, V && !I && !F && Y.hovered, F && Y.loading, v && Y.selected, I && Y.tileError, ae && Y.proxyFocus, J.tile, v && J.tileSelected), me = /* @__PURE__ */ G("div", {
188
+ title: H,
189
+ className: o(k?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 wrap-break-word", Y.nameText, J.tileName),
191
190
  children: n ? /* @__PURE__ */ G(de, {
192
- text: W,
191
+ text: H,
193
192
  query: n,
194
193
  maxLines: 2
195
- }) : W
196
- }), _e = z && /* @__PURE__ */ K("div", {
197
- className: o("flex w-full items-end gap-1", Y.tileType),
194
+ }) : H
195
+ }), he = z && /* @__PURE__ */ K("div", {
196
+ className: o("flex w-full items-end gap-1", J.tileType),
198
197
  children: [te ? /* @__PURE__ */ G(le, {
199
- type: ce.File,
198
+ type: se.File,
200
199
  name: M ?? "",
201
- fileExtension: De(t),
202
- size: H.MD,
200
+ fileExtension: Oe(t),
201
+ size: U.MD,
203
202
  decorative: !0
204
203
  }) : /* @__PURE__ */ G(z, {
205
- size: H.MD,
206
- className: X.typeText,
207
- stroke: U,
204
+ size: U.MD,
205
+ className: Y.typeText,
206
+ stroke: W,
208
207
  "aria-hidden": !0
209
208
  }), /* @__PURE__ */ G("span", {
210
- className: o(k?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", X.typeText),
209
+ className: o(k?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Y.typeText),
211
210
  children: T ? `${ee} · ${T}` : ee
212
211
  })]
213
- }), q = V ? {
214
- role: "button",
215
- tabIndex: 0,
216
- "aria-label": B ? b : y,
217
- onClick: oe,
218
- onKeyDown: se
219
- } : {}, be = /* @__PURE__ */ K(ve, { children: [
212
+ }), _e = /* @__PURE__ */ K(ve, { children: [
213
+ me,
220
214
  he,
221
- _e,
215
+ V && /* @__PURE__ */ G("button", {
216
+ type: "button",
217
+ "aria-label": B ? b : y,
218
+ onClick: oe,
219
+ className: o("absolute inset-0 cursor-pointer rounded-[11px]", Y.tileAction)
220
+ }),
222
221
  F && /* @__PURE__ */ G("div", {
223
222
  role: "progressbar",
224
223
  "aria-label": E,
225
- className: o("absolute inset-0 flex items-center justify-center rounded-[11px]", X.track),
224
+ className: o("absolute inset-0 flex items-center justify-center rounded-[11px]", Y.track),
226
225
  children: /* @__PURE__ */ G(ge, { size: 32 })
227
226
  }),
228
227
  /* @__PURE__ */ K("div", {
229
228
  className: "absolute inset-e-1 top-1 flex",
230
229
  children: [
231
- ne && /* @__PURE__ */ G(Pe, {
230
+ ne && /* @__PURE__ */ G(Fe, {
232
231
  ariaLabel: x,
233
232
  errorTitle: R,
234
233
  errorDescId: L,
235
234
  onClick: f,
236
235
  id: j
237
236
  }),
238
- re && /* @__PURE__ */ G(Ne, {
237
+ re && /* @__PURE__ */ G(Pe, {
239
238
  ariaLabel: S,
240
239
  errorTitle: R,
241
240
  errorDescId: L,
242
241
  onClick: a,
243
242
  id: j
244
243
  }),
245
- p && /* @__PURE__ */ G(Fe, {
244
+ p && /* @__PURE__ */ G(Ie, {
246
245
  ariaLabel: w,
247
246
  errorTitle: R,
248
247
  errorDescId: L,
249
- onClick: ue
248
+ onClick: ce
250
249
  }),
251
- _ && /* @__PURE__ */ G(Ie, {
250
+ _ && /* @__PURE__ */ G(Le, {
252
251
  ariaLabel: C,
253
252
  errorTitle: R,
254
253
  errorDescId: L,
@@ -269,16 +268,15 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
269
268
  style: m,
270
269
  className: o("inline-flex", A),
271
270
  children: /* @__PURE__ */ G("div", {
272
- ...q,
273
271
  "aria-busy": F,
274
272
  style: m,
275
- className: o(me, V && "cursor-pointer", Me),
276
- children: be
273
+ className: o(ue, V && "cursor-pointer", Ne),
274
+ children: _e
277
275
  })
278
276
  });
279
- }, Q = /* @__PURE__ */ function(e) {
277
+ }, Z = /* @__PURE__ */ function(e) {
280
278
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
281
- }({}), ze = ({ enabled: e, src: t }) => {
279
+ }({}), Be = ({ enabled: e, src: t }) => {
282
280
  let n = f(null), [r, i] = p("idle");
283
281
  return l(() => {
284
282
  i(e && t ? "loading" : "idle");
@@ -293,24 +291,15 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
293
291
  imageRef: n,
294
292
  imageLoadStatus: r
295
293
  };
296
- }, Be = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: s, onDownload: c, styles: l, isSelected: u }) => {
297
- let { clickLabel: f = "Open attachment", expandLabel: p = "Expand pasted text", removeLabel: m = "Remove attachment", downloadLabel: h = "Download attachment", uploadingLabel: g = "Uploading" } = i ?? {}, { className: _ } = l ?? {}, { id: v, name: y } = e, b = e.previewUrl ?? e.url, x = e.type === t.Pasted && n !== void 0, { isLoading: S, isError: C, isImage: w } = d(() => J(e), [e]), T = r !== void 0 && !x && !S && !C, E = x || T, D = !!c && !S, O = !E && Number(!!a) + Number(D) === 1, { imageRef: k, imageLoadStatus: A } = ze({
294
+ }, Ve = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: s, onDownload: c, styles: l, isSelected: u }) => {
295
+ let { clickLabel: f = "Open attachment", expandLabel: p = "Expand pasted text", removeLabel: m = "Remove attachment", downloadLabel: h = "Download attachment", uploadingLabel: g = "Uploading" } = i ?? {}, { className: _ } = l ?? {}, { id: v, name: y } = e, b = e.previewUrl ?? e.url, x = e.type === t.Pasted && n !== void 0, { isLoading: S, isError: C, isImage: w } = d(() => q(e), [e]), T = r !== void 0 && !x && !S && !C, E = x || T, D = !!c && !S, O = !E && Number(!!a) + Number(D) === 1, { imageRef: k, imageLoadStatus: A } = Be({
298
296
  enabled: w,
299
297
  src: b
300
298
  }), j = () => {
301
299
  x && n ? n(v) : T && r && r(v);
302
- }, M = E ? {
303
- role: "button",
304
- tabIndex: 0,
305
- "aria-label": x ? p : f,
306
- onClick: j,
307
- onKeyDown: (e) => {
308
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), j());
309
- }
310
- } : {}, N = o(je, "group/attachment-tile", E && "cursor-pointer", X.tile, u && X.selected, S && X.loading, O && X.proxyFocus, Me, _, Y.tile, u && Y.tileSelected);
300
+ }, M = o(Me, "group/attachment-tile", E && "cursor-pointer", Y.tile, u && Y.selected, S && Y.loading, O && Y.proxyFocus, Ne, _, J.tile, u && J.tileSelected);
311
301
  return /* @__PURE__ */ G("div", {
312
- className: N,
313
- ...M,
302
+ className: M,
314
303
  "aria-busy": S,
315
304
  style: s,
316
305
  children: /* @__PURE__ */ K("div", {
@@ -318,29 +307,29 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
318
307
  children: [
319
308
  /* @__PURE__ */ K("div", {
320
309
  className: "absolute inset-e-1 top-1 z-10 flex",
321
- children: [a && /* @__PURE__ */ G(Ie, {
310
+ children: [a && /* @__PURE__ */ G(Le, {
322
311
  ariaLabel: m,
323
312
  onClick: a,
324
313
  id: v,
325
- className: X.imageActionButton,
314
+ className: Y.imageActionButton,
326
315
  isAlwaysVisible: S
327
- }), D && /* @__PURE__ */ G(Pe, {
316
+ }), D && /* @__PURE__ */ G(Fe, {
328
317
  ariaLabel: h,
329
318
  onClick: c,
330
319
  id: v,
331
- className: X.imageActionButton
320
+ className: Y.imageActionButton
332
321
  })]
333
322
  }),
334
- A !== Q.Loaded && /* @__PURE__ */ G(me, {
323
+ A !== Z.Loaded && /* @__PURE__ */ G(me, {
335
324
  variant: he.Rectangular,
336
325
  width: "100%",
337
326
  height: "100%",
338
- active: A === Q.Loading,
327
+ active: A === Z.Loading,
339
328
  overlay: /* @__PURE__ */ G(V, {
340
- size: H.LG,
341
- className: X.placeholderIcon,
329
+ size: U.LG,
330
+ className: Y.placeholderIcon,
342
331
  "aria-hidden": !0,
343
- stroke: U
332
+ stroke: W
344
333
  }),
345
334
  className: "absolute inset-0 rounded-xl"
346
335
  }),
@@ -350,18 +339,24 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
350
339
  alt: y,
351
340
  loading: "lazy",
352
341
  decoding: "async",
353
- className: o("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === Q.Loaded ? "opacity-100" : "opacity-0")
342
+ className: o("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === Z.Loaded ? "opacity-100" : "opacity-0")
343
+ }),
344
+ E && /* @__PURE__ */ G("button", {
345
+ type: "button",
346
+ "aria-label": x ? p : f,
347
+ onClick: j,
348
+ className: o("absolute inset-0 cursor-pointer rounded-xl", Y.tileAction)
354
349
  }),
355
350
  S && /* @__PURE__ */ G("div", {
356
351
  role: "progressbar",
357
352
  "aria-label": g,
358
- className: o("absolute inset-0 flex items-center justify-center rounded-xl", X.track),
353
+ className: o("absolute inset-0 flex items-center justify-center rounded-xl", Y.track),
359
354
  children: /* @__PURE__ */ G(ge, { size: 32 })
360
355
  })
361
356
  ]
362
357
  })
363
358
  });
364
- }, Ve = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: l, styles: u, isSelected: f }) => {
359
+ }, Q = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: a, onExpand: o, onClick: s, onDownload: c, labels: l, styles: u, isSelected: f }) => {
365
360
  let { colors: p } = u ?? {}, m = e.type === t.Pasted && o !== void 0, h = i({
366
361
  "--ai-tile-bg": p?.background,
367
362
  "--ai-tile-border": p?.border,
@@ -379,8 +374,8 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
379
374
  "--ai-tile-hover-icon-bg": p?.hoverIconBackground,
380
375
  "--ai-tile-hover-icon-color": p?.hoverIconColor,
381
376
  "--ai-tile-progress-track": p?.trackBackground
382
- }), { isImage: g, isLink: _ } = d(() => J(e), [e]);
383
- return g ? /* @__PURE__ */ G(Be, {
377
+ }), { isImage: g, isLink: _ } = d(() => q(e), [e]);
378
+ return g ? /* @__PURE__ */ G(Ve, {
384
379
  attachment: e,
385
380
  labels: l,
386
381
  onClick: s,
@@ -390,7 +385,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
390
385
  cssVars: h,
391
386
  onDownload: c,
392
387
  isSelected: f
393
- }) : /* @__PURE__ */ G(Re, {
388
+ }) : /* @__PURE__ */ G(ze, {
394
389
  attachment: e,
395
390
  searchQuery: n,
396
391
  onClick: s,
@@ -410,11 +405,11 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
410
405
  return e.length === 0 ? null : /* @__PURE__ */ G("div", {
411
406
  role: "list",
412
407
  "aria-label": c,
413
- className: o("-m-0.5 box-border flex min-w-0 gap-2 overflow-x-auto p-0.5", m, Y.tray),
408
+ className: o("-m-0.5 box-border flex min-w-0 gap-2 overflow-x-auto p-0.5", m, J.tray),
414
409
  children: e.map((e) => /* @__PURE__ */ G("div", {
415
410
  role: "listitem",
416
- className: Y.trayItem,
417
- children: /* @__PURE__ */ G(Ve, {
411
+ className: J.trayItem,
412
+ children: /* @__PURE__ */ G(Q, {
418
413
  attachment: e,
419
414
  onRemove: t,
420
415
  onRetry: n,
@@ -453,7 +448,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
453
448
  children: [/* @__PURE__ */ K("div", {
454
449
  className: "flex items-center gap-1",
455
450
  children: [/* @__PURE__ */ G(M, {
456
- size: H.SM,
451
+ size: U.SM,
457
452
  className: o("shrink-0", Ue.headerIcon),
458
453
  "aria-hidden": !0
459
454
  }), /* @__PURE__ */ G("span", {
@@ -462,11 +457,11 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
462
457
  })]
463
458
  }), e.length >= 2 && F.length > 0 && (a || n) && /* @__PURE__ */ G(ue, {
464
459
  icon: /* @__PURE__ */ G(h, {
465
- size: H.SM,
460
+ size: U.SM,
466
461
  "aria-hidden": !0,
467
- stroke: U
462
+ stroke: W
468
463
  }),
469
- size: W.Small,
464
+ size: ce.Small,
470
465
  "aria-label": v,
471
466
  onClick: I
472
467
  })]
@@ -476,7 +471,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
476
471
  className: o("gap-2", j ? "grid grid-cols-[repeat(5,100px)]" : "flex flex-wrap"),
477
472
  children: e.map((e, t) => /* @__PURE__ */ G("div", {
478
473
  role: "listitem",
479
- children: /* @__PURE__ */ G(Ve, {
474
+ children: /* @__PURE__ */ G(Q, {
480
475
  attachment: e,
481
476
  onClick: n,
482
477
  onDownload: a && P(e) ? L : void 0,
@@ -514,7 +509,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
514
509
  e.preventDefault();
515
510
  }, g = t ? v : ne;
516
511
  return /* @__PURE__ */ K(ve, { children: [f, /* @__PURE__ */ G("div", {
517
- className: o("fixed inset-0 z-[9999] flex items-center justify-center backdrop-blur-sm", Ke.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
512
+ className: o("fixed inset-0 z-9999 flex items-center justify-center backdrop-blur-sm", Ke.overlay, t ? "pointer-events-none" : "pointer-events-auto cursor-not-allowed"),
518
513
  onDragOver: t ? void 0 : h,
519
514
  onDrop: t ? void 0 : h,
520
515
  style: p,
@@ -553,7 +548,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
553
548
  let i = e.getAsFile();
554
549
  if (!i) continue;
555
550
  let s = Ye(a, o, n.length), c = new File([i], s, { type: i.type }), l = {
556
- id: q(),
551
+ id: ye(),
557
552
  name: s,
558
553
  contentType: i.type,
559
554
  file: c,
@@ -569,7 +564,7 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
569
564
  let l = i.clipboardData.getData("text/plain");
570
565
  if (l.length > n) {
571
566
  let n = `${o} ${Je(/* @__PURE__ */ new Date())}.txt`, a = new File([l], n, { type: "text/plain" }), s = {
572
- id: q(),
567
+ id: ye(),
573
568
  name: n,
574
569
  contentType: "text/plain",
575
570
  file: a,
@@ -586,4 +581,4 @@ var q = () => `${Date.now()}-${Math.random().toString(36).slice(2)}`, ye = (e) =
586
581
  ]) };
587
582
  }, Ze = 100;
588
583
  //#endregion
589
- export { Ae as ATTACHMENT_COLLAPSE_THRESHOLD, Y as ATTACHMENT_INPUT_CLASS, Ve as AttachmentCard, Ge as AttachmentGroup, He as AttachmentTray, qe as FileDndOverlay, Q as LazyImageLoadStatus, Ze as MAX_UPLOADS_PER_MINUTE, q as generateAttachmentId, J as getAttachmentCardState, we as getAttachmentIcon, Ee as getExtFromContentType, ye as getNameWithoutExtension, Ce as isMimeTypeAllowed, Se as mimeTypesToExtensionLabels, Xe as useClipboardPaste, ze as useLazyImageLoad };
584
+ export { je as ATTACHMENT_COLLAPSE_THRESHOLD, J as ATTACHMENT_INPUT_CLASS, Q as AttachmentCard, Ge as AttachmentGroup, He as AttachmentTray, qe as FileDndOverlay, Z as LazyImageLoadStatus, Ze as MAX_UPLOADS_PER_MINUTE, ye as generateAttachmentId, q as getAttachmentCardState, Te as getAttachmentIcon, De as getExtFromContentType, be as getNameWithoutExtension, we as isMimeTypeAllowed, Ce as mimeTypesToExtensionLabels, Xe as useClipboardPaste, Be 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.3.0-dev.253",
4
+ "version": "1.3.0-dev.256",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,7 +20,7 @@
20
20
  "@tabler/icons-react": "^3.44.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@epam/ai-dial-chat-shared": "1.3.0-dev.253",
23
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.256",
24
24
  "react": "^19.2.8",
25
25
  "@epam/ai-dial-ui-kit": "^0.16.0-dev.56"
26
26
  },