@selectwin/kit 0.1.260 → 0.1.261

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -190,6 +190,19 @@ fica dentro da conversa estreita (abaixo de 32rem, em cima do balão), o cartão
190
190
  prender o `sticky` da barra do lote, o pé da conversa com um piso em tela baixa (`--select-mailreader-footer-min`) e o
191
191
  rótulo da lista empilhada na folha lateral com a altura do texto.
192
192
 
193
+ O Chat no celular (0.1.261: a MobileThread, a MobileList e o painel do contato). Tudo opcional, a 0.1.260 segue igual.
194
+ O compositor em pílula (`SelectMailComposer variant="chat" shape="pill"`, ou `shape="auto"`: a pílula no celular e a
195
+ caixa no computador; só o campo fica na pílula, e o emoji, o anexar e o enviar ficam soltos dos lados) e o enviar
196
+ redondo (`SelectChatSendButton round`, ou `round="auto"`: o círculo de 44 px). O rosto da lista
197
+ (`SelectMailListItem channel`: o selo do WhatsApp, do e-mail, do Instagram, do Messenger ou do SMS no canto do rosto;
198
+ `avatarTone="auto"` e `avatarRound`: o tom pelo nome e o rosto redondo de 40 px; o `SelectAvatar tone="auto"` e a conta
199
+ `selectAvatarTone`; os ícones `InstagramIcon` e `MessengerIcon`). O link sublinhado (`SelectLinkButton underline`, e
200
+ `tone="accent"` na cor do link do tema) e o rótulo de seção com ação (`SelectListLabel action`: o rótulo nunca quebra,
201
+ a ação desce antes). E os consertos: no celular, o cabeçalho da conversa com a linha da janela inteira (as ações não
202
+ crescem), e a régua da fileira de ações (`SelectActionBar`) que não ocupa lugar (a página não rola mais de lado numa
203
+ caixa sem moldura). A largura do celular das peças com `auto` mora num endereço só (`SELECT_PHONE_QUERY`, a mesma do
204
+ `@media (max-width: 47.9375em)` do CSS).
205
+
193
206
  ## Build
194
207
 
195
208
  ```bash
@@ -1,16 +1,15 @@
1
1
  /* empty css */
2
2
  import { useSelectMessages as e } from "./SelectLocale.js";
3
- import { useMatchMedia as t } from "./internal/useMatchMedia.js";
4
- import { useFocusTrap as n } from "./internal/useFocusTrap.js";
5
- import { LayerProvider as r, isTopLayer as i, openLayer as a, useParentLayer as o } from "./internal/layers.js";
6
- import { detectSelectTheme as s } from "./detectSelectTheme.js";
7
- import { SelectPopover as c } from "./SelectPopover.js";
8
- import { SelectIconTile as l } from "./SelectIconTile.js";
9
- import { useEffect as u, useRef as d, useState as f } from "react";
10
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
11
- import { createPortal as g } from "react-dom";
3
+ import { SELECT_PHONE_QUERY as t, useMatchMedia as n } from "./internal/useMatchMedia.js";
4
+ import { useFocusTrap as r } from "./internal/useFocusTrap.js";
5
+ import { LayerProvider as i, isTopLayer as a, openLayer as o, useParentLayer as s } from "./internal/layers.js";
6
+ import { detectSelectTheme as c } from "./detectSelectTheme.js";
7
+ import { SelectPopover as l } from "./SelectPopover.js";
8
+ import { SelectIconTile as u } from "./SelectIconTile.js";
9
+ import { useEffect as d, useRef as f, useState as p } from "react";
10
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
+ import { createPortal as _ } from "react-dom";
12
12
  //#region src/SelectAttachMenu.tsx
13
- var _ = "(max-width: 47.9375em)";
14
13
  function v(e) {
15
14
  return (t) => {
16
15
  var n;
@@ -21,32 +20,32 @@ function v(e) {
21
20
  };
22
21
  }
23
22
  function y({ options: e, onPick: t, columns: n, size: r }) {
24
- let i = v(n), a = d(null);
25
- return u(() => {
23
+ let i = v(n), a = f(null);
24
+ return d(() => {
26
25
  var e;
27
26
  (e = a.current) == null || (e = e.querySelector("[data-attach-option]:not(:disabled)")) == null || e.focus({ preventScroll: !0 });
28
- }, []), /* @__PURE__ */ m("div", {
27
+ }, []), /* @__PURE__ */ h("div", {
29
28
  ref: a,
30
29
  className: `select-attach__grid select-attach__grid--${r}`,
31
30
  onKeyDown: i,
32
- children: e.map((e) => /* @__PURE__ */ h("button", {
31
+ children: e.map((e) => /* @__PURE__ */ g("button", {
33
32
  type: "button",
34
33
  role: "menuitem",
35
34
  className: "select-attach__option",
36
35
  "data-attach-option": !0,
37
36
  disabled: e.disabled,
38
37
  onClick: () => t(e.id),
39
- children: [/* @__PURE__ */ m(l, {
38
+ children: [/* @__PURE__ */ h(u, {
40
39
  icon: e.icon,
41
40
  tone: e.tone ?? "neutral",
42
41
  size: r === "lg" ? "lg" : "md",
43
42
  className: "select-attach__tile"
44
- }), /* @__PURE__ */ h("span", {
43
+ }), /* @__PURE__ */ g("span", {
45
44
  className: "select-attach__text",
46
- children: [/* @__PURE__ */ m("span", {
45
+ children: [/* @__PURE__ */ h("span", {
47
46
  className: "select-attach__label",
48
47
  children: e.label
49
- }), e.hint && r === "md" ? /* @__PURE__ */ m("span", {
48
+ }), e.hint && r === "md" ? /* @__PURE__ */ h("span", {
50
49
  className: "select-attach__hint",
51
50
  children: e.hint
52
51
  }) : null]
@@ -54,105 +53,105 @@ function y({ options: e, onPick: t, columns: n, size: r }) {
54
53
  }, e.id))
55
54
  });
56
55
  }
57
- function b({ open: n, onClose: r, activator: i, options: a, onPick: o, title: s, note: l, variant: u = "auto", placement: d = "top-start" }) {
58
- let f = e().chat, p = t(u === "auto" ? _ : void 0), g = u === "sheet" || u === "auto" && p, v = (e) => {
59
- o(e), r();
56
+ function b({ open: r, onClose: i, activator: a, options: o, onPick: s, title: c, note: u, variant: d = "auto", placement: f = "top-start" }) {
57
+ let p = e().chat, m = n(d === "auto" ? t : void 0), _ = d === "sheet" || d === "auto" && m, v = (e) => {
58
+ s(e), i();
60
59
  };
61
- return g ? /* @__PURE__ */ m(x, {
62
- open: n,
63
- onClose: r,
64
- activator: i,
65
- title: s ?? f.attach,
66
- note: l,
67
- children: /* @__PURE__ */ m(y, {
68
- options: a,
60
+ return _ ? /* @__PURE__ */ h(x, {
61
+ open: r,
62
+ onClose: i,
63
+ activator: a,
64
+ title: c ?? p.attach,
65
+ note: u,
66
+ children: /* @__PURE__ */ h(y, {
67
+ options: o,
69
68
  onPick: v,
70
69
  columns: 3,
71
70
  size: "lg"
72
71
  })
73
- }) : /* @__PURE__ */ m(c, {
74
- active: n,
75
- onClose: r,
76
- activator: i,
77
- placement: d,
72
+ }) : /* @__PURE__ */ h(l, {
73
+ active: r,
74
+ onClose: i,
75
+ activator: a,
76
+ placement: f,
78
77
  role: "menu",
79
- children: /* @__PURE__ */ h("div", {
78
+ children: /* @__PURE__ */ g("div", {
80
79
  className: "select-attach",
81
80
  role: "group",
82
- "aria-label": s ?? f.attach,
83
- children: [/* @__PURE__ */ m(y, {
84
- options: a,
81
+ "aria-label": c ?? p.attach,
82
+ children: [/* @__PURE__ */ h(y, {
83
+ options: o,
85
84
  onPick: v,
86
85
  columns: 2,
87
86
  size: "md"
88
- }), l ? /* @__PURE__ */ m("div", {
87
+ }), u ? /* @__PURE__ */ h("div", {
89
88
  className: "select-attach__note",
90
- children: l
89
+ children: u
91
90
  }) : null]
92
91
  })
93
92
  });
94
93
  }
95
- function x({ open: t, onClose: c, activator: l, title: _, note: v, children: y }) {
96
- let b = e().chat, x = d(null), S = d(null), [C] = f(() => ({})), w = o(), [T, E] = f("light"), D = d(c);
97
- return D.current = c, u(() => {
94
+ function x({ open: t, onClose: n, activator: l, title: u, note: v, children: y }) {
95
+ let b = e().chat, x = f(null), S = f(null), [C] = p(() => ({})), w = s(), [T, E] = p("light"), D = f(n);
96
+ return D.current = n, d(() => {
98
97
  if (!t) return;
99
- E(s(x.current));
100
- let e = document.activeElement instanceof HTMLElement && document.activeElement !== document.body ? document.activeElement : null, n = a(C, w), r = (e) => {
101
- e.key === "Escape" && !e.defaultPrevented && i(C) && D.current();
98
+ E(c(x.current));
99
+ let e = document.activeElement instanceof HTMLElement && document.activeElement !== document.body ? document.activeElement : null, n = o(C, w), r = (e) => {
100
+ e.key === "Escape" && !e.defaultPrevented && a(C) && D.current();
102
101
  };
103
102
  document.addEventListener("keydown", r);
104
- let o = document.body.style.overflow;
103
+ let i = document.body.style.overflow;
105
104
  return document.body.style.overflow = "hidden", () => {
106
- n(), document.removeEventListener("keydown", r), document.body.style.overflow = o, e != null && e.isConnected && e.focus({ preventScroll: !0 });
105
+ n(), document.removeEventListener("keydown", r), document.body.style.overflow = i, e != null && e.isConnected && e.focus({ preventScroll: !0 });
107
106
  };
108
107
  }, [
109
108
  t,
110
109
  C,
111
110
  w
112
- ]), n(t, S, { initialFocus: !1 }), /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
111
+ ]), r(t, S, { initialFocus: !1 }), /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
113
112
  className: "select-pop__trigger",
114
113
  ref: x,
115
114
  children: l
116
- }), t && typeof document < "u" ? g(/* @__PURE__ */ h("div", {
115
+ }), t && typeof document < "u" ? _(/* @__PURE__ */ g("div", {
117
116
  className: "select select-attachsheet",
118
117
  "data-theme": T,
119
- children: [/* @__PURE__ */ m("div", {
118
+ children: [/* @__PURE__ */ h("div", {
120
119
  className: "select-attachsheet__scrim",
121
- onClick: c,
120
+ onClick: n,
122
121
  "aria-hidden": "true"
123
- }), /* @__PURE__ */ m("div", {
122
+ }), /* @__PURE__ */ h("div", {
124
123
  ref: S,
125
124
  className: "select-attachsheet__panel",
126
125
  role: "dialog",
127
126
  "aria-modal": "true",
128
- "aria-label": _,
127
+ "aria-label": u,
129
128
  tabIndex: -1,
130
- children: /* @__PURE__ */ h(r, {
129
+ children: /* @__PURE__ */ g(i, {
131
130
  value: C,
132
131
  children: [
133
- /* @__PURE__ */ m("span", {
132
+ /* @__PURE__ */ h("span", {
134
133
  className: "select-attachsheet__handle",
135
134
  "aria-hidden": "true"
136
135
  }),
137
- /* @__PURE__ */ h("div", {
136
+ /* @__PURE__ */ g("div", {
138
137
  className: "select-attachsheet__head",
139
- children: [/* @__PURE__ */ m("span", {
138
+ children: [/* @__PURE__ */ h("span", {
140
139
  className: "select-attachsheet__title",
141
- children: _
142
- }), /* @__PURE__ */ m("button", {
140
+ children: u
141
+ }), /* @__PURE__ */ h("button", {
143
142
  type: "button",
144
143
  className: "select-attachsheet__close",
145
- onClick: c,
144
+ onClick: n,
146
145
  children: b.close
147
146
  })]
148
147
  }),
149
- /* @__PURE__ */ m("div", {
148
+ /* @__PURE__ */ h("div", {
150
149
  className: "select-attach",
151
150
  role: "menu",
152
- "aria-label": _,
151
+ "aria-label": u,
153
152
  children: y
154
153
  }),
155
- v ? /* @__PURE__ */ m("div", {
154
+ v ? /* @__PURE__ */ h("div", {
156
155
  className: "select-attachsheet__note",
157
156
  children: v
158
157
  }) : null
@@ -9,8 +9,12 @@ type SelectAvatarOwnProps = {
9
9
  round?: boolean;
10
10
  /** `sm` (1.25rem, 0.1.225: dentro de uma pílula — o trocador de workspace), `md` (2.25rem, rows) or `lg` (3.75rem, page header). */
11
11
  size?: 'sm' | 'md' | 'lg';
12
- /** 0.1.225: `accent` — as iniciais no tom do acento (o workspace, a marca), em vez do cinza neutro da pessoa. */
13
- tone?: 'neutral' | 'accent';
12
+ /**
13
+ * 0.1.225: `accent` — as iniciais no tom do acento (o workspace, a marca), em vez do cinza neutro da pessoa. 0.1.261:
14
+ * `auto` — o tom vem do nome (`selectAvatarTone`: o cinza, o azul, o verde, o âmbar ou o rosa, sempre o mesmo para o
15
+ * mesmo nome), como os rostos das pranchas do Chat.
16
+ */
17
+ tone?: 'neutral' | 'accent' | 'auto';
14
18
  /** How many letters stand for the name: 1 (default) or 2 (first + last word). */
15
19
  initials?: 1 | 2;
16
20
  /**
@@ -21,6 +25,16 @@ type SelectAvatarOwnProps = {
21
25
  };
22
26
  export type SelectAvatarProps = SelectAvatarOwnProps & Omit<ComponentPropsWithoutRef<'span'>, keyof SelectAvatarOwnProps>;
23
27
  export declare const SelectAvatar: import('react').ForwardRefExoticComponent<SelectAvatarOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, keyof SelectAvatarOwnProps> & import('react').RefAttributes<HTMLSpanElement>>;
28
+ /**
29
+ * Os tons do rosto pelo nome (0.1.261): o cinza de sempre e os quatro dos avisos do kit, cada par (o fundo e o texto)
30
+ * com o contraste do AA no claro e no escuro. O do acento fica de fora: o azul sobre o tom dele não chega ao AA no claro.
31
+ */
32
+ export type SelectAvatarTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
33
+ /**
34
+ * O tom do rosto de um nome (`tone="auto"`): a soma dos códigos das letras (sem caixa nem espaços nas pontas) escolhe
35
+ * um dos cinco. O mesmo nome tem sempre o mesmo tom, em qualquer tela; sem nome, o cinza. PURA.
36
+ */
37
+ export declare function selectAvatarTone(name: string | undefined): SelectAvatarTone;
24
38
  /** The letters that stand for a name: the first letter, or first + last word's first letters.
25
39
  * Só letra e número contam (0.1.253): "Plataform (main)" → "PM", não "P(" — o parêntese, a aspa e o traço solto
26
40
  * não são inicial, e a palavra que é só pontuação ("—", "&") não conta. */
@@ -1,34 +1,45 @@
1
1
  import { forwardRef as e, useState as t } from "react";
2
2
  import { jsx as n } from "react/jsx-runtime";
3
3
  //#region src/SelectAvatar.tsx
4
- var r = e(function({ name: e, src: r, icon: a, dashed: o = !1, round: s = !1, size: c = "md", tone: l = "neutral", initials: u = 1, monogram: d, className: f, ...p }, m) {
5
- let h = (d == null ? void 0 : d.trim().slice(0, 3).toUpperCase()) || i(e, u), [g, _] = t(null), v = !!r && g !== r;
4
+ var r = e(function({ name: e, src: r, icon: i, dashed: s = !1, round: c = !1, size: l = "md", tone: u = "neutral", initials: d = 1, monogram: f, className: p, ...m }, h) {
5
+ let g = f == null ? void 0 : f.trim().slice(0, 3).toUpperCase(), _ = u === "auto" ? a(e) : null, v = u === "accent" ? "accent" : _ && _ !== "neutral" ? _ : null, y = g || o(e, d), [b, x] = t(null), S = !!r && b !== r;
6
6
  return /* @__PURE__ */ n("span", {
7
- ref: m,
8
- ...p,
9
- className: `select-avatar${c === "lg" ? " select-avatar--lg" : c === "sm" ? " select-avatar--sm" : ""}${l === "accent" ? " select-avatar--accent" : ""}${o ? " select-avatar--dashed" : ""}${s ? " select-avatar--round" : ""}${f ? " " + f : ""}`,
7
+ ref: h,
8
+ ...m,
9
+ className: `select-avatar${l === "lg" ? " select-avatar--lg" : l === "sm" ? " select-avatar--sm" : ""}${v ? ` select-avatar--${v}` : ""}${s ? " select-avatar--dashed" : ""}${c ? " select-avatar--round" : ""}${p ? " " + p : ""}`,
10
10
  "aria-hidden": "true",
11
- children: v ? /* @__PURE__ */ n("img", {
11
+ children: S ? /* @__PURE__ */ n("img", {
12
12
  src: r,
13
13
  alt: "",
14
14
  className: "select-avatar__img",
15
- onError: () => _(r ?? null)
16
- }) : a ? /* @__PURE__ */ n("span", {
15
+ onError: () => x(r ?? null)
16
+ }) : i ? /* @__PURE__ */ n("span", {
17
17
  className: "select-avatar__icon",
18
- children: a
18
+ children: i
19
19
  }) : /* @__PURE__ */ n("span", {
20
- className: `select-avatar__initial${h.length > 2 ? " select-avatar__initial--long" : ""}`,
21
- children: h
20
+ className: `select-avatar__initial${y.length > 2 ? " select-avatar__initial--long" : ""}`,
21
+ children: y
22
22
  })
23
23
  });
24
- });
25
- function i(e, t = 1) {
24
+ }), i = [
25
+ "neutral",
26
+ "info",
27
+ "success",
28
+ "warning",
29
+ "danger"
30
+ ];
31
+ function a(e) {
32
+ let t = (e ?? "").trim().toLowerCase(), n = 0;
33
+ for (let e of t) n += e.codePointAt(0);
34
+ return i[n % i.length];
35
+ }
36
+ function o(e, t = 1) {
26
37
  let n = (e ?? "").trim().split(/\s+/).map((e) => e.replace(/[^\p{L}\p{M}\p{N}]/gu, "")).filter(Boolean);
27
38
  if (n.length === 0) return "?";
28
39
  let r = n[0][0].toUpperCase();
29
40
  return t === 1 || n.length === 1 ? r : r + n[n.length - 1][0].toUpperCase();
30
41
  }
31
42
  //#endregion
32
- export { r as SelectAvatar, i as avatarInitials };
43
+ export { r as SelectAvatar, o as avatarInitials, a as selectAvatarTone };
33
44
 
34
45
  //# sourceMappingURL=SelectAvatar.js.map
@@ -8,6 +8,11 @@ type SelectChatSendButtonOwnProps = {
8
8
  busy?: boolean;
9
9
  /** O nome para o leitor de tela e a dica (padrão: "Enviar" ou "Gravar áudio"). */
10
10
  label?: string;
11
+ /**
12
+ * 0.1.261: o CÍRCULO de 44 px da prancha do celular, no lugar do quadrado de canto redondo de 38 px. `true` sempre;
13
+ * `auto` no celular (até 47,9375em), o quadrado no computador.
14
+ */
15
+ round?: boolean | 'auto';
11
16
  };
12
17
  export type SelectChatSendButtonProps = SelectChatSendButtonOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectChatSendButtonOwnProps | 'type' | 'children'>;
13
18
  export declare const SelectChatSendButton: import('react').ForwardRefExoticComponent<SelectChatSendButtonOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "children" | keyof SelectChatSendButtonOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,25 +1,26 @@
1
1
  /* empty css */
2
2
  import { MicrophoneIcon as e, SendIcon as t } from "./icons.js";
3
3
  import { useSelectMessages as n } from "./SelectLocale.js";
4
- import { forwardRef as r } from "react";
5
- import { jsx as i } from "react/jsx-runtime";
4
+ import { SELECT_PHONE_QUERY as r, useMatchMedia as i } from "./internal/useMatchMedia.js";
5
+ import { forwardRef as a } from "react";
6
+ import { jsx as o } from "react/jsx-runtime";
6
7
  //#region src/SelectChatSendButton.tsx
7
- var a = r(function({ mode: r = "send", onClick: a, disabled: o = !1, busy: s = !1, label: c, className: l, ...u }, d) {
8
- let f = n().chat, p = c ?? (r === "record" ? f.record : f.send);
9
- return /* @__PURE__ */ i("button", {
10
- ref: d,
11
- ...u,
8
+ var s = a(function({ mode: a = "send", onClick: s, disabled: c = !1, busy: l = !1, label: u, round: d = !1, className: f, ...p }, m) {
9
+ let h = n().chat, g = i(d === "auto" ? r : void 0), _ = d === !0 || d === "auto" && g, v = u ?? (a === "record" ? h.record : h.send);
10
+ return /* @__PURE__ */ o("button", {
11
+ ref: m,
12
+ ...p,
12
13
  type: "button",
13
- className: `select-chatsend select-chatsend--${r}${l ? " " + l : ""}`,
14
- "aria-label": p,
15
- title: p,
16
- "aria-busy": s || void 0,
17
- disabled: o || s,
18
- onClick: a,
19
- children: i(r === "record" ? e : t, {})
14
+ className: `select-chatsend select-chatsend--${a}${_ ? " select-chatsend--round" : ""}${f ? " " + f : ""}`,
15
+ "aria-label": v,
16
+ title: v,
17
+ "aria-busy": l || void 0,
18
+ disabled: c || l,
19
+ onClick: s,
20
+ children: o(a === "record" ? e : t, {})
20
21
  });
21
22
  });
22
23
  //#endregion
23
- export { a as SelectChatSendButton };
24
+ export { s as SelectChatSendButton };
24
25
 
25
26
  //# sourceMappingURL=SelectChatSendButton.js.map
@@ -3,8 +3,13 @@ type SelectLinkButtonOwnProps = {
3
3
  children: ReactNode;
4
4
  onClick?: () => void;
5
5
  disabled?: boolean;
6
- /** `critical` paints the link red for destructive actions (Revogar, Desvincular). */
7
- tone?: 'default' | 'critical';
6
+ /**
7
+ * `critical` paints the link red for destructive actions (Revogar, Desvincular). 0.1.261: `accent` — a cor do link do
8
+ * tema (o `--select-accent`), como o "Ver tudo (14)" das pranchas do Chat.
9
+ */
10
+ tone?: 'default' | 'critical' | 'accent';
11
+ /** 0.1.261: o sublinhado sempre à vista (não só no ponteiro), como o link das pranchas do Chat. */
12
+ underline?: boolean;
8
13
  };
9
14
  export type SelectLinkButtonProps = SelectLinkButtonOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectLinkButtonOwnProps>;
10
15
  export declare const SelectLinkButton: import('react').ForwardRefExoticComponent<SelectLinkButtonOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof SelectLinkButtonOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,12 +1,12 @@
1
1
  import { forwardRef as e } from "react";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/SelectLinkButton.tsx
4
- var n = e(function({ children: e, onClick: n, disabled: r = !1, tone: i = "default", className: a, ...o }, s) {
4
+ var n = e(function({ children: e, onClick: n, disabled: r = !1, tone: i = "default", underline: a = !1, className: o, ...s }, c) {
5
5
  return /* @__PURE__ */ t("button", {
6
- ref: s,
7
- ...o,
6
+ ref: c,
7
+ ...s,
8
8
  type: "button",
9
- className: `select-linkbtn${i === "critical" ? " select-linkbtn--critical" : ""}${a ? " " + a : ""}`,
9
+ className: `select-linkbtn${i === "critical" ? " select-linkbtn--critical" : i === "accent" ? " select-linkbtn--accent" : ""}${a ? " select-linkbtn--underline" : ""}${o ? " " + o : ""}`,
10
10
  onClick: n,
11
11
  disabled: r,
12
12
  children: e
@@ -86,10 +86,15 @@ export declare function SelectListRow({ media, mediaSize, title, secondary, acti
86
86
  }): import("react").JSX.Element;
87
87
  /**
88
88
  * SelectListLabel — o rótulo de um GRUPO dentro da caixa de linhas ("O que mais conta neste
89
- * motivo" / "Outros comprovantes"): caixa alta pequena, sem ação. Separa as linhas sem abrir um
89
+ * motivo" / "Outros comprovantes"): caixa alta pequena. Separa as linhas sem abrir um
90
90
  * segundo card.
91
+ *
92
+ * 0.1.261: `action` põe uma ação à direita do rótulo ("Ver tudo (14)", o `SelectLinkButton`). O rótulo nunca quebra a
93
+ * linha: quando os dois não cabem (o painel do contato de 260 px), a ação desce para a linha de baixo, à direita, e o
94
+ * rótulo que nem sozinho cabe termina nas reticências.
91
95
  */
92
- export declare function SelectListLabel({ children }: {
96
+ export declare function SelectListLabel({ children, action }: {
93
97
  children: ReactNode;
98
+ action?: ReactNode;
94
99
  }): import("react").JSX.Element;
95
100
  export {};
@@ -107,10 +107,19 @@ function u({ media: t, mediaSize: n = "icon", title: r, secondary: i, action: a,
107
107
  children: _
108
108
  });
109
109
  }
110
- function d({ children: e }) {
111
- return /* @__PURE__ */ s("div", {
110
+ function d({ children: e, action: t }) {
111
+ return t == null || t === !1 ? /* @__PURE__ */ s("div", {
112
112
  className: "select-listlabel",
113
113
  children: e
114
+ }) : /* @__PURE__ */ c("div", {
115
+ className: "select-listlabel select-listlabel--action",
116
+ children: [/* @__PURE__ */ s("span", {
117
+ className: "select-listlabel__text",
118
+ children: e
119
+ }), /* @__PURE__ */ s("span", {
120
+ className: "select-listlabel__action",
121
+ children: t
122
+ })]
114
123
  });
115
124
  }
116
125
  //#endregion
@@ -126,6 +126,8 @@ export interface SelectKitMessages {
126
126
  attachmentOpen: (name: string) => string;
127
127
  attachmentBusy: (name: string) => string;
128
128
  attachmentGet: (name: string) => string;
129
+ /** 0.1.261: o nome do canal do selo no rosto da lista (`SelectMailListItem channel`). */
130
+ channel: Record<'whatsapp' | 'email' | 'instagram' | 'messenger' | 'sms', string>;
129
131
  };
130
132
  /**
131
133
  * 0.1.254: as peças do chat (o inbox do WhatsApp) — o estado do envio, a citação, as reações, o seletor de emoji, o
@@ -133,7 +133,14 @@ var r = {
133
133
  attachmentFailed: "Não deu para pegar · tentar de novo",
134
134
  attachmentOpen: (e) => `Abrir ${e} em outra aba`,
135
135
  attachmentBusy: (e) => `${e}: gerando o link`,
136
- attachmentGet: (e) => `Pegar o anexo ${e}`
136
+ attachmentGet: (e) => `Pegar o anexo ${e}`,
137
+ channel: {
138
+ whatsapp: "WhatsApp",
139
+ email: "E-mail",
140
+ instagram: "Instagram",
141
+ messenger: "Messenger",
142
+ sms: "SMS"
143
+ }
137
144
  },
138
145
  chat: {
139
146
  status: {
@@ -495,7 +502,14 @@ var r = {
495
502
  attachmentFailed: "Couldn't get it · try again",
496
503
  attachmentOpen: (e) => `Open ${e} in a new tab`,
497
504
  attachmentBusy: (e) => `${e}: getting the link`,
498
- attachmentGet: (e) => `Get the attachment ${e}`
505
+ attachmentGet: (e) => `Get the attachment ${e}`,
506
+ channel: {
507
+ whatsapp: "WhatsApp",
508
+ email: "Email",
509
+ instagram: "Instagram",
510
+ messenger: "Messenger",
511
+ sms: "SMS"
512
+ }
499
513
  },
500
514
  chat: {
501
515
  status: {
@@ -122,9 +122,20 @@ export interface SelectMailListItemProps {
122
122
  * destaque como a `unread`.
123
123
  */
124
124
  unreadCount?: number;
125
+ /**
126
+ * 0.1.261: o selo do canal no canto do rosto (o WhatsApp, o e-mail, o Instagram, o Messenger, o SMS), como nas
127
+ * pranchas do Chat e do CRM. O nome do canal vai ao leitor de tela junto com a linha. Só com o rosto (sem `avatar={false}`).
128
+ */
129
+ channel?: SelectMailChannel;
130
+ /** 0.1.261: o tom do rosto — `neutral` (o padrão, o cinza de antes) ou `auto` (pelo nome, os tons das pranchas do Chat). */
131
+ avatarTone?: 'neutral' | 'auto';
132
+ /** 0.1.261: o rosto redondo de 40 px das pranchas do Chat, no lugar do quadrado de 32 px. */
133
+ avatarRound?: boolean;
125
134
  onClick: () => void;
126
135
  }
127
- export declare function SelectMailListItem({ from, avatar, subject, snippet, date, count, attachments, active, unread: unreadProp, flagged, unreadCount, onClick, }: SelectMailListItemProps): import("react").JSX.Element;
136
+ /** 0.1.261: os canais do selo no rosto da lista. */
137
+ export type SelectMailChannel = 'whatsapp' | 'email' | 'instagram' | 'messenger' | 'sms';
138
+ export declare function SelectMailListItem({ from, avatar, subject, snippet, date, count, attachments, active, unread: unreadProp, flagged, unreadCount, channel, avatarTone, avatarRound, onClick, }: SelectMailListItemProps): import("react").JSX.Element;
128
139
  /** As linhas fantasmas enquanto a caixa chega. */
129
140
  export declare function SelectMailListSkeleton({ rows }: {
130
141
  rows?: number;
@@ -239,6 +250,13 @@ export interface SelectMailComposerProps {
239
250
  hint?: ReactNode;
240
251
  /** 0.1.260, no `chat`: a dica da direita ("Texto livre até amanhã, 14:32"). */
241
252
  hintEnd?: ReactNode;
253
+ /**
254
+ * 0.1.261, no `chat`: a forma. `box` (o padrão, a 0.1.260) é a caixa com o filete e o canto de 16 px; `pill` é a
255
+ * PÍLULA da prancha do celular — só o campo fica na pílula (o fundo apagado, o canto redondo inteiro, 46 px numa linha),
256
+ * e o `start` e o `end` ficam soltos dos lados; `auto` é a pílula no celular (até 47,9375em, onde a caixa vira uma
257
+ * coluna só) e a caixa no computador.
258
+ */
259
+ shape?: 'box' | 'pill' | 'auto';
242
260
  /** O título da janela (`dock`): o assunto, ou "Nova mensagem". */
243
261
  title?: ReactNode;
244
262
  /** A janela recolhida: só o título. */
@@ -261,7 +279,7 @@ export interface SelectMailComposerProps {
261
279
  children: ReactNode;
262
280
  'aria-label'?: string;
263
281
  }
264
- export declare function SelectMailComposer({ variant, title, minimized, onToggleMinimize, onClose, closeLabel, error, attachments, onFiles, dropLabel, footer, start, end, hint, hintEnd, children, 'aria-label': ariaLabel, }: SelectMailComposerProps): import("react").JSX.Element;
282
+ export declare function SelectMailComposer({ variant, title, minimized, onToggleMinimize, onClose, closeLabel, error, attachments, onFiles, dropLabel, footer, start, end, hint, hintEnd, shape, children, 'aria-label': ariaLabel, }: SelectMailComposerProps): import("react").JSX.Element;
265
283
  /** Uma linha do compositor: o rótulo ("Para", "Cc", "Assunto"), o campo e uma ação à direita ("Cc"). */
266
284
  export declare function SelectMailComposerRow({ label, children, action }: {
267
285
  label?: ReactNode;