@selectwin/kit 0.1.258 → 0.1.260

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