@selectwin/kit 0.1.221 → 0.1.223
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/dist/SelectAssistant.js +97 -97
- package/dist/SelectAssistantLauncher.d.ts +21 -0
- package/dist/SelectAssistantLauncher.js +37 -0
- package/dist/SelectAuthSplit.d.ts +26 -0
- package/dist/SelectAuthSplit.js +46 -0
- package/dist/SelectConversation.d.ts +26 -3
- package/dist/SelectConversation.js +102 -64
- package/dist/SelectLocale.d.ts +7 -0
- package/dist/SelectLocale.js +24 -0
- package/dist/SelectOtpInput.js +39 -38
- package/dist/SelectPasswordStrength.js +33 -32
- package/dist/index.d.ts +4 -1
- package/dist/index.js +132 -130
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectAssistant.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { CloseIcon as e, SendIcon as t } from "./icons.js";
|
|
3
3
|
import { useSelectMessages as n } from "./SelectLocale.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { AssistantLauncherButton as r } from "./SelectAssistantLauncher.js";
|
|
5
|
+
import { useEffect as i, useId as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
7
|
//#region src/SelectAssistant.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
let e =
|
|
12
|
-
if (!
|
|
13
|
-
|
|
8
|
+
var u = 240;
|
|
9
|
+
function d({ open: d, onOpenChange: f, icon: p, title: g, subtitle: _, launcherLabel: v, badge: y, children: b, scrollKey: x, suggestions: S, onSuggestion: C, onSend: w, placeholder: T, disabled: E = !1, typing: D = !1, headerAction: O, anchor: k = "viewport", closeLabel: A, sendLabel: j, inputLabel: M, className: N }) {
|
|
10
|
+
let P = n(), F = A ?? P.common.close, I = j ?? P.assistant.send, L = M ?? P.assistant.input, R = a(), z = o(null), B = o(null), V = o(null), [H, U] = s(""), W = o(0), G = D !== !1;
|
|
11
|
+
i(() => {
|
|
12
|
+
let e = z.current;
|
|
13
|
+
if (!d || !e) {
|
|
14
|
+
W.current = 0;
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
16
|
-
let t =
|
|
17
|
-
|
|
17
|
+
let t = W.current === 0, n = e.children[W.current];
|
|
18
|
+
W.current = e.children.length;
|
|
18
19
|
let r = e.querySelectorAll(":scope > .select-chat__turn"), i = r.length > 0 ? r[r.length - 1] : null;
|
|
19
20
|
if (!i && n && !t) {
|
|
20
21
|
let e = n.previousElementSibling;
|
|
@@ -23,162 +24,161 @@ function u({ open: u, onOpenChange: d, icon: f, title: h, subtitle: g, launcherL
|
|
|
23
24
|
let a = e.scrollHeight - e.clientHeight, o = i ? Math.min(a, i.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop - 12) : a;
|
|
24
25
|
t ? e.scrollTop = o : o > e.scrollTop + 1 && (typeof e.scrollTo == "function" ? e.scrollTo({
|
|
25
26
|
top: o,
|
|
26
|
-
behavior:
|
|
27
|
+
behavior: h() ? "auto" : "smooth"
|
|
27
28
|
}) : e.scrollTop = o);
|
|
28
29
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]),
|
|
30
|
+
d,
|
|
31
|
+
x,
|
|
32
|
+
G
|
|
33
|
+
]), i(() => {
|
|
33
34
|
var e;
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
let
|
|
35
|
+
d && typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(hover: hover) and (pointer: fine)").matches && ((e = B.current) == null || e.focus());
|
|
36
|
+
}, [d]);
|
|
37
|
+
let K = o(!1);
|
|
38
|
+
i(() => {
|
|
37
39
|
var e;
|
|
38
|
-
d(!1
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
e.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
children: [u && /* @__PURE__ */ c("section", {
|
|
49
|
-
id: L,
|
|
40
|
+
!d && K.current && (K.current = !1, (e = V.current) == null || e.focus());
|
|
41
|
+
}, [d]);
|
|
42
|
+
let q = () => {
|
|
43
|
+
var e;
|
|
44
|
+
K.current = !0, f(!1), (e = V.current) == null || e.focus();
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ l("div", {
|
|
47
|
+
className: "select-assistant" + (k === "container" ? " select-assistant--container" : "") + (d ? " is-open" : "") + (N ? " " + N : ""),
|
|
48
|
+
children: [d && /* @__PURE__ */ l("section", {
|
|
49
|
+
id: R,
|
|
50
50
|
className: "select-assistant__panel",
|
|
51
51
|
role: "dialog",
|
|
52
52
|
"aria-modal": "false",
|
|
53
|
-
"aria-label": typeof
|
|
54
|
-
onKeyDown:
|
|
53
|
+
"aria-label": typeof g == "string" ? g : v,
|
|
54
|
+
onKeyDown: (e) => {
|
|
55
|
+
e.key === "Escape" && (e.stopPropagation(), q());
|
|
56
|
+
},
|
|
55
57
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ l("header", {
|
|
57
59
|
className: "select-assistant__head",
|
|
58
60
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ c("span", {
|
|
60
62
|
className: "select-assistant__mark",
|
|
61
63
|
"aria-hidden": "true",
|
|
62
|
-
children:
|
|
64
|
+
children: p
|
|
63
65
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ l("div", {
|
|
65
67
|
className: "select-assistant__heading",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ c("span", {
|
|
67
69
|
className: "select-assistant__title",
|
|
68
|
-
children: h
|
|
69
|
-
}), g != null && /* @__PURE__ */ s("span", {
|
|
70
|
-
className: "select-assistant__subtitle",
|
|
71
70
|
children: g
|
|
71
|
+
}), _ != null && /* @__PURE__ */ c("span", {
|
|
72
|
+
className: "select-assistant__subtitle",
|
|
73
|
+
children: _
|
|
72
74
|
})]
|
|
73
75
|
}),
|
|
74
|
-
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
+
O,
|
|
77
|
+
/* @__PURE__ */ c("button", {
|
|
76
78
|
type: "button",
|
|
77
79
|
className: "select-assistant__close",
|
|
78
|
-
onClick:
|
|
79
|
-
"aria-label":
|
|
80
|
-
title:
|
|
81
|
-
children: /* @__PURE__ */
|
|
80
|
+
onClick: q,
|
|
81
|
+
"aria-label": F,
|
|
82
|
+
title: F,
|
|
83
|
+
children: /* @__PURE__ */ c(e, {})
|
|
82
84
|
})
|
|
83
85
|
]
|
|
84
86
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
ref:
|
|
87
|
+
/* @__PURE__ */ l("div", {
|
|
88
|
+
ref: z,
|
|
87
89
|
className: "select-assistant__body",
|
|
88
90
|
role: "log",
|
|
89
91
|
"aria-live": "polite",
|
|
90
|
-
children: [
|
|
92
|
+
children: [b, G ? /* @__PURE__ */ c(m, { label: typeof D == "string" ? D : void 0 }) : null]
|
|
91
93
|
}),
|
|
92
|
-
(
|
|
94
|
+
(w || S && S.length > 0) && /* @__PURE__ */ l("footer", {
|
|
93
95
|
className: "select-assistant__foot",
|
|
94
|
-
children: [
|
|
96
|
+
children: [S && S.length > 0 && /* @__PURE__ */ c("div", {
|
|
95
97
|
className: "select-assistant__suggestions",
|
|
96
|
-
children:
|
|
98
|
+
children: S.map((e) => /* @__PURE__ */ c("button", {
|
|
97
99
|
type: "button",
|
|
98
100
|
className: "select-assistant__chip",
|
|
99
|
-
disabled:
|
|
100
|
-
onClick: () =>
|
|
101
|
+
disabled: E || G,
|
|
102
|
+
onClick: () => C == null ? void 0 : C(e.id),
|
|
101
103
|
children: e.label
|
|
102
104
|
}, e.id))
|
|
103
|
-
}),
|
|
105
|
+
}), w && /* @__PURE__ */ l("form", {
|
|
104
106
|
className: "select-assistant__composer",
|
|
105
|
-
onSubmit:
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
onSubmit: (e) => {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
let t = H.trim();
|
|
110
|
+
!t || E || G || (w == null || w(t), U(""));
|
|
111
|
+
},
|
|
112
|
+
children: [/* @__PURE__ */ c("input", {
|
|
113
|
+
ref: B,
|
|
108
114
|
className: "select-assistant__input",
|
|
109
115
|
type: "text",
|
|
110
|
-
value:
|
|
111
|
-
onChange: (e) =>
|
|
112
|
-
placeholder:
|
|
113
|
-
"aria-label":
|
|
114
|
-
maxLength:
|
|
116
|
+
value: H,
|
|
117
|
+
onChange: (e) => U(e.target.value),
|
|
118
|
+
placeholder: T,
|
|
119
|
+
"aria-label": L,
|
|
120
|
+
maxLength: u,
|
|
115
121
|
autoComplete: "off",
|
|
116
122
|
enterKeyHint: "send",
|
|
117
|
-
disabled:
|
|
118
|
-
}), /* @__PURE__ */
|
|
123
|
+
disabled: E
|
|
124
|
+
}), /* @__PURE__ */ c("button", {
|
|
119
125
|
type: "submit",
|
|
120
126
|
className: "select-assistant__send",
|
|
121
|
-
disabled:
|
|
122
|
-
"aria-label":
|
|
123
|
-
title:
|
|
124
|
-
children: /* @__PURE__ */
|
|
127
|
+
disabled: E || G || H.trim() === "",
|
|
128
|
+
"aria-label": I,
|
|
129
|
+
title: I,
|
|
130
|
+
children: /* @__PURE__ */ c(t, {})
|
|
125
131
|
})]
|
|
126
132
|
})]
|
|
127
133
|
})
|
|
128
134
|
]
|
|
129
|
-
}), /* @__PURE__ */ c(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
title: _,
|
|
138
|
-
children: [u ? /* @__PURE__ */ s(e, {}) : f, J && !u && /* @__PURE__ */ s("span", {
|
|
139
|
-
className: "select-assistant__badge",
|
|
140
|
-
"aria-hidden": "true",
|
|
141
|
-
children: v > 99 ? "99+" : v
|
|
142
|
-
})]
|
|
135
|
+
}), /* @__PURE__ */ c(r, {
|
|
136
|
+
buttonRef: V,
|
|
137
|
+
icon: p,
|
|
138
|
+
label: v,
|
|
139
|
+
badge: y,
|
|
140
|
+
open: d,
|
|
141
|
+
controls: d ? R : void 0,
|
|
142
|
+
onClick: () => f(!d)
|
|
143
143
|
})]
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return /* @__PURE__ */
|
|
146
|
+
function f({ from: e, bare: t = !1, children: n }) {
|
|
147
|
+
return /* @__PURE__ */ c("div", {
|
|
148
148
|
className: `select-chat__msg select-chat__msg--${e}${t ? " select-chat__msg--bare" : ""}`,
|
|
149
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ c("div", {
|
|
150
150
|
className: "select-chat__bubble",
|
|
151
151
|
children: n
|
|
152
152
|
})
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return /* @__PURE__ */
|
|
155
|
+
function p({ children: e }) {
|
|
156
|
+
return /* @__PURE__ */ c("div", {
|
|
157
157
|
className: "select-chat__turn",
|
|
158
158
|
children: e
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function m({ label: e }) {
|
|
162
162
|
let t = n().assistant.typing;
|
|
163
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ c("div", {
|
|
164
164
|
className: "select-chat__msg select-chat__msg--assistant select-chat__msg--typing",
|
|
165
165
|
role: "status",
|
|
166
166
|
"aria-label": e ?? t,
|
|
167
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ l("div", {
|
|
168
168
|
className: "select-chat__bubble",
|
|
169
169
|
"aria-hidden": "true",
|
|
170
170
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ c("span", { className: "select-chat__dot" }),
|
|
172
|
+
/* @__PURE__ */ c("span", { className: "select-chat__dot" }),
|
|
173
|
+
/* @__PURE__ */ c("span", { className: "select-chat__dot" })
|
|
174
174
|
]
|
|
175
175
|
})
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function h() {
|
|
179
179
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
|
-
export {
|
|
182
|
+
export { d as SelectAssistant, f as SelectChatMessage, p as SelectChatTurn, m as SelectChatTyping };
|
|
183
183
|
|
|
184
184
|
//# sourceMappingURL=SelectAssistant.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
/** O botão em si (o `SelectAssistant` usa o mesmo). */
|
|
3
|
+
export declare function AssistantLauncherButton({ icon, label, badge, open, controls, onClick, buttonRef, }: {
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
badge?: number;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
controls?: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** O botão no canto, antes de a janela existir: no mesmo lugar do `SelectAssistant` (`anchor`, as distâncias). */
|
|
13
|
+
export declare function SelectAssistantLauncher({ icon, label, badge, onClick, anchor, className, }: {
|
|
14
|
+
icon: ReactNode;
|
|
15
|
+
/** O nome do botão ("Ao vivo"). */
|
|
16
|
+
label: string;
|
|
17
|
+
badge?: number;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
anchor?: 'viewport' | 'container';
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { CloseIcon as e } from "./icons.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/SelectAssistantLauncher.tsx
|
|
5
|
+
function r({ icon: r, label: i, badge: a, open: o = !1, controls: s, onClick: c, buttonRef: l }) {
|
|
6
|
+
let u = typeof a == "number" && a > 0;
|
|
7
|
+
return /* @__PURE__ */ n("button", {
|
|
8
|
+
ref: l,
|
|
9
|
+
type: "button",
|
|
10
|
+
className: "select-assistant__launcher",
|
|
11
|
+
onClick: c,
|
|
12
|
+
"aria-expanded": o,
|
|
13
|
+
"aria-controls": s,
|
|
14
|
+
"aria-label": u ? `${i} (${a})` : i,
|
|
15
|
+
title: i,
|
|
16
|
+
children: [o ? /* @__PURE__ */ t(e, {}) : r, u && !o && /* @__PURE__ */ t("span", {
|
|
17
|
+
className: "select-assistant__badge",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
children: a > 99 ? "99+" : a
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function i({ icon: e, label: n, badge: i, onClick: a, anchor: o = "viewport", className: s }) {
|
|
24
|
+
return /* @__PURE__ */ t("div", {
|
|
25
|
+
className: "select-assistant" + (o === "container" ? " select-assistant--container" : "") + (s ? " " + s : ""),
|
|
26
|
+
children: /* @__PURE__ */ t(r, {
|
|
27
|
+
icon: e,
|
|
28
|
+
label: n,
|
|
29
|
+
badge: i,
|
|
30
|
+
onClick: a
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { r as AssistantLauncherButton, i as SelectAssistantLauncher };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=SelectAssistantLauncher.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectAuthSplitProps {
|
|
3
|
+
/** Em cima, à esquerda: o logo da casa. */
|
|
4
|
+
logo: ReactNode;
|
|
5
|
+
/** Em cima, à direita: a escolha do idioma. */
|
|
6
|
+
actions?: ReactNode;
|
|
7
|
+
/** O conteúdo da tela, no meio da coluna. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Embaixo da coluna: o rodapé ("© SWMX · …"). */
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
/** O painel da marca, à direita (a partir de 960 px). */
|
|
12
|
+
aside?: ReactNode;
|
|
13
|
+
/** O painel da marca é só decoração (padrão): fora da árvore do leitor de tela. */
|
|
14
|
+
asideDecorative?: boolean;
|
|
15
|
+
/** A classe do painel da marca (o escopo de tom da casa, por exemplo). */
|
|
16
|
+
asideClassName?: string;
|
|
17
|
+
/** A grade de escolhas em vez de um formulário: a coluna ganha dois terços da tela. */
|
|
18
|
+
wide?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function SelectAuthSplit({ logo, actions, children, footer, aside, asideDecorative, asideClassName, wide, className }: SelectAuthSplitProps): import("react").JSX.Element;
|
|
22
|
+
/** O título da tela de entrada (o h1) e a linha de apoio. */
|
|
23
|
+
export declare function SelectAuthHeading({ title, children }: {
|
|
24
|
+
title: ReactNode;
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/SelectAuthSplit.tsx
|
|
4
|
+
var n = (...e) => e.filter(Boolean).join(" ");
|
|
5
|
+
function r({ logo: r, actions: i, children: a, footer: o, aside: s, asideDecorative: c = !0, asideClassName: l, wide: u = !1, className: d }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
className: n("select-authsplit", u && "select-authsplit--wide", d),
|
|
8
|
+
children: [/* @__PURE__ */ t("div", {
|
|
9
|
+
className: "select-authsplit__panel",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ t("div", {
|
|
12
|
+
className: "select-authsplit__top",
|
|
13
|
+
children: [r, i]
|
|
14
|
+
}),
|
|
15
|
+
/* @__PURE__ */ e("main", {
|
|
16
|
+
className: "select-authsplit__main",
|
|
17
|
+
children: a
|
|
18
|
+
}),
|
|
19
|
+
o == null ? null : /* @__PURE__ */ e("p", {
|
|
20
|
+
className: "select-authsplit__foot",
|
|
21
|
+
children: o
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}), s == null ? null : /* @__PURE__ */ e("aside", {
|
|
25
|
+
className: n("select-authsplit__aside", l),
|
|
26
|
+
"aria-hidden": c || void 0,
|
|
27
|
+
children: s
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function i({ title: n, children: r }) {
|
|
32
|
+
return /* @__PURE__ */ t("div", {
|
|
33
|
+
className: "select-authheading",
|
|
34
|
+
children: [/* @__PURE__ */ e("h1", {
|
|
35
|
+
className: "select-authheading__title",
|
|
36
|
+
children: n
|
|
37
|
+
}), r != null && r !== !1 ? /* @__PURE__ */ e("p", {
|
|
38
|
+
className: "select-authheading__lead",
|
|
39
|
+
children: r
|
|
40
|
+
}) : null]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { i as SelectAuthHeading, r as SelectAuthSplit };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=SelectAuthSplit.js.map
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export declare function SelectConversation({ children, 'aria-label': ariaLabel }: {
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export declare function SelectConversation({ children, 'aria-label': ariaLabel, onPinnedChange, }: {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
'aria-label'?: string;
|
|
5
|
+
/**
|
|
6
|
+
* 0.1.222: quem lê está no fim (acompanha o que chega) ou rolou para cima para reler. Para quem conta o que chegou
|
|
7
|
+
* enquanto a pessoa estava acima (o "N novos" do `SelectConversationNewer`).
|
|
8
|
+
*/
|
|
9
|
+
onPinnedChange?: (pinned: boolean) => void;
|
|
5
10
|
}): import("react").JSX.Element;
|
|
6
11
|
/** O separador de dia ("Hoje", "Ontem", "12 out"). */
|
|
7
12
|
export declare function SelectConversationDay({ children }: {
|
|
@@ -36,8 +41,17 @@ export interface SelectConversationBubbleProps {
|
|
|
36
41
|
time?: ReactNode;
|
|
37
42
|
/** 0.1.221: a mídia dentro do balão, acima do texto (a legenda): o `SelectConversationMedia`. */
|
|
38
43
|
media?: ReactNode;
|
|
44
|
+
/** 0.1.222: chegou com a conversa aberta e ainda não foi visto — a borda do acento no balão. */
|
|
45
|
+
fresh?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 0.1.222: o balão inteiro é um LINK (o evento que abre a mensagem): `to` é um endereço do app (o `<Link>` do roteador)
|
|
48
|
+
* e `href`, um de fora. `onClick` vem junto (fechar a janela no celular, por exemplo).
|
|
49
|
+
*/
|
|
50
|
+
to?: string;
|
|
51
|
+
href?: string;
|
|
52
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
39
53
|
}
|
|
40
|
-
export declare function SelectConversationBubble({ direction, author, label, attachment, meta, metaTone, children, avatar, time, media }: SelectConversationBubbleProps): import("react").JSX.Element;
|
|
54
|
+
export declare function SelectConversationBubble({ direction, author, label, attachment, meta, metaTone, children, avatar, time, media, fresh, to, href, onClick, }: SelectConversationBubbleProps): import("react").JSX.Element;
|
|
41
55
|
/**
|
|
42
56
|
* 0.1.221: a mídia de uma mensagem, dentro do balão — a foto, a figurinha (sem fundo, menor), o vídeo e o áudio (com os
|
|
43
57
|
* controles do navegador). Nada é baixado antes de aparecer (`loading="lazy"`, `preload="none"`). Quando o arquivo não
|
|
@@ -50,3 +64,12 @@ export declare function SelectConversationMedia({ kind, src, alt, onError, }: {
|
|
|
50
64
|
alt?: string;
|
|
51
65
|
onError?: () => void;
|
|
52
66
|
}): import("react").JSX.Element;
|
|
67
|
+
/**
|
|
68
|
+
* 0.1.222: o "N novos ↓" — o que chegou enquanto quem lê estava acima, num botão que fica no pé da caixa que rola. O
|
|
69
|
+
* clique leva ao fim (a caixa de quem contém a conversa) e avisa quem usa, que zera a conta. Quem decide quando mostrar
|
|
70
|
+
* (e o número) é quem usa: o `onPinnedChange` da `SelectConversation` diz quando a pessoa saiu do fim.
|
|
71
|
+
*/
|
|
72
|
+
export declare function SelectConversationNewer({ children, onClick }: {
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
onClick?: () => void;
|
|
75
|
+
}): import("react").JSX.Element;
|