@epam/ai-dial-attachment-input 1.0.0-dev.500 → 1.0.0-dev.503
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.
- package/components/AttachmentCard/AttachmentCard.d.ts.map +1 -1
- package/components/AttachmentFileRow/AttachmentFileRow.d.ts.map +1 -1
- package/components/AttachmentGroup/AttachmentGroup.d.ts.map +1 -1
- package/components/AttachmentMoreTile/AttachmentMoreTile.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +226 -181
- package/models/attachment-card.d.ts +24 -0
- package/models/attachment-card.d.ts.map +1 -1
- package/models/attachment-file-row.d.ts +31 -0
- package/models/attachment-file-row.d.ts.map +1 -1
- package/models/attachment-group.d.ts +11 -0
- package/models/attachment-group.d.ts.map +1 -1
- package/models/attachment-more-tile.d.ts +19 -0
- package/models/attachment-more-tile.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCard.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCard/AttachmentCard.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,EAAE,EAAgD,MAAM,OAAO,CAAC;AAK9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAOxE,8GAA8G;AAC9G,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AttachmentCard.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCard/AttachmentCard.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,EAAE,EAAgD,MAAM,OAAO,CAAC;AAK9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAOxE,8GAA8G;AAC9G,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAkYlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentFileRow.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentFileRow/AttachmentFileRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentFileRow.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentFileRow/AttachmentFileRow.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,EAA8C,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAU/E;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAoOxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentGroup/AttachmentGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentGroup.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentGroup/AttachmentGroup.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,EAAqB,MAAM,OAAO,CAAC;AAEnD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AAUvC;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyKpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentMoreTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentMoreTile/AttachmentMoreTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGjF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AttachmentMoreTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentMoreTile/AttachmentMoreTile.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAGjF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAmC1D,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._card_ywrb5_1{border-color:var(--ci-card-border,var(--stroke-secondary,#d1dbea));background:var(--ci-card-bg,var(--bg-layer-0,#fcfcfc))}._cardError_ywrb5_6{border-color:var(--ci-card-border-error,var(--stroke-error,#ae2f2f))}._cardSelected_ywrb5_10{background:var(--ci-card-bg-selected,var(--bg-accent-primary-alpha,#7da4ff2e));border-color:var(--ci-card-border-selected,var(--stroke-accent-primary,#124ace))}._cardPrompt_ywrb5_15:hover,._cardPasted_ywrb5_16:hover{background:var(--ci-card-bg-hover,var(--controls-bg-neutral-hover,#d1dbea))}._name_ywrb5_20{color:var(--ci-card-name,var(--text-primary,#161b2d))}._meta_ywrb5_24{color:var(--ci-card-meta,var(--text-secondary,#575f73))}._loadingOverlay_ywrb5_28{background:var(--ci-loading-overlay-bg,var(--bg-blackout,#0c101d4d))}._actionBtn_ywrb5_32{color:var(--ci-card-action-color,var(--text-primary,#161b2d))}._actionBtn_ywrb5_32:hover{background:var(--ci-card-remove-bg-hover,var(--bg-layer-3,#fcfcfc))}._card_ywrb5_1:focus-within{outline-color:var(--ci-card-focus-outline,var(--controls-stroke-focus,#eef1f7))}._removeBtnImage_ywrb5_43{background:var(--ci-card-remove-bg,var(--bg-layer-2,#eef1f7));color:var(--ci-card-remove-color,var(--text-primary,#161b2d))}._removeBtnImage_ywrb5_43:hover{background:var(--ci-card-remove-bg-hover,var(--bg-layer-3,#fcfcfc))}._hoverDownloadIcon_ywrb5_51{background:var(--ci-card-hover-icon-bg,var(--bg-layer-2,#eef1f7));color:var(--ci-card-hover-icon-color,var(--text-primary,#161b2d))}.
|
|
1
|
+
._card_ywrb5_1{border-color:var(--ci-card-border,var(--stroke-secondary,#d1dbea));background:var(--ci-card-bg,var(--bg-layer-0,#fcfcfc))}._cardError_ywrb5_6{border-color:var(--ci-card-border-error,var(--stroke-error,#ae2f2f))}._cardSelected_ywrb5_10{background:var(--ci-card-bg-selected,var(--bg-accent-primary-alpha,#7da4ff2e));border-color:var(--ci-card-border-selected,var(--stroke-accent-primary,#124ace))}._cardPrompt_ywrb5_15:hover,._cardPasted_ywrb5_16:hover{background:var(--ci-card-bg-hover,var(--controls-bg-neutral-hover,#d1dbea))}._name_ywrb5_20{color:var(--ci-card-name,var(--text-primary,#161b2d))}._meta_ywrb5_24{color:var(--ci-card-meta,var(--text-secondary,#575f73))}._loadingOverlay_ywrb5_28{background:var(--ci-loading-overlay-bg,var(--bg-blackout,#0c101d4d))}._actionBtn_ywrb5_32{color:var(--ci-card-action-color,var(--text-primary,#161b2d))}._actionBtn_ywrb5_32:hover{background:var(--ci-card-remove-bg-hover,var(--bg-layer-3,#fcfcfc))}._card_ywrb5_1:focus-within{outline-color:var(--ci-card-focus-outline,var(--controls-stroke-focus,#eef1f7))}._removeBtnImage_ywrb5_43{background:var(--ci-card-remove-bg,var(--bg-layer-2,#eef1f7));color:var(--ci-card-remove-color,var(--text-primary,#161b2d))}._removeBtnImage_ywrb5_43:hover{background:var(--ci-card-remove-bg-hover,var(--bg-layer-3,#fcfcfc))}._hoverDownloadIcon_ywrb5_51{background:var(--ci-card-hover-icon-bg,var(--bg-layer-2,#eef1f7));color:var(--ci-card-hover-icon-color,var(--text-primary,#161b2d))}._tile_1l1lz_1{background:var(--ci-tile-bg,var(--bg-layer-3,#fcfcfc));border-color:var(--ci-tile-border,var(--stroke-secondary,#d1dbea))}._tile_1l1lz_1:hover{border-color:var(--ci-tile-border-hover,var(--stroke-hover-tint,#0000001f))}._tile_1l1lz_1:focus-visible{outline-color:var(--ci-tile-focus-outline,var(--controls-stroke-focus,#eef1f7))}._tileLight_1l1lz_12{background:var(--ci-tile-bg,var(--bg-layer-6,#f8fafc))}._tileError_1l1lz_16{background:var(--ci-tile-bg-error,var(--bg-error,#f3d6d8));border-color:var(--ci-tile-border-error,var(--stroke-error,#ae2f2f))}._tileError_1l1lz_16:hover{border-color:var(--ci-tile-border-error,var(--stroke-error,#ae2f2f))}._tileError_1l1lz_16 ._nameText_1l1lz_23,._tileError_1l1lz_16 ._typeText_1l1lz_24{color:var(--ci-tile-error-text,var(--text-error,#ae2f2f))}._nameText_1l1lz_23{color:var(--ci-tile-name-text,var(--text-primary,#161b2d))}._typeText_1l1lz_24{color:var(--ci-tile-type-text,var(--text-secondary,#575f73))}._retryIcon_1l1lz_36{color:var(--ci-tile-error-text,var(--text-error,#ae2f2f))}._hoverIcon_1l1lz_40{background:var(--ci-tile-hover-icon-bg,var(--bg-layer-2,#eef1f7));color:var(--ci-tile-hover-icon-color,var(--text-primary,#161b2d))}._track_1l1lz_45{background:var(--ci-tile-track-bg,var(--bg-layer-1,#e0e6f0))}._indeterminateFill_1l1lz_49{background:var(--ci-tile-fill-bg,var(--bg-accent-primary-fill,#5c8dea));animation:1.2s ease-in-out infinite _attachment-tile-indeterminate_1l1lz_1}@media (prefers-reduced-motion:reduce){._indeterminateFill_1l1lz_49{animation:none}}@keyframes _attachment-tile-indeterminate_1l1lz_1{0%{transform:translate(-100%)}to{transform:translate(300%)}}._tile_1s4d7_1{background:var(--ci-more-tile-bg,var(--bg-layer-2,#eef1f7));border-color:var(--ci-more-tile-border,var(--stroke-secondary,#d1dbea));color:var(--ci-more-tile-color,var(--text-secondary,#575f73))}._tile_1s4d7_1:hover{background:var(--ci-more-tile-bg-hover,var(--bg-accent-primary-alpha,#7da4ff2e));color:var(--ci-more-tile-color-hover,var(--text-accent-primary-hover,#2764d9));border-color:var(--ci-more-tile-border-hover,color-mix(in srgb, var(--stroke-accent-primary-hover,#7da4ff) 50%, transparent))}._tile_1s4d7_1:focus-visible{outline-color:var(--ci-more-tile-focus-outline,var(--controls-stroke-focus,#eef1f7))}._container_7fktb_1{background:var(--ci-group-bg,var(--bg-layer-2,#eef1f7));border-color:var(--ci-group-border,var(--stroke-secondary,#d1dbea))}._headerIcon_7fktb_6,._headerLabel_7fktb_7,._downloadAllButton_7fktb_8{color:var(--ci-group-text,var(--text-secondary,#575f73))}._imageTile_7fktb_12{--ci-card-bg:var(--bg-layer-3,#fcfcfc)}._overlay_wr7ez_1{background:var(--fd-bg,var(--bg-blackout,#0c101d4d))}._icon_wr7ez_5{color:var(--fd-icon,var(--text-accent-primary,#124ace))}._deniedIcon_wr7ez_9{color:var(--fd-denied-icon,var(--text-error,#ae2f2f))}
|
|
2
2
|
/*$vite$:1*/
|
package/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AttachmentErrorReason as e, AttachmentType as t, CodeBlockTheme as n, Highlight as r, MIME_TYPE_EXT_MAP as i, RequestStatus as a, buildCssVars as o, mergeClasses as s } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { DIAL_ICON_SIZE as c, DialGhostIconButton as l, DialSkeleton as u, DialSkeletonVariant as d, DialSpinner as f, ElementSize as p } from "@epam/ai-dial-ui-kit";
|
|
3
|
-
import { IconChevronUp as m, IconClipboard as h, IconDownload as g, IconFile as _, IconFileDescription as v, IconFileTypeBmp as y, IconFileTypeCss as b, IconFileTypeCsv as x, IconFileTypeDoc as
|
|
4
|
-
import { useCallback as
|
|
3
|
+
import { IconChevronUp as m, IconClipboard as h, IconDownload as g, IconFile as _, IconFileDescription as v, IconFileTypeBmp as y, IconFileTypeCss as b, IconFileTypeCsv as x, IconFileTypeDoc as ee, IconFileTypeDocx as te, 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 z, IconFileX as B, IconMusic as V, IconPaperclip as H, IconPhoto as U, IconReload as ne, IconTerminal2 as re, IconVideo as ie, IconX as ae } from "@tabler/icons-react";
|
|
4
|
+
import { useCallback as W, useEffect as G, useId as oe, useMemo as se, useRef as K, useState as ce } from "react";
|
|
5
5
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
6
6
|
//#region src/hooks/useLazyImageLoad.ts
|
|
7
7
|
var le = /* @__PURE__ */ function(e) {
|
|
8
8
|
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
9
9
|
}({}), ue = ({ enabled: e, src: t }) => {
|
|
10
|
-
let n =
|
|
11
|
-
return
|
|
10
|
+
let n = K(null), [r, i] = ce("idle");
|
|
11
|
+
return G(() => {
|
|
12
12
|
i(e && t ? "loading" : "idle");
|
|
13
|
-
}, [e, t]),
|
|
13
|
+
}, [e, t]), G(() => {
|
|
14
14
|
let r = n.current;
|
|
15
15
|
if (!r || !e || !t) return;
|
|
16
16
|
let a = () => i("loaded"), o = () => i("error");
|
|
@@ -61,54 +61,54 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
if (!e) return _;
|
|
62
62
|
if (e.startsWith("image/")) switch (e) {
|
|
63
63
|
case "image/jpeg":
|
|
64
|
-
case "image/jpg": return
|
|
65
|
-
case "image/png": return
|
|
66
|
-
case "image/svg+xml": return
|
|
64
|
+
case "image/jpg": return C;
|
|
65
|
+
case "image/png": return O;
|
|
66
|
+
case "image/svg+xml": return M;
|
|
67
67
|
case "image/bmp": return y;
|
|
68
|
-
default: return
|
|
68
|
+
default: return U;
|
|
69
69
|
}
|
|
70
|
-
if (e.startsWith("video/")) return
|
|
71
|
-
if (e.startsWith("audio/")) return
|
|
70
|
+
if (e.startsWith("video/")) return ie;
|
|
71
|
+
if (e.startsWith("audio/")) return V;
|
|
72
72
|
switch (e) {
|
|
73
|
-
case "application/pdf": return
|
|
73
|
+
case "application/pdf": return E;
|
|
74
74
|
case "application/msword":
|
|
75
|
-
case "application/vnd.ms-word": return
|
|
76
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return
|
|
77
|
-
case "application/vnd.ms-powerpoint": return
|
|
78
|
-
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return
|
|
79
|
-
case "application/vnd.ms-excel": return
|
|
80
|
-
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return
|
|
75
|
+
case "application/vnd.ms-word": return ee;
|
|
76
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return te;
|
|
77
|
+
case "application/vnd.ms-powerpoint": return k;
|
|
78
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return k;
|
|
79
|
+
case "application/vnd.ms-excel": return L;
|
|
80
|
+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return L;
|
|
81
81
|
case "application/zip":
|
|
82
82
|
case "application/x-zip-compressed":
|
|
83
83
|
case "application/x-rar-compressed":
|
|
84
84
|
case "application/x-7z-compressed":
|
|
85
85
|
case "application/gzip":
|
|
86
|
-
case "application/x-tar": return
|
|
86
|
+
case "application/x-tar": return z;
|
|
87
87
|
case "text/csv": return x;
|
|
88
|
-
case "text/plain": return
|
|
88
|
+
case "text/plain": return F;
|
|
89
89
|
case "text/html":
|
|
90
|
-
case "application/xhtml+xml": return
|
|
90
|
+
case "application/xhtml+xml": return S;
|
|
91
91
|
case "text/xml":
|
|
92
|
-
case "application/xml": return
|
|
92
|
+
case "application/xml": return R;
|
|
93
93
|
case "application/sql":
|
|
94
|
-
case "text/x-sql": return
|
|
94
|
+
case "text/x-sql": return j;
|
|
95
95
|
case "text/javascript":
|
|
96
|
-
case "application/javascript": return
|
|
97
|
-
case "text/jsx": return
|
|
96
|
+
case "application/javascript": return w;
|
|
97
|
+
case "text/jsx": return T;
|
|
98
98
|
case "application/typescript":
|
|
99
|
-
case "text/typescript": return
|
|
100
|
-
case "text/tsx": return
|
|
99
|
+
case "text/typescript": return N;
|
|
100
|
+
case "text/tsx": return P;
|
|
101
101
|
case "text/css": return b;
|
|
102
102
|
case "text/x-php":
|
|
103
|
-
case "application/x-php": return
|
|
103
|
+
case "application/x-php": return D;
|
|
104
104
|
case "text/x-rustsrc":
|
|
105
|
-
case "application/x-rust": return
|
|
106
|
-
case "text/x-vue": return
|
|
105
|
+
case "application/x-rust": return A;
|
|
106
|
+
case "text/x-vue": return I;
|
|
107
107
|
default: return _;
|
|
108
108
|
}
|
|
109
109
|
}, ye = (e) => {
|
|
110
110
|
let { type: n, contentType: r } = e;
|
|
111
|
-
return n === t.Prompt ?
|
|
111
|
+
return n === t.Prompt ? re : n === t.Pasted ? h : n === t.Image ? U : ve(r ?? "");
|
|
112
112
|
}, be = (e) => {
|
|
113
113
|
let t = e.toLowerCase().split(";")[0].trim(), n = i[t];
|
|
114
114
|
if (n) return n;
|
|
@@ -150,33 +150,45 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
150
150
|
layout: Z.Collapsed,
|
|
151
151
|
visibleCount: 4,
|
|
152
152
|
hiddenCount: e - 4
|
|
153
|
-
}, we = ({ attachment: n, searchQuery: i = "", onRemove: a, onRetry: m, onExpand: h, onClick: _, isSelected: v, shouldAlwaysShowActions: y, labels: b, typeLabels: x, styles:
|
|
154
|
-
let { removeLabel:
|
|
155
|
-
"--ci-card-border":
|
|
156
|
-
"--ci-card-bg":
|
|
157
|
-
"--ci-card-name":
|
|
158
|
-
"--ci-card-meta":
|
|
159
|
-
|
|
153
|
+
}, we = ({ attachment: n, searchQuery: i = "", onRemove: a, onRetry: m, onExpand: h, onClick: _, isSelected: v, shouldAlwaysShowActions: y, labels: b, typeLabels: x, styles: ee, showHoverDownloadIcon: te = !1, className: S }) => {
|
|
154
|
+
let { removeLabel: C = "Remove attachment", retryLabel: w = "Retry upload", clickLabel: T = "Open attachment", expandLabel: E = "Expand pasted text", loadingLabel: D = "Loading attachment", uploadFailedStatusLabel: O = "Upload failed" } = b ?? {}, { colors: k, typography: A, roundedClassName: j = "rounded-xl" } = ee ?? {}, { id: M, name: N } = n, P = n.previewUrl ?? n.url, F = n.type === t.Pasted, I = F && h !== void 0, L = se(() => F ? N : me(N), [F, N]), R = o({
|
|
155
|
+
"--ci-card-border": k?.border,
|
|
156
|
+
"--ci-card-bg": k?.background,
|
|
157
|
+
"--ci-card-name": k?.nameText,
|
|
158
|
+
"--ci-card-meta": k?.metaText,
|
|
159
|
+
"--ci-card-border-error": k?.borderError,
|
|
160
|
+
"--ci-card-bg-selected": k?.backgroundSelected,
|
|
161
|
+
"--ci-card-border-selected": k?.borderSelected,
|
|
162
|
+
"--ci-card-bg-hover": k?.backgroundHover,
|
|
163
|
+
"--ci-loading-overlay-bg": k?.loadingOverlayBackground,
|
|
164
|
+
"--ci-card-action-color": k?.actionColor,
|
|
165
|
+
"--ci-card-remove-bg-hover": k?.actionBackgroundHover,
|
|
166
|
+
"--ci-card-focus-outline": k?.focusOutline,
|
|
167
|
+
"--ci-card-remove-bg": k?.removeBackground,
|
|
168
|
+
"--ci-card-remove-color": k?.removeColor,
|
|
169
|
+
"--ci-card-hover-icon-bg": k?.hoverIconBackground,
|
|
170
|
+
"--ci-card-hover-icon-color": k?.hoverIconColor
|
|
171
|
+
}), { isLoading: z, isError: B, isImage: V, isAudio: H, areActionsVisible: re, BottomIcon: ie, typeLabel: W, cardColorClass: G, removeBtnClass: oe } = se(() => Se(n, v ?? !1, y ?? !1, x), [
|
|
160
172
|
n,
|
|
161
173
|
v,
|
|
162
174
|
y,
|
|
163
175
|
x
|
|
164
|
-
]),
|
|
165
|
-
enabled:
|
|
166
|
-
src:
|
|
176
|
+
]), K = _ !== void 0 && !I && !z && !B, ce = I || K, { imageRef: de, imageLoadStatus: fe } = ue({
|
|
177
|
+
enabled: V,
|
|
178
|
+
src: P
|
|
167
179
|
}), Z = () => {
|
|
168
|
-
|
|
180
|
+
I && h ? h(M) : K && _ && _(M);
|
|
169
181
|
}, pe = (e) => {
|
|
170
182
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), Z());
|
|
171
183
|
};
|
|
172
|
-
if (
|
|
173
|
-
style:
|
|
174
|
-
className: s("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3",
|
|
184
|
+
if (H) return /* @__PURE__ */ Y("div", {
|
|
185
|
+
style: R,
|
|
186
|
+
className: s("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3", j, G, S),
|
|
175
187
|
children: [/* @__PURE__ */ Y("div", {
|
|
176
188
|
className: "flex items-center justify-between gap-2",
|
|
177
189
|
children: [/* @__PURE__ */ J("span", {
|
|
178
190
|
title: n.name,
|
|
179
|
-
className: s(
|
|
191
|
+
className: s(A?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", X.name),
|
|
180
192
|
children: i ? /* @__PURE__ */ J(r, {
|
|
181
193
|
text: n.name,
|
|
182
194
|
query: i,
|
|
@@ -188,10 +200,10 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
188
200
|
"aria-hidden": !0
|
|
189
201
|
}),
|
|
190
202
|
size: p.Small,
|
|
191
|
-
className: s("h-6 w-6 shrink-0 rounded",
|
|
192
|
-
"aria-label":
|
|
203
|
+
className: s("h-6 w-6 shrink-0 rounded", oe),
|
|
204
|
+
"aria-label": T,
|
|
193
205
|
onClick: (e) => {
|
|
194
|
-
e.stopPropagation(), _(
|
|
206
|
+
e.stopPropagation(), _(M);
|
|
195
207
|
}
|
|
196
208
|
})]
|
|
197
209
|
}), n.playUrl && /* @__PURE__ */ J("audio", {
|
|
@@ -202,78 +214,78 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
202
214
|
preload: "metadata"
|
|
203
215
|
})]
|
|
204
216
|
});
|
|
205
|
-
let he = s("group relative flex h-[100px] w-[100px] flex-shrink-0 border focus-within:outline focus-within:outline-1 focus-within:outline-offset-1",
|
|
206
|
-
|
|
217
|
+
let he = s("group relative flex h-[100px] w-[100px] flex-shrink-0 border focus-within:outline focus-within:outline-1 focus-within:outline-offset-1", j, G, !V && "flex-col gap-3 p-3", ce && "cursor-pointer", S), ge = /* @__PURE__ */ Y(q, { children: [
|
|
218
|
+
V ? /* @__PURE__ */ Y("div", {
|
|
207
219
|
className: "relative h-full w-full overflow-hidden",
|
|
208
220
|
children: [fe !== le.Loaded && /* @__PURE__ */ J(u, {
|
|
209
221
|
variant: d.Rectangular,
|
|
210
222
|
width: "100%",
|
|
211
223
|
height: "100%",
|
|
212
224
|
active: fe === le.Loading,
|
|
213
|
-
overlay: /* @__PURE__ */ J(
|
|
225
|
+
overlay: /* @__PURE__ */ J(U, {
|
|
214
226
|
size: c.LG,
|
|
215
|
-
className:
|
|
227
|
+
className: A?.placeholderIconClassName ?? "text-secondary",
|
|
216
228
|
"aria-hidden": !0
|
|
217
229
|
}),
|
|
218
|
-
className: s("absolute inset-0",
|
|
230
|
+
className: s("absolute inset-0", j)
|
|
219
231
|
}), /* @__PURE__ */ J("img", {
|
|
220
232
|
ref: de,
|
|
221
|
-
src:
|
|
222
|
-
alt:
|
|
233
|
+
src: P,
|
|
234
|
+
alt: N,
|
|
223
235
|
loading: "lazy",
|
|
224
236
|
decoding: "async",
|
|
225
|
-
className: s("h-full w-full object-cover transition-opacity duration-200", fe === le.Loaded ? "opacity-100" : "opacity-0",
|
|
237
|
+
className: s("h-full w-full object-cover transition-opacity duration-200", fe === le.Loaded ? "opacity-100" : "opacity-0", j)
|
|
226
238
|
})]
|
|
227
|
-
}) :
|
|
239
|
+
}) : B ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y("div", {
|
|
228
240
|
className: "flex flex-row items-center gap-1 overflow-hidden",
|
|
229
|
-
children: [/* @__PURE__ */ J(
|
|
241
|
+
children: [/* @__PURE__ */ J(ie, {
|
|
230
242
|
size: c.SM,
|
|
231
243
|
className: s("shrink-0", X.meta),
|
|
232
244
|
"aria-hidden": !0
|
|
233
245
|
}), /* @__PURE__ */ J("span", {
|
|
234
|
-
title:
|
|
235
|
-
className: s(
|
|
236
|
-
children:
|
|
246
|
+
title: W,
|
|
247
|
+
className: s(A?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", X.meta),
|
|
248
|
+
children: W
|
|
237
249
|
})]
|
|
238
250
|
}), /* @__PURE__ */ J("div", {
|
|
239
251
|
className: "min-w-0 flex-1",
|
|
240
252
|
children: /* @__PURE__ */ J("div", {
|
|
241
|
-
title:
|
|
242
|
-
className: s(
|
|
253
|
+
title: L,
|
|
254
|
+
className: s(A?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", X.name),
|
|
243
255
|
children: i ? /* @__PURE__ */ J(r, {
|
|
244
|
-
text:
|
|
256
|
+
text: L,
|
|
245
257
|
query: i,
|
|
246
258
|
maxLines: 3
|
|
247
|
-
}) :
|
|
259
|
+
}) : L
|
|
248
260
|
})
|
|
249
261
|
})] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("div", {
|
|
250
262
|
className: "min-w-0 flex-1",
|
|
251
263
|
children: /* @__PURE__ */ J("div", {
|
|
252
|
-
title:
|
|
253
|
-
className: s(
|
|
264
|
+
title: L,
|
|
265
|
+
className: s(A?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", X.name),
|
|
254
266
|
children: i ? /* @__PURE__ */ J(r, {
|
|
255
|
-
text:
|
|
267
|
+
text: L,
|
|
256
268
|
query: i,
|
|
257
269
|
maxLines: 3
|
|
258
|
-
}) :
|
|
270
|
+
}) : L
|
|
259
271
|
})
|
|
260
272
|
}), /* @__PURE__ */ Y("div", {
|
|
261
273
|
className: "flex flex-row items-center gap-1 overflow-hidden",
|
|
262
|
-
children: [/* @__PURE__ */ J(
|
|
274
|
+
children: [/* @__PURE__ */ J(ie, {
|
|
263
275
|
size: c.SM,
|
|
264
276
|
className: s("shrink-0", X.meta),
|
|
265
277
|
"aria-hidden": !0
|
|
266
278
|
}), /* @__PURE__ */ J("span", {
|
|
267
|
-
title:
|
|
268
|
-
className: s(
|
|
269
|
-
children:
|
|
279
|
+
title: W,
|
|
280
|
+
className: s(A?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", X.meta),
|
|
281
|
+
children: W
|
|
270
282
|
})]
|
|
271
283
|
})] }),
|
|
272
|
-
|
|
273
|
-
className: s("absolute inset-0 flex items-center justify-center",
|
|
284
|
+
z && /* @__PURE__ */ J("span", {
|
|
285
|
+
className: s("absolute inset-0 flex items-center justify-center", j, X.loadingOverlay),
|
|
274
286
|
children: /* @__PURE__ */ J(f, {
|
|
275
287
|
size: 40,
|
|
276
|
-
ariaLabel:
|
|
288
|
+
ariaLabel: D,
|
|
277
289
|
className: "z-50"
|
|
278
290
|
})
|
|
279
291
|
}),
|
|
@@ -281,36 +293,36 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
281
293
|
role: "status",
|
|
282
294
|
"aria-live": "polite",
|
|
283
295
|
className: "sr-only",
|
|
284
|
-
children:
|
|
296
|
+
children: B ? O : ""
|
|
285
297
|
}),
|
|
286
|
-
!
|
|
287
|
-
className: s("absolute end-1 top-1 flex gap-1 transition-opacity",
|
|
298
|
+
!z && /* @__PURE__ */ Y("div", {
|
|
299
|
+
className: s("absolute end-1 top-1 flex gap-1 transition-opacity", re ? "opacity-100" : "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 mobile:opacity-100"),
|
|
288
300
|
children: [
|
|
289
|
-
|
|
290
|
-
icon: /* @__PURE__ */ J(
|
|
301
|
+
B && m && n.errorReason !== e.UnsupportedType && /* @__PURE__ */ J(l, {
|
|
302
|
+
icon: /* @__PURE__ */ J(ne, {
|
|
291
303
|
size: c.SM,
|
|
292
304
|
"aria-hidden": !0
|
|
293
305
|
}),
|
|
294
306
|
size: p.Small,
|
|
295
|
-
className: s("h-6 w-6 rounded",
|
|
296
|
-
"aria-label":
|
|
307
|
+
className: s("h-6 w-6 rounded", oe),
|
|
308
|
+
"aria-label": w,
|
|
297
309
|
onClick: (e) => {
|
|
298
|
-
e.stopPropagation(), m(
|
|
310
|
+
e.stopPropagation(), m(M);
|
|
299
311
|
}
|
|
300
312
|
}),
|
|
301
313
|
a && /* @__PURE__ */ J(l, {
|
|
302
|
-
icon: /* @__PURE__ */ J(
|
|
314
|
+
icon: /* @__PURE__ */ J(ae, {
|
|
303
315
|
size: c.SM,
|
|
304
316
|
"aria-hidden": !0
|
|
305
317
|
}),
|
|
306
318
|
size: p.Small,
|
|
307
|
-
className: s("h-6 w-6 rounded",
|
|
308
|
-
"aria-label":
|
|
319
|
+
className: s("h-6 w-6 rounded", oe),
|
|
320
|
+
"aria-label": C,
|
|
309
321
|
onClick: (e) => {
|
|
310
|
-
e.stopPropagation(), a?.(
|
|
322
|
+
e.stopPropagation(), a?.(M);
|
|
311
323
|
}
|
|
312
324
|
}),
|
|
313
|
-
|
|
325
|
+
te && !a && !B && /* @__PURE__ */ J(g, {
|
|
314
326
|
size: c.SM,
|
|
315
327
|
"aria-hidden": !0,
|
|
316
328
|
className: s("h-6 w-6 rounded-lg p-1", X.hoverDownloadIcon)
|
|
@@ -319,16 +331,16 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
319
331
|
})
|
|
320
332
|
] });
|
|
321
333
|
return ce ? /* @__PURE__ */ J("div", {
|
|
322
|
-
style:
|
|
334
|
+
style: R,
|
|
323
335
|
className: he,
|
|
324
336
|
onClick: Z,
|
|
325
337
|
onKeyDown: pe,
|
|
326
338
|
tabIndex: 0,
|
|
327
339
|
role: "button",
|
|
328
|
-
"aria-label":
|
|
340
|
+
"aria-label": K ? T : I ? E : void 0,
|
|
329
341
|
children: ge
|
|
330
342
|
}) : /* @__PURE__ */ J("div", {
|
|
331
|
-
style:
|
|
343
|
+
style: R,
|
|
332
344
|
className: he,
|
|
333
345
|
children: ge
|
|
334
346
|
});
|
|
@@ -355,125 +367,158 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
355
367
|
}, e.id))
|
|
356
368
|
});
|
|
357
369
|
}, Q = {
|
|
358
|
-
tile: "
|
|
359
|
-
tileLight: "
|
|
360
|
-
tileError: "
|
|
361
|
-
nameText: "
|
|
362
|
-
typeText: "
|
|
363
|
-
retryIcon: "
|
|
364
|
-
hoverIcon: "
|
|
365
|
-
track: "
|
|
366
|
-
indeterminateFill: "
|
|
367
|
-
"attachment-tile-indeterminate": "_attachment-tile-
|
|
370
|
+
tile: "_tile_1l1lz_1",
|
|
371
|
+
tileLight: "_tileLight_1l1lz_12",
|
|
372
|
+
tileError: "_tileError_1l1lz_16",
|
|
373
|
+
nameText: "_nameText_1l1lz_23",
|
|
374
|
+
typeText: "_typeText_1l1lz_24",
|
|
375
|
+
retryIcon: "_retryIcon_1l1lz_36",
|
|
376
|
+
hoverIcon: "_hoverIcon_1l1lz_40",
|
|
377
|
+
track: "_track_1l1lz_45",
|
|
378
|
+
indeterminateFill: "_indeterminateFill_1l1lz_49",
|
|
379
|
+
"attachment-tile-indeterminate": "_attachment-tile-indeterminate_1l1lz_1"
|
|
368
380
|
}, Ee = {
|
|
369
381
|
[e.Network]: "Upload failed · network error",
|
|
370
382
|
[e.UnsupportedType]: "Upload failed · unsupported file type"
|
|
371
|
-
}, De = ({ attachment: t, onClick: r, onRetry: i, labels:
|
|
372
|
-
let { clickLabel:
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
+
}, De = ({ attachment: t, onClick: r, onRetry: i, labels: u, typeLabels: d, styles: f, theme: m = n.Dark, className: h }) => {
|
|
384
|
+
let { clickLabel: _ = "Download attachment", retryLabel: v = "Retry upload", sizeLabel: y, uploadingLabel: b = "Uploading", errorReasonLabels: x, genericErrorLabel: ee = "Upload failed" } = u ?? {}, { nameClassName: te = "dial-caption-text", metaClassName: S = "dial-caption-text", colors: C } = f ?? {}, w = o({
|
|
385
|
+
"--ci-tile-bg": C?.background,
|
|
386
|
+
"--ci-tile-border": C?.border,
|
|
387
|
+
"--ci-tile-border-hover": C?.borderHover,
|
|
388
|
+
"--ci-tile-focus-outline": C?.focusOutline,
|
|
389
|
+
"--ci-tile-bg-error": C?.backgroundError,
|
|
390
|
+
"--ci-tile-border-error": C?.borderError,
|
|
391
|
+
"--ci-tile-error-text": C?.errorText,
|
|
392
|
+
"--ci-tile-name-text": C?.nameText,
|
|
393
|
+
"--ci-tile-type-text": C?.typeText,
|
|
394
|
+
"--ci-tile-hover-icon-bg": C?.hoverIconBackground,
|
|
395
|
+
"--ci-tile-hover-icon-color": C?.hoverIconColor,
|
|
396
|
+
"--ci-tile-track-bg": C?.trackBackground,
|
|
397
|
+
"--ci-tile-fill-bg": C?.fillBackground
|
|
398
|
+
}), { id: T, name: E, status: D, errorReason: O } = t, k = D === a.Loading, A = D === a.Error, j = oe(), M = A && (O && (x?.[O] ?? Ee[O]) || ee), { BottomIcon: N, typeLabel: P } = Se(t, !1, !1, d), F = !A && !k && r !== void 0, I = A && !!i && O !== e.UnsupportedType, L = F || I ? "pe-5" : void 0, R = () => {
|
|
399
|
+
F && r?.(t);
|
|
400
|
+
}, z = (e) => {
|
|
401
|
+
(e.key === "Enter" || e.key === " ") && F && (e.preventDefault(), R());
|
|
402
|
+
}, B = s("group relative flex size-[84px] flex-col justify-between gap-1 overflow-hidden rounded-xl border p-1.5", Q.tile, !A && m === n.Light && Q.tileLight, A && Q.tileError), V = /* @__PURE__ */ J("div", {
|
|
403
|
+
title: E,
|
|
404
|
+
className: s(te, "line-clamp-2 min-w-0 break-words", Q.nameText, !A && L),
|
|
405
|
+
children: E
|
|
406
|
+
}), H = /* @__PURE__ */ Y("div", {
|
|
407
|
+
className: s("flex items-center gap-1 overflow-hidden", A && L),
|
|
408
|
+
children: [/* @__PURE__ */ J(N, {
|
|
383
409
|
size: 16,
|
|
384
410
|
className: Q.typeText,
|
|
385
411
|
"aria-hidden": !0
|
|
386
412
|
}), /* @__PURE__ */ J("span", {
|
|
387
|
-
className: s(
|
|
388
|
-
children:
|
|
413
|
+
className: s(S, "truncate", Q.typeText),
|
|
414
|
+
children: y ? `${P} · ${y}` : P
|
|
389
415
|
})]
|
|
390
|
-
}),
|
|
391
|
-
|
|
392
|
-
|
|
416
|
+
}), U = /* @__PURE__ */ Y(q, { children: [
|
|
417
|
+
A ? /* @__PURE__ */ Y(q, { children: [H, V] }) : /* @__PURE__ */ Y(q, { children: [V, H] }),
|
|
418
|
+
k && /* @__PURE__ */ J("div", {
|
|
393
419
|
role: "progressbar",
|
|
394
|
-
"aria-label":
|
|
420
|
+
"aria-label": b,
|
|
395
421
|
className: s("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", Q.track),
|
|
396
422
|
children: /* @__PURE__ */ J("div", { className: s("h-full w-1/3 rounded-full", Q.indeterminateFill) })
|
|
397
423
|
}),
|
|
398
|
-
|
|
424
|
+
F && /* @__PURE__ */ J(g, {
|
|
399
425
|
size: c.SM,
|
|
400
426
|
"aria-hidden": !0,
|
|
401
427
|
className: s("absolute end-1 top-1 h-6 w-6 rounded-lg p-1 opacity-0 transition-opacity group-hover:opacity-100 mobile:opacity-100", Q.hoverIcon)
|
|
402
428
|
}),
|
|
403
|
-
|
|
404
|
-
icon: /* @__PURE__ */ J(
|
|
429
|
+
I && /* @__PURE__ */ J(l, {
|
|
430
|
+
icon: /* @__PURE__ */ J(ne, {
|
|
405
431
|
size: c.SM,
|
|
406
432
|
"aria-hidden": !0
|
|
407
433
|
}),
|
|
408
434
|
size: p.Small,
|
|
409
435
|
className: s("absolute end-1 top-1 h-6 w-6 rounded-lg", Q.retryIcon),
|
|
410
|
-
"aria-label":
|
|
411
|
-
"aria-describedby":
|
|
436
|
+
"aria-label": v,
|
|
437
|
+
"aria-describedby": M ? j : void 0,
|
|
412
438
|
onClick: (e) => {
|
|
413
|
-
e.stopPropagation(), i(
|
|
439
|
+
e.stopPropagation(), i(T);
|
|
414
440
|
}
|
|
415
441
|
}),
|
|
416
|
-
|
|
417
|
-
id:
|
|
442
|
+
A && /* @__PURE__ */ J("span", {
|
|
443
|
+
id: j,
|
|
418
444
|
role: "status",
|
|
419
445
|
"aria-live": "polite",
|
|
420
446
|
className: "sr-only",
|
|
421
|
-
children:
|
|
447
|
+
children: M
|
|
422
448
|
})
|
|
423
449
|
] });
|
|
424
450
|
return /* @__PURE__ */ J("div", {
|
|
425
|
-
className: s("inline-flex",
|
|
426
|
-
children:
|
|
451
|
+
className: s("inline-flex", h),
|
|
452
|
+
children: F ? /* @__PURE__ */ J("div", {
|
|
427
453
|
role: "button",
|
|
428
454
|
tabIndex: 0,
|
|
429
|
-
"aria-label":
|
|
430
|
-
onClick:
|
|
431
|
-
onKeyDown:
|
|
432
|
-
|
|
433
|
-
|
|
455
|
+
"aria-label": _,
|
|
456
|
+
onClick: R,
|
|
457
|
+
onKeyDown: z,
|
|
458
|
+
style: w,
|
|
459
|
+
className: s(B, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
|
|
460
|
+
children: U
|
|
434
461
|
}) : /* @__PURE__ */ J("div", {
|
|
435
|
-
className:
|
|
436
|
-
title:
|
|
437
|
-
role:
|
|
438
|
-
"aria-describedby":
|
|
439
|
-
tabIndex:
|
|
440
|
-
|
|
462
|
+
className: B,
|
|
463
|
+
title: M || void 0,
|
|
464
|
+
role: A ? "group" : void 0,
|
|
465
|
+
"aria-describedby": A ? j : void 0,
|
|
466
|
+
tabIndex: A ? 0 : void 0,
|
|
467
|
+
style: w,
|
|
468
|
+
children: U
|
|
469
|
+
})
|
|
470
|
+
});
|
|
471
|
+
}, Oe = { tile: "_tile_1s4d7_1" }, ke = ({ count: e, onClick: t, ariaLabel: n, children: r, fontClassName: i = "dial-small-semi-text", className: a, colors: c }) => {
|
|
472
|
+
let l = o({
|
|
473
|
+
"--ci-more-tile-bg": c?.background,
|
|
474
|
+
"--ci-more-tile-border": c?.border,
|
|
475
|
+
"--ci-more-tile-color": c?.color,
|
|
476
|
+
"--ci-more-tile-bg-hover": c?.backgroundHover,
|
|
477
|
+
"--ci-more-tile-color-hover": c?.colorHover,
|
|
478
|
+
"--ci-more-tile-border-hover": c?.borderHover,
|
|
479
|
+
"--ci-more-tile-focus-outline": c?.focusOutline
|
|
480
|
+
});
|
|
481
|
+
return /* @__PURE__ */ J("button", {
|
|
482
|
+
type: "button",
|
|
483
|
+
onClick: t,
|
|
484
|
+
"aria-label": n ?? `Show ${e} more attachments`,
|
|
485
|
+
style: l,
|
|
486
|
+
className: s("flex size-[84px] items-center justify-center rounded-xl border", i, Oe.tile, a),
|
|
487
|
+
children: r ?? /* @__PURE__ */ J("bdi", {
|
|
488
|
+
dir: "ltr",
|
|
489
|
+
children: `+${e}`
|
|
441
490
|
})
|
|
442
491
|
});
|
|
443
|
-
},
|
|
444
|
-
type: "button",
|
|
445
|
-
onClick: t,
|
|
446
|
-
"aria-label": n ?? `Show ${e} more attachments`,
|
|
447
|
-
className: s("flex size-[84px] items-center justify-center rounded-xl border", i, Oe.tile, a),
|
|
448
|
-
children: r ?? /* @__PURE__ */ J("bdi", {
|
|
449
|
-
dir: "ltr",
|
|
450
|
-
children: `+${e}`
|
|
451
|
-
})
|
|
452
|
-
}), $ = {
|
|
492
|
+
}, $ = {
|
|
453
493
|
container: "_container_7fktb_1",
|
|
454
494
|
headerIcon: "_headerIcon_7fktb_6",
|
|
455
495
|
headerLabel: "_headerLabel_7fktb_7",
|
|
456
496
|
downloadAllButton: "_downloadAllButton_7fktb_8",
|
|
457
497
|
imageTile: "_imageTile_7fktb_12"
|
|
458
|
-
}, Ae = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, je = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel:
|
|
459
|
-
let { ariaLabel:
|
|
498
|
+
}, Ae = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, je = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel: u, labels: d, typeLabels: f, styles: p, theme: h, className: v }) => {
|
|
499
|
+
let { ariaLabel: y = "Attachments", clickLabel: b = "Download attachment", retryLabel: x = "Retry upload", showLessLabel: ee = "Show less", downloadAllLabel: te = "Download all", getHeaderLabel: S = (e) => Ae(e, "attachment") } = d ?? {}, { headerLabelClassName: C = "dial-tiny-semi-text", colors: w } = p ?? {}, T = o({
|
|
500
|
+
"--ci-group-bg": w?.background,
|
|
501
|
+
"--ci-group-border": w?.border,
|
|
502
|
+
"--ci-group-text": w?.text
|
|
503
|
+
}), [E, D] = ce(!1), O = se(() => Ce(e.length, E), [e.length, E]);
|
|
460
504
|
if (e.length === 0) return null;
|
|
461
|
-
let
|
|
505
|
+
let k = e.some((e) => e.type === t.Image), A = e.some((e) => e.type !== t.Image), j = k && A, M = e.length >= 5, N = j ? H : k ? U : _, P = S(e.length), F = e.slice(0, O.visibleCount);
|
|
462
506
|
return /* @__PURE__ */ Y("div", {
|
|
463
507
|
role: "group",
|
|
464
|
-
"aria-label":
|
|
465
|
-
|
|
508
|
+
"aria-label": y,
|
|
509
|
+
style: T,
|
|
510
|
+
className: s("rounded-2xl border p-3", M ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", $.container, v),
|
|
466
511
|
children: [/* @__PURE__ */ Y("div", {
|
|
467
512
|
className: "mb-3 flex min-h-6 items-center gap-2",
|
|
468
513
|
children: [
|
|
469
|
-
/* @__PURE__ */ J(
|
|
514
|
+
/* @__PURE__ */ J(N, {
|
|
470
515
|
size: c.SM,
|
|
471
516
|
className: s("shrink-0", $.headerIcon),
|
|
472
517
|
"aria-hidden": !0
|
|
473
518
|
}),
|
|
474
519
|
/* @__PURE__ */ J("span", {
|
|
475
|
-
className: s(
|
|
476
|
-
children:
|
|
520
|
+
className: s(C, $.headerLabel),
|
|
521
|
+
children: P
|
|
477
522
|
}),
|
|
478
523
|
e.length >= 2 && (r || n) && /* @__PURE__ */ J(l, {
|
|
479
524
|
icon: /* @__PURE__ */ J(g, {
|
|
@@ -481,7 +526,7 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
481
526
|
"aria-hidden": !0
|
|
482
527
|
}),
|
|
483
528
|
className: s("ms-auto h-6 w-6 rounded-lg", $.downloadAllButton),
|
|
484
|
-
"aria-label":
|
|
529
|
+
"aria-label": te,
|
|
485
530
|
onClick: () => {
|
|
486
531
|
let t = e.filter((e) => e.status === a.Idle);
|
|
487
532
|
r ? r(t) : t.forEach((e) => n?.(e));
|
|
@@ -490,20 +535,20 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
490
535
|
]
|
|
491
536
|
}), /* @__PURE__ */ Y("div", {
|
|
492
537
|
role: "list",
|
|
493
|
-
"aria-label":
|
|
494
|
-
className: s("gap-3",
|
|
538
|
+
"aria-label": P,
|
|
539
|
+
className: s("gap-3", M ? "grid grid-cols-[repeat(5,84px)] overflow-x-auto" : "flex flex-wrap"),
|
|
495
540
|
children: [
|
|
496
|
-
|
|
541
|
+
F.map((e) => /* @__PURE__ */ J("div", {
|
|
497
542
|
role: "listitem",
|
|
498
543
|
children: e.type === t.Image ? /* @__PURE__ */ J(we, {
|
|
499
544
|
attachment: e,
|
|
500
545
|
onClick: n ? () => n(e) : void 0,
|
|
501
546
|
onRetry: i,
|
|
502
547
|
labels: {
|
|
503
|
-
clickLabel:
|
|
504
|
-
retryLabel:
|
|
548
|
+
clickLabel: b,
|
|
549
|
+
retryLabel: x
|
|
505
550
|
},
|
|
506
|
-
typeLabels:
|
|
551
|
+
typeLabels: f,
|
|
507
552
|
styles: { roundedClassName: "rounded-xl" },
|
|
508
553
|
showHoverDownloadIcon: !0,
|
|
509
554
|
className: s("size-[84px]", $.imageTile)
|
|
@@ -512,27 +557,27 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
512
557
|
onClick: n,
|
|
513
558
|
onRetry: i,
|
|
514
559
|
labels: {
|
|
515
|
-
clickLabel:
|
|
516
|
-
retryLabel:
|
|
517
|
-
sizeLabel:
|
|
560
|
+
clickLabel: b,
|
|
561
|
+
retryLabel: x,
|
|
562
|
+
sizeLabel: u?.(e)
|
|
518
563
|
},
|
|
519
|
-
typeLabels:
|
|
520
|
-
theme:
|
|
564
|
+
typeLabels: f,
|
|
565
|
+
theme: h
|
|
521
566
|
})
|
|
522
567
|
}, e.id)),
|
|
523
|
-
|
|
568
|
+
O.layout === Z.Collapsed && /* @__PURE__ */ J("div", {
|
|
524
569
|
role: "listitem",
|
|
525
570
|
children: /* @__PURE__ */ J(ke, {
|
|
526
|
-
count:
|
|
527
|
-
onClick: () =>
|
|
571
|
+
count: O.hiddenCount,
|
|
572
|
+
onClick: () => D(!0)
|
|
528
573
|
})
|
|
529
574
|
}),
|
|
530
|
-
|
|
575
|
+
M && E && /* @__PURE__ */ J("div", {
|
|
531
576
|
role: "listitem",
|
|
532
577
|
children: /* @__PURE__ */ J(ke, {
|
|
533
578
|
count: 0,
|
|
534
|
-
onClick: () =>
|
|
535
|
-
ariaLabel:
|
|
579
|
+
onClick: () => D(!1),
|
|
580
|
+
ariaLabel: ee,
|
|
536
581
|
children: /* @__PURE__ */ J(m, {
|
|
537
582
|
size: c.MD,
|
|
538
583
|
"aria-hidden": !0
|
|
@@ -555,7 +600,7 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
555
600
|
"--fd-denied-icon": a?.deniedIcon
|
|
556
601
|
}), f = n ?? (t ? "Attach files" : "No attachments allowed"), p = r ?? (t ? "Drop files here to attach them to message" : "Attachments can't be added to message"), m = t ? Me.icon : Me.deniedIcon, h = (e) => {
|
|
557
602
|
e.preventDefault();
|
|
558
|
-
}, g = t ? v :
|
|
603
|
+
}, g = t ? v : B;
|
|
559
604
|
return /* @__PURE__ */ J("div", {
|
|
560
605
|
role: "status",
|
|
561
606
|
"aria-live": "polite",
|
|
@@ -584,7 +629,7 @@ var le = /* @__PURE__ */ function(e) {
|
|
|
584
629
|
});
|
|
585
630
|
}, Pe = (e, n, r = {}) => {
|
|
586
631
|
let { screenshotName: i = "Screenshot.png", pastedTextName: o = "Pasted text" } = r;
|
|
587
|
-
return { handlePaste:
|
|
632
|
+
return { handlePaste: W((r) => {
|
|
588
633
|
if (!r.clipboardData) return;
|
|
589
634
|
let s = Array.from(r.clipboardData.items).filter((e) => e.kind === "file" && e.type.startsWith("image/")), c = r.clipboardData.getData("text/plain").length > 0;
|
|
590
635
|
if (s.length > 0 && !c) {
|
|
@@ -40,6 +40,30 @@ export interface AttachmentCardColors {
|
|
|
40
40
|
nameText?: string;
|
|
41
41
|
/** Meta (type / label) text color. */
|
|
42
42
|
metaText?: string;
|
|
43
|
+
/** Card border color in the error state. */
|
|
44
|
+
borderError?: string;
|
|
45
|
+
/** Card background color in the selected state. */
|
|
46
|
+
backgroundSelected?: string;
|
|
47
|
+
/** Card border color in the selected state. */
|
|
48
|
+
borderSelected?: string;
|
|
49
|
+
/** Card background color on hover (prompt/pasted cards). */
|
|
50
|
+
backgroundHover?: string;
|
|
51
|
+
/** Loading overlay background color. */
|
|
52
|
+
loadingOverlayBackground?: string;
|
|
53
|
+
/** Action button (remove/retry/download) icon color. */
|
|
54
|
+
actionColor?: string;
|
|
55
|
+
/** Action button background color on hover. */
|
|
56
|
+
actionBackgroundHover?: string;
|
|
57
|
+
/** Focus outline color. */
|
|
58
|
+
focusOutline?: string;
|
|
59
|
+
/** Remove/retry button background color. */
|
|
60
|
+
removeBackground?: string;
|
|
61
|
+
/** Remove/retry button icon color. */
|
|
62
|
+
removeColor?: string;
|
|
63
|
+
/** Hover download icon background color. */
|
|
64
|
+
hoverIconBackground?: string;
|
|
65
|
+
/** Hover download icon color. */
|
|
66
|
+
hoverIconColor?: string;
|
|
43
67
|
}
|
|
44
68
|
/** Typography overrides for the `AttachmentCard` component. */
|
|
45
69
|
export interface AttachmentCardTypography {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-card.d.ts","sourceRoot":"","sources":["../../src/models/attachment-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,wGAAwG;AACxG,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oGAAoG;AACpG,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAAC;IACjB,6FAA6F;IAC7F,iBAAiB,EAAE,OAAO,CAAC;IAC3B,yDAAyD;IACzD,UAAU,EAAE,IAAI,CAAC;IACjB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,cAAc,EAAE,MAAM,CAAC;IACvB,sFAAsF;IACtF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment-card.d.ts","sourceRoot":"","sources":["../../src/models/attachment-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,wGAAwG;AACxG,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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AAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,gGAAgG;IAChG,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,8FAA8F;IAC9F,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,0FAA0F;IAC1F,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -15,12 +15,43 @@ export interface AttachmentFileRowLabels {
|
|
|
15
15
|
/** Fallback error title used when `errorReason` is absent or has no entry in `errorReasonLabels`. Defaults to `'Upload failed'`. */
|
|
16
16
|
genericErrorLabel?: string;
|
|
17
17
|
}
|
|
18
|
+
/** CSS custom-property overrides for the `AttachmentFileRow` component. */
|
|
19
|
+
export interface AttachmentFileRowColors {
|
|
20
|
+
/** Tile background color in the default state. */
|
|
21
|
+
background?: string;
|
|
22
|
+
/** Tile border color in the default state. */
|
|
23
|
+
border?: string;
|
|
24
|
+
/** Tile border color on hover. */
|
|
25
|
+
borderHover?: string;
|
|
26
|
+
/** Tile focus outline color. */
|
|
27
|
+
focusOutline?: string;
|
|
28
|
+
/** Tile background color in the error state. */
|
|
29
|
+
backgroundError?: string;
|
|
30
|
+
/** Tile border color in the error state. */
|
|
31
|
+
borderError?: string;
|
|
32
|
+
/** File name/type text color in the error state. */
|
|
33
|
+
errorText?: string;
|
|
34
|
+
/** File name text color. */
|
|
35
|
+
nameText?: string;
|
|
36
|
+
/** Type/meta text color. */
|
|
37
|
+
typeText?: string;
|
|
38
|
+
/** Hover download icon background color. */
|
|
39
|
+
hoverIconBackground?: string;
|
|
40
|
+
/** Hover download icon color. */
|
|
41
|
+
hoverIconColor?: string;
|
|
42
|
+
/** Upload progress track background color. */
|
|
43
|
+
trackBackground?: string;
|
|
44
|
+
/** Upload progress indeterminate fill color. */
|
|
45
|
+
fillBackground?: string;
|
|
46
|
+
}
|
|
18
47
|
/** Style overrides for the `AttachmentFileRow` component. */
|
|
19
48
|
export interface AttachmentFileRowStyles {
|
|
20
49
|
/** Typography class applied to the file name text. Defaults to `'dial-caption-text'`. */
|
|
21
50
|
nameClassName?: string;
|
|
22
51
|
/** Typography class applied to the bottom meta label (file type / status). Defaults to `'dial-caption-text'`. */
|
|
23
52
|
metaClassName?: string;
|
|
53
|
+
/** Color overrides applied as CSS custom properties. */
|
|
54
|
+
colors?: AttachmentFileRowColors;
|
|
24
55
|
}
|
|
25
56
|
/** Props accepted by the `AttachmentFileRow` component. */
|
|
26
57
|
export interface AttachmentFileRowProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-file-row.d.ts","sourceRoot":"","sources":["../../src/models/attachment-file-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2KAA2K;IAC3K,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gJAAgJ;IAChJ,iBAAiB,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,oIAAoI;IACpI,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,MAAM,WAAW,uBAAuB;IACtC,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iHAAiH;IACjH,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment-file-row.d.ts","sourceRoot":"","sources":["../../src/models/attachment-file-row.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2KAA2K;IAC3K,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gJAAgJ;IAChJ,iBAAiB,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,oIAAoI;IACpI,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,2EAA2E;AAC3E,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,WAAW,CAAC,E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
+
/** CSS custom-property overrides for the `AttachmentGroup` component. */
|
|
41
|
+
export interface AttachmentGroupColors {
|
|
42
|
+
/** Group container background color. */
|
|
43
|
+
background?: string;
|
|
44
|
+
/** Group container border color. */
|
|
45
|
+
border?: string;
|
|
46
|
+
/** Header icon/label/download-all button text color. */
|
|
47
|
+
text?: string;
|
|
48
|
+
}
|
|
40
49
|
/** Style overrides for the `AttachmentGroup` component. */
|
|
41
50
|
export interface AttachmentGroupStyles {
|
|
42
51
|
/** Typography class applied to the header's attachment-count label. Defaults to `'dial-tiny-semi-text'`. */
|
|
43
52
|
headerLabelClassName?: string;
|
|
53
|
+
/** Color overrides applied as CSS custom properties. */
|
|
54
|
+
colors?: AttachmentGroupColors;
|
|
44
55
|
}
|
|
45
56
|
/** Props accepted by the `AttachmentGroup` component. */
|
|
46
57
|
export interface AttachmentGroupProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-group.d.ts","sourceRoot":"","sources":["../../src/models/attachment-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,6FAA6F;AAC7F,oBAAY,qBAAqB;IAC/B,sBAAsB;IACtB,IAAI,SAAS;IACb,mEAAmE;IACnE,UAAU,gBAAgB;IAC1B,oFAAoF;IACpF,SAAS,cAAc;CACxB;AAED,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,MAAM,EAAE,qBAAqB,CAAC;IAC9B,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oIAAoI;IACpI,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6HAA6H;IAC7H,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5C;AAED,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IACpC,4GAA4G;IAC5G,oBAAoB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment-group.d.ts","sourceRoot":"","sources":["../../src/models/attachment-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,6FAA6F;AAC7F,oBAAY,qBAAqB;IAC/B,sBAAsB;IACtB,IAAI,SAAS;IACb,mEAAmE;IACnE,UAAU,gBAAgB;IAC1B,oFAAoF;IACpF,SAAS,cAAc;CACxB;AAED,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,MAAM,EAAE,qBAAqB,CAAC;IAC9B,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oIAAoI;IACpI,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6HAA6H;IAC7H,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EA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
|
+
export interface AttachmentMoreTileColors {
|
|
4
|
+
/** Tile background color in the default state. */
|
|
5
|
+
background?: string;
|
|
6
|
+
/** Tile border color in the default state. */
|
|
7
|
+
border?: string;
|
|
8
|
+
/** Tile text/icon color in the default state. */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Tile background color on hover. */
|
|
11
|
+
backgroundHover?: string;
|
|
12
|
+
/** Tile text/icon color on hover. */
|
|
13
|
+
colorHover?: string;
|
|
14
|
+
/** Tile border color on hover. */
|
|
15
|
+
borderHover?: string;
|
|
16
|
+
/** Tile focus outline color. */
|
|
17
|
+
focusOutline?: string;
|
|
18
|
+
}
|
|
2
19
|
/** Props accepted by the `AttachmentMoreTile` component. */
|
|
3
20
|
export interface AttachmentMoreTileProps {
|
|
4
21
|
/** Number of additional, not-yet-visible attachments. Only used for the default `"+N"` content/label. */
|
|
@@ -16,5 +33,7 @@ export interface AttachmentMoreTileProps {
|
|
|
16
33
|
fontClassName?: string;
|
|
17
34
|
/** Extra class name(s) merged onto the root element. */
|
|
18
35
|
className?: string;
|
|
36
|
+
/** Color overrides applied as CSS custom properties. */
|
|
37
|
+
colors?: AttachmentMoreTileColors;
|
|
19
38
|
}
|
|
20
39
|
//# sourceMappingURL=attachment-more-tile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-more-tile.d.ts","sourceRoot":"","sources":["../../src/models/attachment-more-tile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,4DAA4D;AAC5D,MAAM,WAAW,uBAAuB;IACtC,yGAAyG;IACzG,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sGAAsG;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"attachment-more-tile.d.ts","sourceRoot":"","sources":["../../src/models/attachment-more-tile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,4EAA4E;AAC5E,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,uBAAuB;IACtC,yGAAyG;IACzG,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sGAAsG;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC"}
|
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.
|
|
4
|
+
"version": "1.0.0-dev.503",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@epam/ai-dial-chat-shared": "1.0.0-dev.
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.0.0-dev.503",
|
|
21
21
|
"@epam/ai-dial-ui-kit": "0.12.0-dev.28",
|
|
22
22
|
"@tabler/icons-react": "^3.44.0",
|
|
23
23
|
"react": "^19.0.0"
|