@selectwin/kit 0.1.262 → 0.1.263

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