@selectwin/kit 0.1.252 → 0.1.254
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/README.md +83 -69
- package/dist/SelectAttachMenu.d.ts +29 -0
- package/dist/SelectAttachMenu.js +167 -0
- package/dist/SelectAudioRecorder.d.ts +27 -0
- package/dist/SelectAudioRecorder.js +287 -0
- package/dist/SelectAvatar.d.ts +3 -1
- package/dist/SelectAvatar.js +1 -1
- package/dist/SelectChatSendButton.d.ts +14 -0
- package/dist/SelectChatSendButton.js +25 -0
- package/dist/SelectConversation.d.ts +33 -2
- package/dist/SelectConversation.js +127 -83
- package/dist/SelectConversationQuote.d.ts +20 -0
- package/dist/SelectConversationQuote.js +87 -0
- package/dist/SelectConversationReactions.d.ts +31 -0
- package/dist/SelectConversationReactions.js +101 -0
- package/dist/SelectEmojiPicker.d.ts +12 -0
- package/dist/SelectEmojiPicker.js +178 -0
- package/dist/SelectIconTile.d.ts +2 -1
- package/dist/SelectLightbox.d.ts +32 -0
- package/dist/SelectLightbox.js +172 -0
- package/dist/SelectLocale.d.ts +68 -0
- package/dist/SelectLocale.js +140 -0
- package/dist/SelectMail.d.ts +3 -2
- package/dist/SelectMail.js +224 -244
- package/dist/SelectMessageCards.d.ts +150 -0
- package/dist/SelectMessageCards.js +429 -0
- package/dist/SelectMessageTicks.d.ts +7 -0
- package/dist/SelectMessageTicks.js +31 -0
- package/dist/SelectVoiceNote.d.ts +27 -0
- package/dist/SelectVoiceNote.js +245 -0
- package/dist/emojiData.d.ts +33 -0
- package/dist/emojiData.js +103 -0
- package/dist/icons.d.ts +22 -0
- package/dist/icons.js +89 -10
- package/dist/index.d.ts +23 -1
- package/dist/index.js +236 -224
- package/dist/internal/fileKind.d.ts +12 -0
- package/dist/internal/fileKind.js +44 -0
- package/dist/style.css +1 -1
- package/package.json +67 -67
package/dist/SelectMail.js
CHANGED
|
@@ -4,42 +4,43 @@ import { useSelectMessages as h } from "./SelectLocale.js";
|
|
|
4
4
|
import { SelectPopover as g } from "./SelectPopover.js";
|
|
5
5
|
import { SelectIconButton as _ } from "./SelectIconButton.js";
|
|
6
6
|
import { SelectAvatar as v } from "./SelectAvatar.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { attachmentExt as y, attachmentTone as b } from "./internal/fileKind.js";
|
|
8
|
+
import { useRef as x, useState as S } from "react";
|
|
9
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
9
10
|
//#region src/SelectMail.tsx
|
|
10
|
-
function
|
|
11
|
+
function E(e) {
|
|
11
12
|
var t;
|
|
12
13
|
return e ? ((t = e.name) == null ? void 0 : t.trim()) || e.address : "Remetente desconhecido";
|
|
13
14
|
}
|
|
14
|
-
var
|
|
15
|
-
function
|
|
15
|
+
var D = (...e) => e.filter(Boolean).join(" ");
|
|
16
|
+
function O({ toolbar: e, banner: t, list: n, reader: r, readerOpen: i = !1, children: a, fullBody: o, aside: s, asideLabel: c, listLabel: l, readerLabel: u, framed: d = !1, "aria-label": f }) {
|
|
16
17
|
let p = h().inbox;
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
className:
|
|
18
|
+
return /* @__PURE__ */ T("div", {
|
|
19
|
+
className: D("select-inbox", d && "select-inbox--framed", i && "is-reading"),
|
|
19
20
|
"aria-label": f,
|
|
20
21
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ w("div", {
|
|
22
23
|
className: "select-inbox__toolbar",
|
|
23
24
|
children: e
|
|
24
25
|
}),
|
|
25
26
|
t,
|
|
26
|
-
o ? /* @__PURE__ */
|
|
27
|
+
o ? /* @__PURE__ */ w("div", {
|
|
27
28
|
className: "select-inbox__body select-inbox__body--full",
|
|
28
29
|
children: o
|
|
29
|
-
}) : /* @__PURE__ */
|
|
30
|
+
}) : /* @__PURE__ */ T("div", {
|
|
30
31
|
className: "select-inbox__body",
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ w("section", {
|
|
33
34
|
className: "select-inbox__list",
|
|
34
35
|
"aria-label": l ?? p.list,
|
|
35
36
|
children: n
|
|
36
37
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ w("section", {
|
|
38
39
|
className: "select-inbox__reader",
|
|
39
40
|
"aria-label": u ?? p.reader,
|
|
40
41
|
children: r
|
|
41
42
|
}),
|
|
42
|
-
s ? /* @__PURE__ */
|
|
43
|
+
s ? /* @__PURE__ */ w("aside", {
|
|
43
44
|
className: "select-inbox__aside",
|
|
44
45
|
"aria-label": c ?? p.aside,
|
|
45
46
|
children: s
|
|
@@ -50,194 +51,194 @@ function E({ toolbar: e, banner: t, list: n, reader: r, readerOpen: i = !1, chil
|
|
|
50
51
|
]
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
function k({ tone: e = "warning", children: t, action: n }) {
|
|
55
|
+
return /* @__PURE__ */ T("div", {
|
|
55
56
|
className: `select-inbox-banner select-inbox-banner--${e}`,
|
|
56
57
|
role: e === "info" ? "status" : "alert",
|
|
57
58
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ w("span", {
|
|
59
60
|
className: "select-inbox-banner__icon",
|
|
60
61
|
"aria-hidden": "true",
|
|
61
|
-
children:
|
|
62
|
+
children: w(e === "info" ? s : m, {})
|
|
62
63
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ w("span", {
|
|
64
65
|
className: "select-inbox-banner__text",
|
|
65
66
|
children: t
|
|
66
67
|
}),
|
|
67
|
-
n ? /* @__PURE__ */
|
|
68
|
+
n ? /* @__PURE__ */ w("span", {
|
|
68
69
|
className: "select-inbox-banner__action",
|
|
69
70
|
children: n
|
|
70
71
|
}) : null
|
|
71
72
|
]
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
function A({ title: e, status: t, children: n, actions: r }) {
|
|
76
|
+
return /* @__PURE__ */ T("div", {
|
|
76
77
|
className: "select-inboxbar",
|
|
77
78
|
children: [
|
|
78
|
-
e != null || t != null ? /* @__PURE__ */
|
|
79
|
+
e != null || t != null ? /* @__PURE__ */ T("div", {
|
|
79
80
|
className: "select-inboxbar__title",
|
|
80
|
-
children: [e == null ? null : /* @__PURE__ */
|
|
81
|
+
children: [e == null ? null : /* @__PURE__ */ w("h1", {
|
|
81
82
|
className: "select-inboxbar__heading",
|
|
82
83
|
children: e
|
|
83
84
|
}), t]
|
|
84
85
|
}) : null,
|
|
85
|
-
n ? /* @__PURE__ */
|
|
86
|
+
n ? /* @__PURE__ */ w("div", {
|
|
86
87
|
className: "select-inboxbar__controls",
|
|
87
88
|
children: n
|
|
88
89
|
}) : null,
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
r ? /* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ w("span", { className: "select-inboxbar__spacer" }),
|
|
91
|
+
r ? /* @__PURE__ */ w("div", {
|
|
91
92
|
className: "select-inboxbar__actions",
|
|
92
93
|
children: r
|
|
93
94
|
}) : null
|
|
94
95
|
]
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
function j({ tone: e, children: t }) {
|
|
99
|
+
return /* @__PURE__ */ T("span", {
|
|
99
100
|
className: `select-mailbox-status select-mailbox-status--${e}`,
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ w("span", {
|
|
101
102
|
className: "select-mailbox-status__dot",
|
|
102
103
|
"aria-hidden": "true"
|
|
103
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ w("span", {
|
|
104
105
|
className: "select-mailbox-status__text",
|
|
105
106
|
children: t
|
|
106
107
|
})]
|
|
107
108
|
});
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
return /* @__PURE__ */
|
|
110
|
+
function M({ icon: e, title: t, children: n, details: r, action: i, tone: a = "neutral" }) {
|
|
111
|
+
return /* @__PURE__ */ T("div", {
|
|
111
112
|
className: `select-inbox-empty select-inbox-empty--${a}`,
|
|
112
113
|
children: [
|
|
113
|
-
e ? /* @__PURE__ */
|
|
114
|
+
e ? /* @__PURE__ */ w("span", {
|
|
114
115
|
className: "select-inbox-empty__icon",
|
|
115
116
|
"aria-hidden": "true",
|
|
116
117
|
children: e
|
|
117
118
|
}) : null,
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ w("div", {
|
|
119
120
|
className: "select-inbox-empty__title",
|
|
120
121
|
children: t
|
|
121
122
|
}),
|
|
122
|
-
n ? /* @__PURE__ */
|
|
123
|
+
n ? /* @__PURE__ */ w("div", {
|
|
123
124
|
className: "select-inbox-empty__text",
|
|
124
125
|
children: n
|
|
125
126
|
}) : null,
|
|
126
|
-
r ? /* @__PURE__ */
|
|
127
|
+
r ? /* @__PURE__ */ w("div", {
|
|
127
128
|
className: "select-inbox-empty__details",
|
|
128
129
|
children: r
|
|
129
130
|
}) : null,
|
|
130
|
-
i ? /* @__PURE__ */
|
|
131
|
+
i ? /* @__PURE__ */ w("div", {
|
|
131
132
|
className: "select-inbox-empty__action",
|
|
132
133
|
children: i
|
|
133
134
|
}) : null
|
|
134
135
|
]
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
-
return /* @__PURE__ */
|
|
138
|
+
function N({ children: e, "aria-label": t }) {
|
|
139
|
+
return /* @__PURE__ */ w("div", {
|
|
139
140
|
className: "select-maillist",
|
|
140
141
|
"aria-label": t,
|
|
141
142
|
children: e
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
|
-
function
|
|
145
|
-
return /* @__PURE__ */
|
|
145
|
+
function P({ label: e, children: t }) {
|
|
146
|
+
return /* @__PURE__ */ T("div", {
|
|
146
147
|
className: "select-maillist__group",
|
|
147
148
|
role: "group",
|
|
148
149
|
"aria-label": e,
|
|
149
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ w("div", {
|
|
150
151
|
className: "select-maillist__grouplabel",
|
|
151
152
|
"aria-hidden": "true",
|
|
152
153
|
children: e
|
|
153
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ w("div", {
|
|
154
155
|
className: "select-maillist__items",
|
|
155
156
|
children: t
|
|
156
157
|
})]
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function F({ from: e, avatar: t, subject: n, snippet: r, date: i, count: a, attachments: o, active: s = !1, unread: l = !1, flagged: u = !1, unreadCount: d, onClick: p }) {
|
|
160
161
|
let m = h().inbox, g = d != null && d > 0, _ = l || g, y = t === !1 ? void 0 : t ?? (typeof e == "string" ? e : void 0);
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ T("button", {
|
|
162
163
|
type: "button",
|
|
163
|
-
className:
|
|
164
|
+
className: D("select-maillist__row", s && "is-active", _ && "is-unread"),
|
|
164
165
|
"aria-current": s || void 0,
|
|
165
166
|
onClick: p,
|
|
166
|
-
children: [t === !1 ? null : /* @__PURE__ */
|
|
167
|
+
children: [t === !1 ? null : /* @__PURE__ */ w(v, {
|
|
167
168
|
name: y,
|
|
168
169
|
initials: 2,
|
|
169
170
|
className: "select-maillist__avatar"
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ T("span", {
|
|
171
172
|
className: "select-maillist__main",
|
|
172
173
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ T("span", {
|
|
174
175
|
className: "select-maillist__line",
|
|
175
176
|
children: [
|
|
176
|
-
_ && !g ? /* @__PURE__ */
|
|
177
|
+
_ && !g ? /* @__PURE__ */ T("span", {
|
|
177
178
|
className: "select-maillist__sr",
|
|
178
179
|
children: [m.unread, ": "]
|
|
179
180
|
}) : null,
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ w("span", {
|
|
181
182
|
className: "select-maillist__from",
|
|
182
183
|
children: e
|
|
183
184
|
}),
|
|
184
|
-
a && a > 1 ? /* @__PURE__ */
|
|
185
|
+
a && a > 1 ? /* @__PURE__ */ w("span", {
|
|
185
186
|
className: "select-maillist__count",
|
|
186
187
|
"aria-label": m.messages(a),
|
|
187
188
|
children: a
|
|
188
189
|
}) : null,
|
|
189
|
-
g ? /* @__PURE__ */
|
|
190
|
+
g ? /* @__PURE__ */ w("span", {
|
|
190
191
|
className: "select-maillist__unread",
|
|
191
192
|
"aria-label": m.unreadCount(d),
|
|
192
193
|
children: d
|
|
193
|
-
}) : _ ? /* @__PURE__ */
|
|
194
|
+
}) : _ ? /* @__PURE__ */ w("span", {
|
|
194
195
|
className: "select-maillist__dot",
|
|
195
196
|
"aria-hidden": "true"
|
|
196
197
|
}) : null,
|
|
197
|
-
u ? /* @__PURE__ */
|
|
198
|
+
u ? /* @__PURE__ */ w("span", {
|
|
198
199
|
className: "select-maillist__star",
|
|
199
200
|
role: "img",
|
|
200
201
|
"aria-label": m.flagged,
|
|
201
|
-
children: /* @__PURE__ */
|
|
202
|
+
children: /* @__PURE__ */ w(f, { filled: !0 })
|
|
202
203
|
}) : null,
|
|
203
|
-
i ? /* @__PURE__ */
|
|
204
|
+
i ? /* @__PURE__ */ w("span", {
|
|
204
205
|
className: "select-maillist__date",
|
|
205
206
|
children: i
|
|
206
207
|
}) : null
|
|
207
208
|
]
|
|
208
209
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ w("span", {
|
|
210
211
|
className: "select-maillist__subject",
|
|
211
212
|
children: n
|
|
212
213
|
}),
|
|
213
|
-
r || o ? /* @__PURE__ */
|
|
214
|
+
r || o ? /* @__PURE__ */ T("span", {
|
|
214
215
|
className: "select-maillist__line",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ w("span", {
|
|
216
217
|
className: "select-maillist__snippet",
|
|
217
218
|
children: r
|
|
218
|
-
}), o ? /* @__PURE__ */
|
|
219
|
+
}), o ? /* @__PURE__ */ w("span", {
|
|
219
220
|
className: "select-maillist__clip",
|
|
220
221
|
role: "img",
|
|
221
222
|
"aria-label": m.attachments(o),
|
|
222
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ w(c, {})
|
|
223
224
|
}) : null]
|
|
224
225
|
}) : null
|
|
225
226
|
]
|
|
226
227
|
})]
|
|
227
228
|
});
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
-
return /* @__PURE__ */
|
|
230
|
+
function I({ rows: e = 6 }) {
|
|
231
|
+
return /* @__PURE__ */ w("div", {
|
|
231
232
|
className: "select-maillist__skeleton",
|
|
232
233
|
"aria-hidden": "true",
|
|
233
|
-
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */
|
|
234
|
+
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ T("div", {
|
|
234
235
|
className: "select-maillist__skelrow",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ w("span", { className: "select-maillist__skel select-maillist__skel--avatar" }), /* @__PURE__ */ T("span", {
|
|
236
237
|
className: "select-maillist__skelcol",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ w("span", {
|
|
238
239
|
className: "select-maillist__skel",
|
|
239
240
|
style: { width: `${38 + t * 7 % 18}%` }
|
|
240
|
-
}), /* @__PURE__ */
|
|
241
|
+
}), /* @__PURE__ */ w("span", {
|
|
241
242
|
className: "select-maillist__skel",
|
|
242
243
|
style: { width: `${62 + t * 11 % 22}%` }
|
|
243
244
|
})]
|
|
@@ -245,48 +246,48 @@ function P({ rows: e = 6 }) {
|
|
|
245
246
|
}, t))
|
|
246
247
|
});
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
-
return /* @__PURE__ */
|
|
249
|
+
function L({ children: e, tone: t = "muted" }) {
|
|
250
|
+
return /* @__PURE__ */ w("div", {
|
|
250
251
|
className: `select-maillist__note select-maillist__note--${t}`,
|
|
251
252
|
children: e
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
+
function R({ title: t, meta: n, actions: r, tools: i, onBack: a, children: o, footer: s, variant: c = "mail" }) {
|
|
255
256
|
let l = h().inbox;
|
|
256
|
-
return /* @__PURE__ */
|
|
257
|
-
className:
|
|
257
|
+
return /* @__PURE__ */ T("div", {
|
|
258
|
+
className: D("select-mailreader", c === "chat" && "select-mailreader--chat"),
|
|
258
259
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ T("header", {
|
|
260
261
|
className: "select-mailreader__head",
|
|
261
262
|
children: [
|
|
262
|
-
a ? /* @__PURE__ */
|
|
263
|
+
a ? /* @__PURE__ */ w("span", {
|
|
263
264
|
className: "select-mailreader__back",
|
|
264
|
-
children: /* @__PURE__ */
|
|
265
|
-
icon: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ w(_, {
|
|
266
|
+
icon: /* @__PURE__ */ w(e, {}),
|
|
266
267
|
label: l.back,
|
|
267
268
|
size: "sm",
|
|
268
269
|
onClick: a
|
|
269
270
|
})
|
|
270
271
|
}) : null,
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ T("div", {
|
|
272
273
|
className: "select-mailreader__titles",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
274
275
|
className: "select-mailreader__title",
|
|
275
276
|
children: t
|
|
276
|
-
}), n ? /* @__PURE__ */
|
|
277
|
+
}), n ? /* @__PURE__ */ w("div", {
|
|
277
278
|
className: "select-mailreader__meta",
|
|
278
279
|
children: n
|
|
279
280
|
}) : null]
|
|
280
281
|
}),
|
|
281
|
-
r || i ? /* @__PURE__ */
|
|
282
|
+
r || i ? /* @__PURE__ */ T("div", {
|
|
282
283
|
className: "select-mailreader__actions",
|
|
283
284
|
children: [
|
|
284
285
|
r,
|
|
285
|
-
r && i ? /* @__PURE__ */
|
|
286
|
+
r && i ? /* @__PURE__ */ w("span", {
|
|
286
287
|
className: "select-mailreader__sep",
|
|
287
288
|
"aria-hidden": "true"
|
|
288
289
|
}) : null,
|
|
289
|
-
i ? /* @__PURE__ */
|
|
290
|
+
i ? /* @__PURE__ */ w("span", {
|
|
290
291
|
className: "select-mailreader__tools",
|
|
291
292
|
role: "group",
|
|
292
293
|
"aria-label": l.tools,
|
|
@@ -296,94 +297,94 @@ function I({ title: t, meta: n, actions: r, tools: i, onBack: a, children: o, fo
|
|
|
296
297
|
}) : null
|
|
297
298
|
]
|
|
298
299
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ w("div", {
|
|
300
301
|
className: "select-mailreader__thread",
|
|
301
302
|
children: o
|
|
302
303
|
}),
|
|
303
|
-
s ? /* @__PURE__ */
|
|
304
|
+
s ? /* @__PURE__ */ w("div", {
|
|
304
305
|
className: "select-mailreader__footer",
|
|
305
306
|
children: s
|
|
306
307
|
}) : null
|
|
307
308
|
]
|
|
308
309
|
});
|
|
309
310
|
}
|
|
310
|
-
function
|
|
311
|
-
let b = (e) => !!e && !!a && e.address.toLowerCase() === a.toLowerCase(), x = (e) => (e ?? []).map((e) => b(e) ? "você" :
|
|
312
|
-
if (m) return /* @__PURE__ */
|
|
311
|
+
function z({ from: e, to: t, cc: n, bcc: i, selfAddress: a, date: o, dateTitle: s, actions: l, notice: u, text: d, children: f, attachments: p, collapsed: m = !1, snippet: h, hasAttachments: g = !1, onToggle: y }) {
|
|
312
|
+
let b = (e) => !!e && !!a && e.address.toLowerCase() === a.toLowerCase(), x = (e) => (e ?? []).map((e) => b(e) ? "você" : E(e)).join(", "), S = E(e);
|
|
313
|
+
if (m) return /* @__PURE__ */ T("button", {
|
|
313
314
|
type: "button",
|
|
314
315
|
className: "select-mailmsg select-mailmsg--collapsed",
|
|
315
316
|
"aria-expanded": !1,
|
|
316
317
|
onClick: y,
|
|
317
318
|
children: [
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
name:
|
|
319
|
+
/* @__PURE__ */ w(v, {
|
|
320
|
+
name: S,
|
|
320
321
|
initials: 2,
|
|
321
322
|
className: "select-mailmsg__avatar select-mailmsg__avatar--sm"
|
|
322
323
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ w("span", {
|
|
324
325
|
className: "select-mailmsg__from",
|
|
325
|
-
children: b(e) ? "Você" :
|
|
326
|
+
children: b(e) ? "Você" : S
|
|
326
327
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ w("span", {
|
|
328
329
|
className: "select-mailmsg__snippet",
|
|
329
330
|
children: h
|
|
330
331
|
}),
|
|
331
|
-
g ? /* @__PURE__ */
|
|
332
|
+
g ? /* @__PURE__ */ w("span", {
|
|
332
333
|
className: "select-mailmsg__clip",
|
|
333
334
|
role: "img",
|
|
334
335
|
"aria-label": "Com anexo",
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ w(c, {})
|
|
336
337
|
}) : null,
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ w("span", {
|
|
338
339
|
className: "select-mailmsg__date",
|
|
339
340
|
title: s,
|
|
340
341
|
children: o
|
|
341
342
|
})
|
|
342
343
|
]
|
|
343
344
|
});
|
|
344
|
-
let
|
|
345
|
+
let C = [
|
|
345
346
|
t != null && t.length ? `para ${x(t)}` : "",
|
|
346
347
|
n != null && n.length ? `cc ${x(n)}` : "",
|
|
347
348
|
i != null && i.length ? `cco ${x(i)}` : ""
|
|
348
349
|
].filter(Boolean).join(" · ");
|
|
349
|
-
return /* @__PURE__ */
|
|
350
|
+
return /* @__PURE__ */ T("article", {
|
|
350
351
|
className: "select-mailmsg",
|
|
351
352
|
children: [
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ T("header", {
|
|
353
354
|
className: "select-mailmsg__head",
|
|
354
355
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
name:
|
|
356
|
+
/* @__PURE__ */ w(v, {
|
|
357
|
+
name: S,
|
|
357
358
|
initials: 2,
|
|
358
359
|
className: "select-mailmsg__avatar"
|
|
359
360
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ T("div", {
|
|
361
362
|
className: "select-mailmsg__who",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ T("span", {
|
|
363
364
|
className: "select-mailmsg__line",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ w("span", {
|
|
365
366
|
className: "select-mailmsg__from",
|
|
366
|
-
children:
|
|
367
|
-
}), e != null && e.name ? /* @__PURE__ */
|
|
367
|
+
children: S
|
|
368
|
+
}), e != null && e.name ? /* @__PURE__ */ w("span", {
|
|
368
369
|
className: "select-mailmsg__address",
|
|
369
370
|
children: e.address
|
|
370
371
|
}) : null]
|
|
371
|
-
}),
|
|
372
|
+
}), C ? /* @__PURE__ */ w("span", {
|
|
372
373
|
className: "select-mailmsg__to",
|
|
373
|
-
children:
|
|
374
|
+
children: C
|
|
374
375
|
}) : null]
|
|
375
376
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ T("div", {
|
|
377
378
|
className: "select-mailmsg__side",
|
|
378
379
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ w("span", {
|
|
380
381
|
className: "select-mailmsg__date",
|
|
381
382
|
title: s,
|
|
382
383
|
children: o
|
|
383
384
|
}),
|
|
384
385
|
l,
|
|
385
|
-
y ? /* @__PURE__ */
|
|
386
|
-
icon: /* @__PURE__ */
|
|
386
|
+
y ? /* @__PURE__ */ w(_, {
|
|
387
|
+
icon: /* @__PURE__ */ w(r, {}),
|
|
387
388
|
label: "Recolher a mensagem",
|
|
388
389
|
size: "sm",
|
|
389
390
|
onClick: y,
|
|
@@ -393,180 +394,159 @@ function L({ from: e, to: t, cc: n, bcc: i, selfAddress: a, date: o, dateTitle:
|
|
|
393
394
|
})
|
|
394
395
|
]
|
|
395
396
|
}),
|
|
396
|
-
u ? /* @__PURE__ */
|
|
397
|
+
u ? /* @__PURE__ */ w("div", {
|
|
397
398
|
className: "select-mailmsg__notices",
|
|
398
399
|
children: u
|
|
399
400
|
}) : null,
|
|
400
|
-
f ? /* @__PURE__ */
|
|
401
|
+
f ? /* @__PURE__ */ w("div", {
|
|
401
402
|
className: "select-mailmsg__body",
|
|
402
403
|
children: f
|
|
403
|
-
}) : d ? /* @__PURE__ */
|
|
404
|
+
}) : d ? /* @__PURE__ */ w("div", {
|
|
404
405
|
className: "select-mailmsg__text",
|
|
405
406
|
children: d
|
|
406
407
|
}) : null,
|
|
407
|
-
p ? /* @__PURE__ */
|
|
408
|
+
p ? /* @__PURE__ */ w("div", {
|
|
408
409
|
className: "select-mailmsg__attachments",
|
|
409
410
|
children: p
|
|
410
411
|
}) : null
|
|
411
412
|
]
|
|
412
413
|
});
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
-
return /* @__PURE__ */
|
|
415
|
+
function B({ tone: e = "info", icon: t, children: n }) {
|
|
416
|
+
return /* @__PURE__ */ T("div", {
|
|
416
417
|
className: `select-mailnotice select-mailnotice--${e}`,
|
|
417
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ w("span", {
|
|
418
419
|
className: "select-mailnotice__icon",
|
|
419
420
|
"aria-hidden": "true",
|
|
420
|
-
children: t ??
|
|
421
|
-
}), /* @__PURE__ */
|
|
421
|
+
children: t ?? w(e === "warning" ? s : d, {})
|
|
422
|
+
}), /* @__PURE__ */ w("span", { children: n })]
|
|
422
423
|
});
|
|
423
424
|
}
|
|
424
|
-
|
|
425
|
-
"
|
|
426
|
-
"
|
|
427
|
-
"PNG",
|
|
428
|
-
"GIF",
|
|
429
|
-
"WEBP",
|
|
430
|
-
"HEIC",
|
|
431
|
-
"SVG"
|
|
432
|
-
]), B = /* @__PURE__ */ new Set([
|
|
433
|
-
"XLS",
|
|
434
|
-
"XLSX",
|
|
435
|
-
"CSV",
|
|
436
|
-
"ODS"
|
|
437
|
-
]);
|
|
438
|
-
function V(e) {
|
|
439
|
-
let t = e.lastIndexOf("."), n = t > 0 ? e.slice(t + 1).toUpperCase() : "";
|
|
440
|
-
return /^[A-Z0-9]{1,4}$/.test(n) ? n : "ARQ";
|
|
441
|
-
}
|
|
442
|
-
function H(e) {
|
|
443
|
-
return e === "PDF" ? "pdf" : z.has(e) ? "image" : B.has(e) ? "sheet" : "other";
|
|
444
|
-
}
|
|
445
|
-
function U({ name: e, size: t, state: n = "idle", onClick: r, loadingLabel: i, readyLabel: s, failedLabel: c }) {
|
|
446
|
-
let l = h().inbox, u = V(e), d = n === "loading" ? i ?? l.attachmentLoading : n === "ready" ? s ?? l.attachmentReady : n === "failed" ? c ?? l.attachmentFailed : t, f = n === "ready" ? l.attachmentOpen(e) : n === "loading" ? l.attachmentBusy(e) : l.attachmentGet(e);
|
|
447
|
-
return /* @__PURE__ */ C("button", {
|
|
425
|
+
function V({ name: e, size: t, state: n = "idle", onClick: r, loadingLabel: i, readyLabel: s, failedLabel: c }) {
|
|
426
|
+
let l = h().inbox, u = y(e), d = n === "loading" ? i ?? l.attachmentLoading : n === "ready" ? s ?? l.attachmentReady : n === "failed" ? c ?? l.attachmentFailed : t, f = n === "ready" ? l.attachmentOpen(e) : n === "loading" ? l.attachmentBusy(e) : l.attachmentGet(e);
|
|
427
|
+
return /* @__PURE__ */ T("button", {
|
|
448
428
|
type: "button",
|
|
449
429
|
className: `select-mailatt select-mailatt--${n}`,
|
|
450
430
|
onClick: r,
|
|
451
431
|
"aria-label": f,
|
|
452
432
|
"aria-busy": n === "loading" || void 0,
|
|
453
433
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
className: `select-mailatt__ext select-mailatt__ext--${
|
|
434
|
+
/* @__PURE__ */ w("span", {
|
|
435
|
+
className: `select-mailatt__ext select-mailatt__ext--${b(u)}`,
|
|
456
436
|
"aria-hidden": "true",
|
|
457
437
|
children: u
|
|
458
438
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ T("span", {
|
|
460
440
|
className: "select-mailatt__text",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ w("span", {
|
|
462
442
|
className: "select-mailatt__name",
|
|
463
443
|
children: e
|
|
464
|
-
}), d ? /* @__PURE__ */
|
|
444
|
+
}), d ? /* @__PURE__ */ w("span", {
|
|
465
445
|
className: "select-mailatt__sub",
|
|
466
446
|
children: d
|
|
467
447
|
}) : null]
|
|
468
448
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ w("span", {
|
|
470
450
|
className: "select-mailatt__icon",
|
|
471
451
|
"aria-hidden": "true",
|
|
472
|
-
children:
|
|
452
|
+
children: w(n === "ready" ? a : n === "failed" ? m : o, {})
|
|
473
453
|
})
|
|
474
454
|
]
|
|
475
455
|
});
|
|
476
456
|
}
|
|
477
|
-
function
|
|
478
|
-
return /* @__PURE__ */
|
|
457
|
+
function H({ children: e, onClick: n, variant: r = "link", title: i }) {
|
|
458
|
+
return /* @__PURE__ */ T("button", {
|
|
479
459
|
type: "button",
|
|
480
460
|
className: `select-leadchip select-leadchip--${r}`,
|
|
481
461
|
onClick: n,
|
|
482
462
|
title: i,
|
|
483
463
|
children: [
|
|
484
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ w("span", {
|
|
485
465
|
className: "select-leadchip__icon",
|
|
486
466
|
"aria-hidden": "true",
|
|
487
|
-
children:
|
|
467
|
+
children: w(r === "create" ? l : p, {})
|
|
488
468
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ w("span", {
|
|
490
470
|
className: "select-leadchip__label",
|
|
491
471
|
children: e
|
|
492
472
|
}),
|
|
493
|
-
r === "link" ? /* @__PURE__ */
|
|
473
|
+
r === "link" ? /* @__PURE__ */ w("span", {
|
|
494
474
|
className: "select-leadchip__go",
|
|
495
475
|
"aria-hidden": "true",
|
|
496
|
-
children: /* @__PURE__ */
|
|
476
|
+
children: /* @__PURE__ */ w(t, {})
|
|
497
477
|
}) : null
|
|
498
478
|
]
|
|
499
479
|
});
|
|
500
480
|
}
|
|
501
|
-
var
|
|
481
|
+
var U = (e) => {
|
|
502
482
|
var t;
|
|
503
483
|
return Array.from(((t = e.dataTransfer) == null ? void 0 : t.types) ?? []).includes("Files");
|
|
504
484
|
};
|
|
505
|
-
function
|
|
506
|
-
let
|
|
485
|
+
function W({ variant: e = "inline", title: t, minimized: a = !1, onToggleMinimize: o, onClose: l, closeLabel: u, error: d, attachments: f, onFiles: p, dropLabel: m, footer: g, children: v, "aria-label": y }) {
|
|
486
|
+
let b = h().inbox, E = e === "dock", [O, k] = S(!1), A = x(0), j = p ? {
|
|
507
487
|
onDragEnter: (e) => {
|
|
508
|
-
|
|
488
|
+
U(e) && (e.preventDefault(), A.current += 1, k(!0));
|
|
509
489
|
},
|
|
510
490
|
onDragOver: (e) => {
|
|
511
|
-
|
|
491
|
+
U(e) && e.preventDefault();
|
|
512
492
|
},
|
|
513
493
|
onDragLeave: (e) => {
|
|
514
|
-
|
|
494
|
+
U(e) && (A.current = Math.max(0, A.current - 1), A.current === 0 && k(!1));
|
|
515
495
|
},
|
|
516
496
|
onDrop: (e) => {
|
|
517
|
-
if (!
|
|
497
|
+
if (!U(e)) return;
|
|
518
498
|
e.preventDefault(), A.current = 0, k(!1);
|
|
519
499
|
let t = Array.from(e.dataTransfer.files);
|
|
520
500
|
t.length && p(t);
|
|
521
501
|
}
|
|
522
502
|
} : {};
|
|
523
|
-
return /* @__PURE__ */
|
|
524
|
-
className:
|
|
525
|
-
role:
|
|
526
|
-
"aria-label":
|
|
503
|
+
return /* @__PURE__ */ T("div", {
|
|
504
|
+
className: D("select-mailcomposer", `select-mailcomposer--${e}`, a && "is-minimized", O && "is-dragging"),
|
|
505
|
+
role: E ? "dialog" : "group",
|
|
506
|
+
"aria-label": y,
|
|
527
507
|
...j,
|
|
528
508
|
children: [
|
|
529
|
-
|
|
509
|
+
E ? /* @__PURE__ */ T("div", {
|
|
530
510
|
className: "select-mailcomposer__bar",
|
|
531
511
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ w("span", {
|
|
533
513
|
className: "select-mailcomposer__title",
|
|
534
514
|
children: t
|
|
535
515
|
}),
|
|
536
|
-
o ? /* @__PURE__ */
|
|
537
|
-
icon:
|
|
538
|
-
label: a ?
|
|
516
|
+
o ? /* @__PURE__ */ w(_, {
|
|
517
|
+
icon: w(a ? r : n, {}),
|
|
518
|
+
label: a ? b.open : b.minimize,
|
|
539
519
|
size: "sm",
|
|
540
520
|
onClick: o
|
|
541
521
|
}) : null,
|
|
542
|
-
l ? /* @__PURE__ */
|
|
543
|
-
icon: /* @__PURE__ */
|
|
544
|
-
label: u ??
|
|
522
|
+
l ? /* @__PURE__ */ w(_, {
|
|
523
|
+
icon: /* @__PURE__ */ w(i, {}),
|
|
524
|
+
label: u ?? b.close,
|
|
545
525
|
size: "sm",
|
|
546
526
|
onClick: l
|
|
547
527
|
}) : null
|
|
548
528
|
]
|
|
549
529
|
}) : null,
|
|
550
|
-
O && !a ? /* @__PURE__ */
|
|
530
|
+
O && !a ? /* @__PURE__ */ T("div", {
|
|
551
531
|
className: "select-mailcomposer__drop",
|
|
552
532
|
"aria-hidden": "true",
|
|
553
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ w(c, {}), /* @__PURE__ */ w("span", { children: m ?? b.drop })]
|
|
554
534
|
}) : null,
|
|
555
|
-
a ? null : /* @__PURE__ */ C
|
|
556
|
-
/* @__PURE__ */
|
|
535
|
+
a ? null : /* @__PURE__ */ T(C, { children: [
|
|
536
|
+
/* @__PURE__ */ w("div", {
|
|
557
537
|
className: "select-mailcomposer__fields",
|
|
558
538
|
children: v
|
|
559
539
|
}),
|
|
560
540
|
f,
|
|
561
|
-
d ? /* @__PURE__ */
|
|
541
|
+
d ? /* @__PURE__ */ T("div", {
|
|
562
542
|
className: "select-mailcomposer__error",
|
|
563
543
|
role: "alert",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
544
|
+
children: [/* @__PURE__ */ w("span", {
|
|
565
545
|
"aria-hidden": "true",
|
|
566
|
-
children: /* @__PURE__ */
|
|
567
|
-
}), /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ w(s, {})
|
|
547
|
+
}), /* @__PURE__ */ w("span", { children: d })]
|
|
568
548
|
}) : null,
|
|
569
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ w("div", {
|
|
570
550
|
className: "select-mailcomposer__footer",
|
|
571
551
|
children: g
|
|
572
552
|
})
|
|
@@ -574,27 +554,27 @@ function K({ variant: e = "inline", title: t, minimized: a = !1, onToggleMinimiz
|
|
|
574
554
|
]
|
|
575
555
|
});
|
|
576
556
|
}
|
|
577
|
-
function
|
|
578
|
-
return /* @__PURE__ */
|
|
557
|
+
function G({ label: e, children: t, action: n }) {
|
|
558
|
+
return /* @__PURE__ */ T("div", {
|
|
579
559
|
className: "select-mailcomposer__row",
|
|
580
560
|
children: [
|
|
581
|
-
e ? /* @__PURE__ */
|
|
561
|
+
e ? /* @__PURE__ */ w("span", {
|
|
582
562
|
className: "select-mailcomposer__label",
|
|
583
563
|
children: e
|
|
584
564
|
}) : null,
|
|
585
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ w("div", {
|
|
586
566
|
className: "select-mailcomposer__control",
|
|
587
567
|
children: t
|
|
588
568
|
}),
|
|
589
|
-
n ? /* @__PURE__ */
|
|
569
|
+
n ? /* @__PURE__ */ w("div", {
|
|
590
570
|
className: "select-mailcomposer__rowaction",
|
|
591
571
|
children: n
|
|
592
572
|
}) : null
|
|
593
573
|
]
|
|
594
574
|
});
|
|
595
575
|
}
|
|
596
|
-
function
|
|
597
|
-
return /* @__PURE__ */
|
|
576
|
+
function K({ value: e, onChange: t, placeholder: n, "aria-label": r, maxLength: i }) {
|
|
577
|
+
return /* @__PURE__ */ w("input", {
|
|
598
578
|
className: "select-mailcomposer__input",
|
|
599
579
|
value: e,
|
|
600
580
|
onChange: (e) => t(e.target.value),
|
|
@@ -603,9 +583,9 @@ function J({ value: e, onChange: t, placeholder: n, "aria-label": r, maxLength:
|
|
|
603
583
|
maxLength: i
|
|
604
584
|
});
|
|
605
585
|
}
|
|
606
|
-
function
|
|
586
|
+
function q({ value: e, onChange: t, placeholder: n, rows: r = 6, "aria-label": i, maxLength: a, onEnter: o, id: s }) {
|
|
607
587
|
let c = h().inbox;
|
|
608
|
-
return /* @__PURE__ */
|
|
588
|
+
return /* @__PURE__ */ w("textarea", {
|
|
609
589
|
id: s,
|
|
610
590
|
className: "select-mailcomposer__body",
|
|
611
591
|
value: e,
|
|
@@ -619,10 +599,10 @@ function Y({ value: e, onChange: t, placeholder: n, rows: r = 6, "aria-label": i
|
|
|
619
599
|
maxLength: a
|
|
620
600
|
});
|
|
621
601
|
}
|
|
622
|
-
function
|
|
623
|
-
let a =
|
|
624
|
-
return /* @__PURE__ */ C
|
|
625
|
-
icon: /* @__PURE__ */
|
|
602
|
+
function J({ onFiles: e, accept: t, multiple: n = !0, disabled: r = !1, label: i = "Anexar arquivo" }) {
|
|
603
|
+
let a = x(null);
|
|
604
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(_, {
|
|
605
|
+
icon: /* @__PURE__ */ w(c, {}),
|
|
626
606
|
label: i,
|
|
627
607
|
size: "sm",
|
|
628
608
|
disabled: r,
|
|
@@ -630,7 +610,7 @@ function X({ onFiles: e, accept: t, multiple: n = !0, disabled: r = !1, label: i
|
|
|
630
610
|
var e;
|
|
631
611
|
return (e = a.current) == null ? void 0 : e.click();
|
|
632
612
|
}
|
|
633
|
-
}), /* @__PURE__ */
|
|
613
|
+
}), /* @__PURE__ */ w("input", {
|
|
634
614
|
ref: a,
|
|
635
615
|
type: "file",
|
|
636
616
|
className: "select-mailcomposer__file",
|
|
@@ -644,60 +624,60 @@ function X({ onFiles: e, accept: t, multiple: n = !0, disabled: r = !1, label: i
|
|
|
644
624
|
}
|
|
645
625
|
})] });
|
|
646
626
|
}
|
|
647
|
-
function
|
|
648
|
-
return /* @__PURE__ */
|
|
627
|
+
function Y({ children: e, note: t }) {
|
|
628
|
+
return /* @__PURE__ */ T("div", {
|
|
649
629
|
className: "select-mailcomposer__attachments",
|
|
650
630
|
role: "list",
|
|
651
631
|
"aria-label": "Anexos",
|
|
652
|
-
children: [e, t ? /* @__PURE__ */
|
|
632
|
+
children: [e, t ? /* @__PURE__ */ w("span", {
|
|
653
633
|
className: "select-mailcomposer__attnote",
|
|
654
634
|
children: t
|
|
655
635
|
}) : null]
|
|
656
636
|
});
|
|
657
637
|
}
|
|
658
|
-
function
|
|
659
|
-
let c =
|
|
660
|
-
return /* @__PURE__ */
|
|
638
|
+
function X({ name: e, size: t, state: n = "done", progress: r, error: a, onRemove: o, onRetry: s }) {
|
|
639
|
+
let c = y(e), l = r == null ? null : Math.round(Math.min(1, Math.max(0, r)) * 100), d = n === "uploading" ? l == null ? "Subindo…" : `Subindo… ${l}%` : n === "failed" ? a ?? "Não subiu" : t;
|
|
640
|
+
return /* @__PURE__ */ T("span", {
|
|
661
641
|
className: `select-mailupload select-mailupload--${n}`,
|
|
662
642
|
role: "listitem",
|
|
663
643
|
"aria-busy": n === "uploading" || void 0,
|
|
664
644
|
children: [
|
|
665
|
-
/* @__PURE__ */
|
|
666
|
-
className: `select-mailatt__ext select-mailatt__ext--${
|
|
645
|
+
/* @__PURE__ */ w("span", {
|
|
646
|
+
className: `select-mailatt__ext select-mailatt__ext--${b(c)} select-mailupload__ext`,
|
|
667
647
|
"aria-hidden": "true",
|
|
668
648
|
children: c
|
|
669
649
|
}),
|
|
670
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ T("span", {
|
|
671
651
|
className: "select-mailupload__text",
|
|
672
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ w("span", {
|
|
673
653
|
className: "select-mailupload__name",
|
|
674
654
|
title: e,
|
|
675
655
|
children: e
|
|
676
|
-
}), d ? /* @__PURE__ */
|
|
656
|
+
}), d ? /* @__PURE__ */ w("span", {
|
|
677
657
|
className: "select-mailupload__sub",
|
|
678
658
|
children: d
|
|
679
659
|
}) : null]
|
|
680
660
|
}),
|
|
681
|
-
n === "failed" && s ? /* @__PURE__ */
|
|
661
|
+
n === "failed" && s ? /* @__PURE__ */ w("button", {
|
|
682
662
|
type: "button",
|
|
683
663
|
className: "select-mailupload__btn",
|
|
684
664
|
onClick: s,
|
|
685
665
|
"aria-label": `Subir ${e} de novo`,
|
|
686
666
|
title: "Tentar de novo",
|
|
687
|
-
children: /* @__PURE__ */
|
|
667
|
+
children: /* @__PURE__ */ w(u, {})
|
|
688
668
|
}) : null,
|
|
689
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ w("button", {
|
|
690
670
|
type: "button",
|
|
691
671
|
className: "select-mailupload__btn",
|
|
692
672
|
onClick: o,
|
|
693
673
|
"aria-label": `Tirar o anexo ${e}`,
|
|
694
674
|
title: "Tirar",
|
|
695
|
-
children: /* @__PURE__ */
|
|
675
|
+
children: /* @__PURE__ */ w(i, {})
|
|
696
676
|
}),
|
|
697
|
-
n === "uploading" ? /* @__PURE__ */
|
|
677
|
+
n === "uploading" ? /* @__PURE__ */ w("span", {
|
|
698
678
|
className: "select-mailupload__bar",
|
|
699
679
|
"aria-hidden": "true",
|
|
700
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ w("span", {
|
|
701
681
|
className: l == null ? "is-indeterminate" : void 0,
|
|
702
682
|
style: l == null ? void 0 : { width: `${l}%` }
|
|
703
683
|
})
|
|
@@ -705,35 +685,35 @@ function ee({ name: e, size: t, state: n = "done", progress: r, error: a, onRemo
|
|
|
705
685
|
]
|
|
706
686
|
});
|
|
707
687
|
}
|
|
708
|
-
function
|
|
709
|
-
return /* @__PURE__ */ C
|
|
710
|
-
e ? /* @__PURE__ */
|
|
688
|
+
function Z({ start: e, note: t, end: n }) {
|
|
689
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
690
|
+
e ? /* @__PURE__ */ w("div", {
|
|
711
691
|
className: "select-mailcomposer__start",
|
|
712
692
|
children: e
|
|
713
693
|
}) : null,
|
|
714
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ w("span", {
|
|
715
695
|
className: "select-mailcomposer__note",
|
|
716
696
|
children: t
|
|
717
697
|
}),
|
|
718
|
-
n ? /* @__PURE__ */
|
|
698
|
+
n ? /* @__PURE__ */ w("div", {
|
|
719
699
|
className: "select-mailcomposer__end",
|
|
720
700
|
children: n
|
|
721
701
|
}) : null
|
|
722
702
|
] });
|
|
723
703
|
}
|
|
724
|
-
var
|
|
704
|
+
var ee = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Q = /[\s,;]+/;
|
|
725
705
|
function $(e) {
|
|
726
|
-
return
|
|
706
|
+
return ee.test(e);
|
|
727
707
|
}
|
|
728
|
-
function
|
|
729
|
-
let [s, c] =
|
|
708
|
+
function te({ value: e, onChange: t, labels: n, validate: r = $, placeholder: a, "aria-label": o }) {
|
|
709
|
+
let [s, c] = S(""), l = x(null), u = (n) => {
|
|
730
710
|
let r = n.split(Q).map((e) => e.trim()).filter(Boolean);
|
|
731
711
|
if (c(""), !r.length) return;
|
|
732
712
|
let i = [...e];
|
|
733
713
|
for (let e of r) i.some((t) => t.toLowerCase() === e.toLowerCase()) || i.push(e);
|
|
734
714
|
i.length !== e.length && t(i);
|
|
735
715
|
};
|
|
736
|
-
return /* @__PURE__ */
|
|
716
|
+
return /* @__PURE__ */ T("div", {
|
|
737
717
|
className: "select-recipients",
|
|
738
718
|
onClick: () => {
|
|
739
719
|
var e;
|
|
@@ -741,23 +721,23 @@ function re({ value: e, onChange: t, labels: n, validate: r = $, placeholder: a,
|
|
|
741
721
|
},
|
|
742
722
|
children: [e.map((a) => {
|
|
743
723
|
let o = !r(a), s = (n == null ? void 0 : n[a]) ?? a;
|
|
744
|
-
return /* @__PURE__ */
|
|
745
|
-
className:
|
|
724
|
+
return /* @__PURE__ */ T("span", {
|
|
725
|
+
className: D("select-recipients__chip", o && "is-invalid"),
|
|
746
726
|
title: s === a ? o ? "Endereço inválido" : void 0 : a,
|
|
747
|
-
children: [/* @__PURE__ */
|
|
727
|
+
children: [/* @__PURE__ */ w("span", {
|
|
748
728
|
className: "select-recipients__label",
|
|
749
729
|
children: s
|
|
750
|
-
}), /* @__PURE__ */
|
|
730
|
+
}), /* @__PURE__ */ w("button", {
|
|
751
731
|
type: "button",
|
|
752
732
|
className: "select-recipients__remove",
|
|
753
733
|
"aria-label": `Tirar ${s}`,
|
|
754
734
|
onClick: (n) => {
|
|
755
735
|
n.stopPropagation(), t(e.filter((e) => e !== a));
|
|
756
736
|
},
|
|
757
|
-
children: /* @__PURE__ */
|
|
737
|
+
children: /* @__PURE__ */ w(i, {})
|
|
758
738
|
})]
|
|
759
739
|
}, a);
|
|
760
|
-
}), /* @__PURE__ */
|
|
740
|
+
}), /* @__PURE__ */ w("input", {
|
|
761
741
|
ref: l,
|
|
762
742
|
className: "select-recipients__input",
|
|
763
743
|
value: s,
|
|
@@ -777,39 +757,39 @@ function re({ value: e, onChange: t, labels: n, validate: r = $, placeholder: a,
|
|
|
777
757
|
})]
|
|
778
758
|
});
|
|
779
759
|
}
|
|
780
|
-
function
|
|
781
|
-
return /* @__PURE__ */
|
|
760
|
+
function ne({ open: e, onClose: t, activator: n, templates: r, onPick: i, hint: a, footer: o, empty: s = "Nenhum modelo ainda." }) {
|
|
761
|
+
return /* @__PURE__ */ w(g, {
|
|
782
762
|
active: e,
|
|
783
763
|
onClose: t,
|
|
784
764
|
activator: n,
|
|
785
765
|
placement: "top-start",
|
|
786
766
|
role: "menu",
|
|
787
|
-
children: /* @__PURE__ */
|
|
767
|
+
children: /* @__PURE__ */ T("div", {
|
|
788
768
|
className: "select-tplmenu",
|
|
789
769
|
children: [
|
|
790
|
-
a ? /* @__PURE__ */
|
|
770
|
+
a ? /* @__PURE__ */ w("div", {
|
|
791
771
|
className: "select-tplmenu__hint",
|
|
792
772
|
children: a
|
|
793
773
|
}) : null,
|
|
794
|
-
r.length ? r.map((e) => /* @__PURE__ */
|
|
774
|
+
r.length ? r.map((e) => /* @__PURE__ */ T("button", {
|
|
795
775
|
type: "button",
|
|
796
776
|
role: "menuitem",
|
|
797
777
|
className: "select-tplmenu__item",
|
|
798
778
|
onClick: () => {
|
|
799
779
|
i(e.id), t();
|
|
800
780
|
},
|
|
801
|
-
children: [/* @__PURE__ */
|
|
781
|
+
children: [/* @__PURE__ */ w("span", {
|
|
802
782
|
className: "select-tplmenu__name",
|
|
803
783
|
children: e.name
|
|
804
|
-
}), /* @__PURE__ */
|
|
784
|
+
}), /* @__PURE__ */ w("span", {
|
|
805
785
|
className: "select-tplmenu__subject",
|
|
806
786
|
children: e.subject
|
|
807
787
|
})]
|
|
808
|
-
}, e.id)) : /* @__PURE__ */
|
|
788
|
+
}, e.id)) : /* @__PURE__ */ w("div", {
|
|
809
789
|
className: "select-tplmenu__empty",
|
|
810
790
|
children: s
|
|
811
791
|
}),
|
|
812
|
-
o ? /* @__PURE__ */
|
|
792
|
+
o ? /* @__PURE__ */ w("div", {
|
|
813
793
|
className: "select-tplmenu__footer",
|
|
814
794
|
children: o
|
|
815
795
|
}) : null
|
|
@@ -818,6 +798,6 @@ function ie({ open: e, onClose: t, activator: n, templates: r, onPick: i, hint:
|
|
|
818
798
|
});
|
|
819
799
|
}
|
|
820
800
|
//#endregion
|
|
821
|
-
export {
|
|
801
|
+
export { O as SelectInbox, k as SelectInboxBanner, M as SelectInboxEmpty, A as SelectInboxToolbar, H as SelectLeadChip, J as SelectMailAttachButton, V as SelectMailAttachment, W as SelectMailComposer, Y as SelectMailComposerAttachments, q as SelectMailComposerBody, Z as SelectMailComposerFooter, K as SelectMailComposerInput, G as SelectMailComposerRow, N as SelectMailList, P as SelectMailListGroup, F as SelectMailListItem, L as SelectMailListNote, I as SelectMailListSkeleton, z as SelectMailMessage, B as SelectMailNotice, R as SelectMailReader, X as SelectMailUpload, j as SelectMailboxStatus, te as SelectRecipientInput, ne as SelectTemplateMenu, y as attachmentExt, $ as isMailAddress, E as mailName };
|
|
822
802
|
|
|
823
803
|
//# sourceMappingURL=SelectMail.js.map
|