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