@qwanyx/stack 0.2.26 → 0.2.28
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/MailComposer.d.ts +67 -0
- package/dist/index.cjs.js +40 -35
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +3543 -3178
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MailComposer Component
|
|
3
|
+
* Complete email composition with to/subject/body/attachments
|
|
4
|
+
*/
|
|
5
|
+
import { MailEditorTheme } from './MailEditor';
|
|
6
|
+
export interface MailComposerProps {
|
|
7
|
+
/** Recipient email address */
|
|
8
|
+
to?: string;
|
|
9
|
+
/** Subject line */
|
|
10
|
+
subject?: string;
|
|
11
|
+
/** HTML body content */
|
|
12
|
+
body?: string;
|
|
13
|
+
/** Reply context - will generate quoted block in editor */
|
|
14
|
+
replyTo?: {
|
|
15
|
+
from: string;
|
|
16
|
+
date: string;
|
|
17
|
+
body: string;
|
|
18
|
+
messageId?: string;
|
|
19
|
+
};
|
|
20
|
+
/** Called when send is clicked */
|
|
21
|
+
onSend: (data: MailComposerData) => Promise<void>;
|
|
22
|
+
/** Called when cancelled */
|
|
23
|
+
onCancel?: () => void;
|
|
24
|
+
/** Theme customization */
|
|
25
|
+
theme?: MailComposerTheme;
|
|
26
|
+
/** Disable all inputs */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Show CC/BCC fields */
|
|
29
|
+
showCcBcc?: boolean;
|
|
30
|
+
/** Placeholder for body */
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
/** Additional CSS class */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Minimum height for editor */
|
|
35
|
+
minHeight?: string;
|
|
36
|
+
/** Custom send button text */
|
|
37
|
+
sendButtonText?: string;
|
|
38
|
+
/** Hide cancel button */
|
|
39
|
+
hideCancelButton?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface MailComposerData {
|
|
42
|
+
to: string;
|
|
43
|
+
cc?: string;
|
|
44
|
+
bcc?: string;
|
|
45
|
+
subject: string;
|
|
46
|
+
html: string;
|
|
47
|
+
attachments: MailAttachment[];
|
|
48
|
+
inReplyTo?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface MailAttachment {
|
|
51
|
+
filename: string;
|
|
52
|
+
content_type: string;
|
|
53
|
+
data: string;
|
|
54
|
+
size: number;
|
|
55
|
+
}
|
|
56
|
+
export interface MailComposerTheme extends MailEditorTheme {
|
|
57
|
+
inputBackground?: string;
|
|
58
|
+
inputBorder?: string;
|
|
59
|
+
inputFocus?: string;
|
|
60
|
+
buttonPrimary?: string;
|
|
61
|
+
buttonPrimaryHover?: string;
|
|
62
|
+
buttonSecondary?: string;
|
|
63
|
+
buttonSecondaryHover?: string;
|
|
64
|
+
attachmentBackground?: string;
|
|
65
|
+
attachmentBorder?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function MailComposer({ to: initialTo, subject: initialSubject, body: initialBody, replyTo, onSend, onCancel, theme: themeProp, disabled, showCcBcc, placeholder, className, minHeight, sendButtonText, hideCancelButton, }: MailComposerProps): import("react/jsx-runtime").JSX.Element;
|