@layers-app/shared 0.4.3 → 0.4.5
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/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
- package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
- package/dist/components/Chat/CallMessage/index.d.ts +21 -0
- package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/CallMessage/index.js +49 -0
- package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
- package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
- package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatBubble/index.js +32 -0
- package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
- package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
- package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatHeader/index.js +78 -0
- package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
- package/dist/components/Chat/ChatInput/index.d.ts +46 -0
- package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatInput/index.js +228 -0
- package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
- package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
- package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatLayout/index.js +43 -0
- package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
- package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
- package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatMessage/index.js +188 -0
- package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
- package/dist/components/Chat/ChatPill/index.d.ts +12 -0
- package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
- package/dist/components/Chat/ChatPill/index.js +21 -0
- package/dist/components/Chat/DayMeta/index.d.ts +11 -0
- package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
- package/dist/components/Chat/DayMeta/index.js +9 -0
- package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
- package/dist/components/Chat/DialogItem/index.d.ts +41 -0
- package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
- package/dist/components/Chat/DialogItem/index.js +107 -0
- package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
- package/dist/components/Chat/DialogList/index.d.ts +11 -0
- package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
- package/dist/components/Chat/DialogList/index.js +19 -0
- package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
- package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
- package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
- package/dist/components/Chat/MediaDocument/index.js +73 -0
- package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
- package/dist/components/Chat/MessageActions/index.d.ts +16 -0
- package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageActions/index.js +65 -0
- package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
- package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageAuthor/index.js +36 -0
- package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
- package/dist/components/Chat/MessageForward/index.d.ts +13 -0
- package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageForward/index.js +30 -0
- package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
- package/dist/components/Chat/MessageList/index.d.ts +12 -0
- package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageList/index.js +71 -0
- package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
- package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
- package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageMeta/index.js +33 -0
- package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
- package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
- package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageReactions/index.js +40 -0
- package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
- package/dist/components/Chat/MessageReply/index.d.ts +15 -0
- package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageReply/index.js +40 -0
- package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
- package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
- package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
- package/dist/components/Chat/MessageStatus/index.js +53 -0
- package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
- package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
- package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
- package/dist/components/Chat/ServiceMessage/index.js +21 -0
- package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
- package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
- package/dist/components/Chat/UnreadSeparator/index.js +13 -0
- package/dist/components/Chat/colors.d.ts +7 -0
- package/dist/components/Chat/colors.d.ts.map +1 -0
- package/dist/components/Chat/colors.js +30 -0
- package/dist/components/Chat/icons.d.ts +9 -0
- package/dist/components/Chat/icons.d.ts.map +1 -0
- package/dist/components/Chat/icons.js +49 -0
- package/dist/components/Chat/index.d.ts +24 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Chat/mock-data.d.ts +32 -0
- package/dist/components/Chat/mock-data.d.ts.map +1 -0
- package/dist/components/Chat/types.d.ts +159 -0
- package/dist/components/Chat/types.d.ts.map +1 -0
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +53 -54
- package/dist/components/CommentComposer/types.js +9 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +8 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +36 -27
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +135 -161
- package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
- package/dist/components/FilePicker/FilePickerGallery.js +13 -13
- package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
- package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
- package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +55 -47
- package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +42 -42
- package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -1
- package/dist/components/MusicPlayerBar/components/VolumePopover.js +22 -20
- package/dist/components/PillTabs/PillTabs.d.ts +19 -0
- package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
- package/dist/components/PillTabs/PillTabs.js +50 -0
- package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
- package/dist/components/modals/RemoveConfirmModal.js +1 -1
- package/dist/hooks/useOfficePreviewAvailable.d.ts +2 -0
- package/dist/hooks/useOfficePreviewAvailable.d.ts.map +1 -0
- package/dist/hooks/useOfficePreviewAvailable.js +20 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +573 -520
- package/dist/lang/locales/ui_en.json.js +5 -5
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageActionsProps {
|
|
3
|
+
onReaction?: (emoji: string) => void;
|
|
4
|
+
onReply?: () => void;
|
|
5
|
+
onEdit?: () => void;
|
|
6
|
+
onDelete?: () => void;
|
|
7
|
+
onCopy?: () => void;
|
|
8
|
+
onForward?: () => void;
|
|
9
|
+
onPin?: () => void;
|
|
10
|
+
showEdit?: boolean;
|
|
11
|
+
showDelete?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare const MessageActions: React.NamedExoticComponent<MessageActionsProps>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageActions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAiBxC,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,iDAwFzB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import b, { useState as v } from "react";
|
|
3
|
+
import { Group as y, ActionIcon as d, Menu as i } from "@mantine/core";
|
|
4
|
+
import { SmileIcon as j, LinkBackwardIcon as w, MoreVerticalIcon as A, Copy01Icon as x, Share08Icon as $, PinIcon as B, Edit02Icon as E, Delete02Icon as O } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as o } from "@hugeicons/react";
|
|
6
|
+
import { EmojiPicker as P } from "../../EmojiPicker/EmojiPicker.js";
|
|
7
|
+
import { IconEntity as _ } from "../../ProjectIcon/ProjectIcon.js";
|
|
8
|
+
import D from "./MessageActions.module.css.js";
|
|
9
|
+
const G = b.memo(function({
|
|
10
|
+
onReaction: r,
|
|
11
|
+
onReply: m,
|
|
12
|
+
onEdit: t,
|
|
13
|
+
onDelete: c,
|
|
14
|
+
onCopy: s,
|
|
15
|
+
onForward: a,
|
|
16
|
+
onPin: l,
|
|
17
|
+
showEdit: h,
|
|
18
|
+
showDelete: p,
|
|
19
|
+
className: f,
|
|
20
|
+
style: I
|
|
21
|
+
}) {
|
|
22
|
+
const [g, z] = v(!1), k = !!(t || c || s || a || l || h || p), S = (u) => {
|
|
23
|
+
if (!r) return;
|
|
24
|
+
const C = _.parse(u);
|
|
25
|
+
r(C?.emoji ?? u);
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ e(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: `${D.root}${f ? ` ${f}` : ""}`,
|
|
31
|
+
style: I,
|
|
32
|
+
"data-testid": "message-actions",
|
|
33
|
+
children: /* @__PURE__ */ n(y, { gap: 2, wrap: "nowrap", children: [
|
|
34
|
+
r && /* @__PURE__ */ e(
|
|
35
|
+
P,
|
|
36
|
+
{
|
|
37
|
+
onChange: S,
|
|
38
|
+
position: "top-start",
|
|
39
|
+
showRemoveButton: !1,
|
|
40
|
+
showIcons: !1,
|
|
41
|
+
children: /* @__PURE__ */ e(d, { variant: "subtle", color: "gray", size: 22, radius: 8, "aria-label": "Add reaction", children: /* @__PURE__ */ e(o, { icon: j, size: 16 }) })
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
m && /* @__PURE__ */ e(d, { variant: "subtle", color: "gray", size: 22, radius: 8, onClick: m, "aria-label": "Reply", children: /* @__PURE__ */ e(o, { icon: w, size: 16 }) }),
|
|
45
|
+
k && /* @__PURE__ */ n(i, { position: "bottom-end", withinPortal: !0, shadow: "md", width: 200, opened: g, onChange: z, children: [
|
|
46
|
+
/* @__PURE__ */ e(i.Target, { children: /* @__PURE__ */ e(d, { variant: "subtle", color: "gray", size: 22, radius: 8, "aria-label": "More actions", children: /* @__PURE__ */ e(o, { icon: A, size: 16 }) }) }),
|
|
47
|
+
/* @__PURE__ */ n(i.Dropdown, { children: [
|
|
48
|
+
s && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: x, size: 16 }), onClick: s, children: "Copy" }),
|
|
49
|
+
a && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: $, size: 16 }), onClick: a, children: "Forward" }),
|
|
50
|
+
l && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: B, size: 16 }), onClick: l, children: "Pin" }),
|
|
51
|
+
(h || t) && /* @__PURE__ */ e(i.Item, { leftSection: /* @__PURE__ */ e(o, { icon: E, size: 16 }), onClick: t, children: "Edit" }),
|
|
52
|
+
(p || c) && /* @__PURE__ */ n(M, { children: [
|
|
53
|
+
/* @__PURE__ */ e(i.Divider, {}),
|
|
54
|
+
/* @__PURE__ */ e(i.Item, { color: "red", leftSection: /* @__PURE__ */ e(o, { icon: O, size: 16 }), onClick: c, children: "Delete" })
|
|
55
|
+
] })
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] })
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
G.displayName = "MessageActions";
|
|
63
|
+
export {
|
|
64
|
+
G as MessageActions
|
|
65
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageAuthorProps {
|
|
3
|
+
/** Author display name */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Author color index 1-7 */
|
|
6
|
+
color?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
7
|
+
/** Outgoing message uses green palette */
|
|
8
|
+
outgoing?: boolean;
|
|
9
|
+
/** Click handler */
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
/** Additional className */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Custom style */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export declare function MessageAuthor({ name, color, outgoing, onClick, className, style, }: MessageAuthorProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace MessageAuthor {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageAuthor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,kBAAkB,2CAyBpB;yBAhCe,aAAa"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as d } from "react";
|
|
3
|
+
import { Text as n } from "@mantine/core";
|
|
4
|
+
import { getAuthorColor as c } from "../colors.js";
|
|
5
|
+
function l({
|
|
6
|
+
name: o,
|
|
7
|
+
color: s = 6,
|
|
8
|
+
outgoing: a,
|
|
9
|
+
onClick: e,
|
|
10
|
+
className: m,
|
|
11
|
+
style: r
|
|
12
|
+
}) {
|
|
13
|
+
const t = a ? "var(--mantine-color-green-6)" : c(s), i = d(
|
|
14
|
+
() => ({ ...r, color: t, maxHeight: 38, cursor: e ? "pointer" : void 0 }),
|
|
15
|
+
[r, t, e]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ u(
|
|
18
|
+
n,
|
|
19
|
+
{
|
|
20
|
+
size: "sm",
|
|
21
|
+
fw: 600,
|
|
22
|
+
truncate: !0,
|
|
23
|
+
className: m,
|
|
24
|
+
style: i,
|
|
25
|
+
mb: 4,
|
|
26
|
+
"data-testid": "message-author",
|
|
27
|
+
"data-clickable": e ? !0 : void 0,
|
|
28
|
+
onClick: e,
|
|
29
|
+
children: o
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
l.displayName = "MessageAuthor";
|
|
34
|
+
export {
|
|
35
|
+
l as MessageAuthor
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageForwardProps {
|
|
3
|
+
from: string;
|
|
4
|
+
outgoing?: boolean;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
export declare function MessageForward({ from, outgoing, onClick, className, style, }: MessageForwardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare namespace MessageForward {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageForward/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,2CAcrB;yBApBe,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Text as e } from "@mantine/core";
|
|
3
|
+
import m from "./MessageForward.module.css.js";
|
|
4
|
+
function n({
|
|
5
|
+
from: o,
|
|
6
|
+
outgoing: s,
|
|
7
|
+
onClick: r,
|
|
8
|
+
className: a,
|
|
9
|
+
style: d
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ i(
|
|
12
|
+
e,
|
|
13
|
+
{
|
|
14
|
+
size: "sm",
|
|
15
|
+
truncate: !0,
|
|
16
|
+
className: `${m.root} ${a || ""}`,
|
|
17
|
+
style: d,
|
|
18
|
+
"data-outgoing": s || void 0,
|
|
19
|
+
"data-testid": "message-forward",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ t(e, { span: !0, children: "Forwarded from " }),
|
|
22
|
+
/* @__PURE__ */ t(e, { span: !0, fw: 500, style: { cursor: r ? "pointer" : void 0 }, onClick: r, tabIndex: r ? 0 : void 0, role: r ? "button" : void 0, children: o })
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
n.displayName = "MessageForward";
|
|
28
|
+
export {
|
|
29
|
+
n as MessageForward
|
|
30
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const o = "_container_1ak80_1", t = "_root_1ak80_19", _ = "_wrapper_1ak80_33", r = "_top_1ak80_43", s = "_items_1ak80_43", a = "_scrollToBottom_1ak80_87", c = {
|
|
2
|
+
container: o,
|
|
3
|
+
root: t,
|
|
4
|
+
wrapper: _,
|
|
5
|
+
top: r,
|
|
6
|
+
items: s,
|
|
7
|
+
scrollToBottom: a
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
o as container,
|
|
11
|
+
c as default,
|
|
12
|
+
s as items,
|
|
13
|
+
t as root,
|
|
14
|
+
a as scrollToBottom,
|
|
15
|
+
r as top,
|
|
16
|
+
_ as wrapper
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageListProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
stickToBottom?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function MessageList({ children, className, style, stickToBottom }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace MessageList {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageList/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,gBAAgB,2CA8F1F;yBA9Fe,WAAW"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as f, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { ScrollArea as x, ActionIcon as N } from "@mantine/core";
|
|
3
|
+
import { ArrowDown01Icon as R } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon as E } from "@hugeicons/react";
|
|
5
|
+
import { useRef as c, useState as L, useCallback as z, useEffect as h } from "react";
|
|
6
|
+
import r from "./MessageList.module.css.js";
|
|
7
|
+
function A({ children: g, className: i, style: v, stickToBottom: l }) {
|
|
8
|
+
const e = c(null), n = c(!0), a = c(0), [b, w] = L(!1), H = z(() => {
|
|
9
|
+
e.current && e.current.scrollTo({ top: e.current.scrollHeight, behavior: "smooth" });
|
|
10
|
+
}, []);
|
|
11
|
+
return h(() => {
|
|
12
|
+
!l || !e.current || (e.current.scrollTop = e.current.scrollHeight);
|
|
13
|
+
}, [l]), h(() => {
|
|
14
|
+
const t = e.current;
|
|
15
|
+
if (!l || !t) return;
|
|
16
|
+
const u = new ResizeObserver(() => {
|
|
17
|
+
const o = t.scrollHeight;
|
|
18
|
+
o !== a.current && n.current && (t.scrollTop = o), a.current = o;
|
|
19
|
+
}), m = t.firstElementChild;
|
|
20
|
+
m && u.observe(m);
|
|
21
|
+
const d = () => {
|
|
22
|
+
const { scrollTop: o, scrollHeight: S, clientHeight: y } = t, p = S - o - y;
|
|
23
|
+
n.current = p < 40, w(p > 200);
|
|
24
|
+
};
|
|
25
|
+
return t.addEventListener("scroll", d, { passive: !0 }), () => {
|
|
26
|
+
u.disconnect(), t.removeEventListener("scroll", d);
|
|
27
|
+
};
|
|
28
|
+
}, [l]), /* @__PURE__ */ f("div", { className: r.container, children: [
|
|
29
|
+
/* @__PURE__ */ s(
|
|
30
|
+
x,
|
|
31
|
+
{
|
|
32
|
+
className: `${r.root}${i ? ` ${i}` : ""}`,
|
|
33
|
+
style: v,
|
|
34
|
+
type: "auto",
|
|
35
|
+
scrollbars: "y",
|
|
36
|
+
viewportRef: e,
|
|
37
|
+
"data-testid": "message-list",
|
|
38
|
+
styles: {
|
|
39
|
+
content: {
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
minHeight: "100%"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
children: /* @__PURE__ */ f("div", { className: r.wrapper, children: [
|
|
46
|
+
/* @__PURE__ */ s("div", { className: r.top, "data-testid": "message-list-top" }),
|
|
47
|
+
/* @__PURE__ */ s("div", { className: r.items, "data-testid": "message-list-items", children: g })
|
|
48
|
+
] })
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
b && /* @__PURE__ */ s(
|
|
52
|
+
N,
|
|
53
|
+
{
|
|
54
|
+
className: r.scrollToBottom,
|
|
55
|
+
variant: "filled",
|
|
56
|
+
color: "gray",
|
|
57
|
+
radius: "xl",
|
|
58
|
+
size: 40,
|
|
59
|
+
onClick: H,
|
|
60
|
+
"aria-label": "Scroll to bottom",
|
|
61
|
+
"data-testid": "scroll-to-bottom",
|
|
62
|
+
style: { position: "absolute", bottom: 16, right: 24, left: "auto" },
|
|
63
|
+
children: /* @__PURE__ */ s(E, { icon: R, size: 20 })
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
A.displayName = "MessageList";
|
|
69
|
+
export {
|
|
70
|
+
A as MessageList
|
|
71
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageMetaProps {
|
|
3
|
+
time: string;
|
|
4
|
+
edited?: boolean;
|
|
5
|
+
views?: number;
|
|
6
|
+
outgoing?: boolean;
|
|
7
|
+
inReactions?: boolean;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare function MessageMeta({ time, edited, views, outgoing, inReactions, children, className, style, }: MessageMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare namespace MessageMeta {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageMeta/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,GACN,EAAE,gBAAgB,2CAelB;yBAxBe,WAAW"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import e from "./MessageMeta.module.css.js";
|
|
3
|
+
function l({
|
|
4
|
+
time: t,
|
|
5
|
+
edited: i,
|
|
6
|
+
views: s,
|
|
7
|
+
outgoing: d,
|
|
8
|
+
inReactions: o,
|
|
9
|
+
children: n,
|
|
10
|
+
className: r,
|
|
11
|
+
style: m
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ c(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: `${e.root} ${r || ""}`,
|
|
17
|
+
style: m,
|
|
18
|
+
"data-outgoing": d || void 0,
|
|
19
|
+
"data-in-reactions": o || void 0,
|
|
20
|
+
"data-testid": "message-meta",
|
|
21
|
+
children: [
|
|
22
|
+
i && /* @__PURE__ */ a("span", { className: e.edited, children: "edited" }),
|
|
23
|
+
s !== void 0 && /* @__PURE__ */ a("span", { className: e.views, children: s }),
|
|
24
|
+
/* @__PURE__ */ a("span", { className: e.time, children: t }),
|
|
25
|
+
n
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
l.displayName = "MessageMeta";
|
|
31
|
+
export {
|
|
32
|
+
l as MessageMeta
|
|
33
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const o = "_row_6r23s_1", t = "_pill_6r23s_19", _ = "_count_6r23s_79", s = "_emoji_6r23s_95", c = "_meta_6r23s_119", e = {
|
|
2
|
+
row: o,
|
|
3
|
+
pill: t,
|
|
4
|
+
count: _,
|
|
5
|
+
emoji: s,
|
|
6
|
+
meta: c
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
_ as count,
|
|
10
|
+
e as default,
|
|
11
|
+
s as emoji,
|
|
12
|
+
c as meta,
|
|
13
|
+
t as pill,
|
|
14
|
+
o as row
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Reaction {
|
|
3
|
+
emoji: string;
|
|
4
|
+
count: number;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MessageReactionsProps {
|
|
8
|
+
reactions: Reaction[];
|
|
9
|
+
onToggle?: (emoji: string) => void;
|
|
10
|
+
meta?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare const MessageReactions: React.NamedExoticComponent<MessageReactionsProps>;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageReactions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,mDA+B3B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import s from "./MessageReactions.module.css.js";
|
|
4
|
+
const d = m.memo(function({
|
|
5
|
+
reactions: i,
|
|
6
|
+
onToggle: c,
|
|
7
|
+
meta: a,
|
|
8
|
+
className: o,
|
|
9
|
+
style: l
|
|
10
|
+
}) {
|
|
11
|
+
return !i.length && !a ? null : /* @__PURE__ */ n(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: `${s.row}${o ? ` ${o}` : ""}`,
|
|
15
|
+
style: l,
|
|
16
|
+
"data-testid": "message-reactions",
|
|
17
|
+
children: [
|
|
18
|
+
i.map((e) => /* @__PURE__ */ n(
|
|
19
|
+
"button",
|
|
20
|
+
{
|
|
21
|
+
className: s.pill,
|
|
22
|
+
"data-active": e.active || void 0,
|
|
23
|
+
onClick: () => c?.(e.emoji),
|
|
24
|
+
type: "button",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ t("span", { className: s.emoji, children: e.emoji }),
|
|
27
|
+
/* @__PURE__ */ t("span", { className: s.count, children: e.count })
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
e.emoji
|
|
31
|
+
)),
|
|
32
|
+
a && /* @__PURE__ */ t("div", { className: s.meta, children: a })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
d.displayName = "MessageReactions";
|
|
38
|
+
export {
|
|
39
|
+
d as MessageReactions
|
|
40
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const t = "_root_13gux_21", o = "_border_13gux_15", e = "_content_13gux_67", _ = "_title_13gux_85", n = "_subtitle_13gux_109", s = {
|
|
2
|
+
root: t,
|
|
3
|
+
border: o,
|
|
4
|
+
content: e,
|
|
5
|
+
title: _,
|
|
6
|
+
subtitle: n
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as border,
|
|
10
|
+
e as content,
|
|
11
|
+
s as default,
|
|
12
|
+
t as root,
|
|
13
|
+
n as subtitle,
|
|
14
|
+
_ as title
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageReplyProps {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: React.ReactNode;
|
|
5
|
+
color?: 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
6
|
+
outgoing?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function MessageReply({ title, subtitle, color, outgoing, onClick, className, style, }: MessageReplyProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace MessageReply {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageReply/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,GACN,EAAE,iBAAiB,2CA2BnB;yBAnCe,YAAY"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as r, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { getAuthorColor as y } from "../colors.js";
|
|
3
|
+
import t from "./MessageReply.module.css.js";
|
|
4
|
+
function p({
|
|
5
|
+
title: i,
|
|
6
|
+
subtitle: l,
|
|
7
|
+
color: o,
|
|
8
|
+
outgoing: a,
|
|
9
|
+
onClick: e,
|
|
10
|
+
className: m,
|
|
11
|
+
style: v
|
|
12
|
+
}) {
|
|
13
|
+
const s = a ? void 0 : o ? y(o) : void 0;
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: `${t.root} ${m || ""}`,
|
|
18
|
+
style: v,
|
|
19
|
+
"data-outgoing": a || void 0,
|
|
20
|
+
"data-testid": "message-reply",
|
|
21
|
+
onClick: e,
|
|
22
|
+
tabIndex: e ? 0 : void 0,
|
|
23
|
+
role: e ? "button" : void 0,
|
|
24
|
+
onKeyDown: e ? (n) => {
|
|
25
|
+
n.key === "Enter" && e();
|
|
26
|
+
} : void 0,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ d("div", { className: t.border, style: s ? { background: s } : void 0 }),
|
|
29
|
+
/* @__PURE__ */ r("div", { className: t.content, children: [
|
|
30
|
+
/* @__PURE__ */ d("div", { className: t.title, style: s ? { color: s } : void 0, "data-testid": "message-reply-title", children: i }),
|
|
31
|
+
/* @__PURE__ */ d("div", { className: t.subtitle, "data-testid": "message-reply-subtitle", children: l })
|
|
32
|
+
] })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
p.displayName = "MessageReply";
|
|
38
|
+
export {
|
|
39
|
+
p as MessageReply
|
|
40
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type MessageDeliveryStatus = 'sending' | 'sent' | 'delivered' | 'read' | 'error';
|
|
3
|
+
export interface MessageStatusProps {
|
|
4
|
+
status: MessageDeliveryStatus;
|
|
5
|
+
/** Additional className */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Custom style */
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare function MessageStatus({ status, className, style }: MessageStatusProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export declare namespace MessageStatus {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/MessageStatus/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAExF,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AA+CD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,kDAyB7E;yBAzBe,aAAa"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import i from "./MessageStatus.module.css.js";
|
|
3
|
+
function a(e) {
|
|
4
|
+
return /* @__PURE__ */ n("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.5, ...e, children: [
|
|
5
|
+
/* @__PURE__ */ r("circle", { cx: "8", cy: "8", r: "6" }),
|
|
6
|
+
/* @__PURE__ */ r("polyline", { points: "8,4 8,8" }),
|
|
7
|
+
/* @__PURE__ */ r("polyline", { points: "8,8 10.5,10" })
|
|
8
|
+
] });
|
|
9
|
+
}
|
|
10
|
+
function d(e) {
|
|
11
|
+
return /* @__PURE__ */ r("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.5, ...e, children: /* @__PURE__ */ r("polyline", { points: "3,8.5 6.5,12 13,4" }) });
|
|
12
|
+
}
|
|
13
|
+
function l(e) {
|
|
14
|
+
return /* @__PURE__ */ n("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.5, ...e, children: [
|
|
15
|
+
/* @__PURE__ */ r("polyline", { points: "1.5,8.5 5,12 11.5,4" }),
|
|
16
|
+
/* @__PURE__ */ r("polyline", { points: "5.5,8.5 9,12 15.5,4" })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
function u(e) {
|
|
20
|
+
return /* @__PURE__ */ n("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.5, ...e, children: [
|
|
21
|
+
/* @__PURE__ */ r("circle", { cx: "8", cy: "8", r: "6" }),
|
|
22
|
+
/* @__PURE__ */ r("line", { x1: "8", y1: "4.5", x2: "8", y2: "9" }),
|
|
23
|
+
/* @__PURE__ */ r("circle", { cx: "8", cy: "11.5", r: "0.5", fill: "currentColor", stroke: "none" })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
const p = {
|
|
27
|
+
sending: a,
|
|
28
|
+
sent: d,
|
|
29
|
+
delivered: l,
|
|
30
|
+
read: l,
|
|
31
|
+
error: u
|
|
32
|
+
};
|
|
33
|
+
function f({ status: e, className: s, style: c }) {
|
|
34
|
+
const t = p[e];
|
|
35
|
+
if (!t)
|
|
36
|
+
return null;
|
|
37
|
+
let o;
|
|
38
|
+
return e === "error" ? o = "var(--mantine-color-red-6)" : o = "currentColor", /* @__PURE__ */ r(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: `${i.root} ${s || ""}`,
|
|
42
|
+
style: { ...c, color: o },
|
|
43
|
+
"data-testid": "message-status",
|
|
44
|
+
"data-status": e,
|
|
45
|
+
"aria-label": e,
|
|
46
|
+
children: /* @__PURE__ */ r(t, { className: i.icon })
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
f.displayName = "MessageStatus";
|
|
51
|
+
export {
|
|
52
|
+
f as MessageStatus
|
|
53
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ServiceMessageProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
export declare function ServiceMessage({ children, subtitle, title, className, style }: ServiceMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare namespace ServiceMessage {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ServiceMessage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAYlG;yBAZe,cAAc"}
|