@selectwin/kit 0.1.253 → 0.1.254
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 +83 -69
- package/dist/SelectAttachMenu.d.ts +29 -0
- package/dist/SelectAttachMenu.js +167 -0
- package/dist/SelectAudioRecorder.d.ts +27 -0
- package/dist/SelectAudioRecorder.js +287 -0
- package/dist/SelectChatSendButton.d.ts +14 -0
- package/dist/SelectChatSendButton.js +25 -0
- package/dist/SelectConversation.d.ts +33 -2
- package/dist/SelectConversation.js +127 -83
- package/dist/SelectConversationQuote.d.ts +20 -0
- package/dist/SelectConversationQuote.js +87 -0
- package/dist/SelectConversationReactions.d.ts +31 -0
- package/dist/SelectConversationReactions.js +101 -0
- package/dist/SelectEmojiPicker.d.ts +12 -0
- package/dist/SelectEmojiPicker.js +178 -0
- package/dist/SelectIconTile.d.ts +2 -1
- package/dist/SelectLightbox.d.ts +32 -0
- package/dist/SelectLightbox.js +172 -0
- package/dist/SelectLocale.d.ts +68 -0
- package/dist/SelectLocale.js +140 -0
- package/dist/SelectMail.d.ts +3 -2
- package/dist/SelectMail.js +224 -244
- package/dist/SelectMessageCards.d.ts +150 -0
- package/dist/SelectMessageCards.js +429 -0
- package/dist/SelectMessageTicks.d.ts +7 -0
- package/dist/SelectMessageTicks.js +31 -0
- package/dist/SelectVoiceNote.d.ts +27 -0
- package/dist/SelectVoiceNote.js +245 -0
- package/dist/emojiData.d.ts +33 -0
- package/dist/emojiData.js +103 -0
- package/dist/icons.d.ts +22 -0
- package/dist/icons.js +89 -10
- package/dist/index.d.ts +23 -1
- package/dist/index.js +236 -224
- package/dist/internal/fileKind.d.ts +12 -0
- package/dist/internal/fileKind.js +44 -0
- package/dist/style.css +1 -1
- package/package.json +67 -67
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { useSelectLocale as e, useSelectMessages as t } from "./SelectLocale.js";
|
|
3
|
+
import { SelectSearchInput as n } from "./SelectSearchInput.js";
|
|
4
|
+
import { searchSelectEmoji as r, selectEmojiCategories as i } from "./emojiData.js";
|
|
5
|
+
import { useEffect as a, useId as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
//#region src/SelectEmojiPicker.tsx
|
|
8
|
+
var f = (...e) => e.filter(Boolean).join(" ");
|
|
9
|
+
function p({ onPick: p, recent: m, columns: h = 8, autoFocus: g = !1, "aria-label": _ }) {
|
|
10
|
+
var v;
|
|
11
|
+
let y = t().chat, b = e(), x = o(), [S, C] = l(""), [w, T] = l(0), [E, D] = l(null), O = c(null), k = c(null), A = Math.max(1, Math.floor(h)), j = i(), M = (m ?? []).join(""), N = s(() => {
|
|
12
|
+
if (S.trim()) return [{
|
|
13
|
+
id: "results",
|
|
14
|
+
label: y.emojiResults,
|
|
15
|
+
icon: "",
|
|
16
|
+
items: r(S)
|
|
17
|
+
}];
|
|
18
|
+
let e = /* @__PURE__ */ new Map();
|
|
19
|
+
for (let t of j) for (let n of t.emoji) e.set(n.char, n);
|
|
20
|
+
let t = (m ?? []).filter(Boolean).map((t) => e.get(t) ?? {
|
|
21
|
+
char: t,
|
|
22
|
+
pt: [t],
|
|
23
|
+
en: [t]
|
|
24
|
+
}), n = j.map((e) => ({
|
|
25
|
+
id: e.id,
|
|
26
|
+
label: b === "en" ? e.en : e.pt,
|
|
27
|
+
icon: e.icon,
|
|
28
|
+
items: e.emoji
|
|
29
|
+
}));
|
|
30
|
+
return t.length ? [{
|
|
31
|
+
id: "recent",
|
|
32
|
+
label: y.emojiRecent,
|
|
33
|
+
icon: "🕘",
|
|
34
|
+
items: t
|
|
35
|
+
}, ...n] : n;
|
|
36
|
+
}, [
|
|
37
|
+
S,
|
|
38
|
+
M,
|
|
39
|
+
b,
|
|
40
|
+
y
|
|
41
|
+
]), P = s(() => {
|
|
42
|
+
let e = [], t = 0;
|
|
43
|
+
for (let n of N) {
|
|
44
|
+
for (let r = 0; r < n.items.length; r += A) e.push({
|
|
45
|
+
start: t + r,
|
|
46
|
+
length: Math.min(A, n.items.length - r)
|
|
47
|
+
});
|
|
48
|
+
t += n.items.length;
|
|
49
|
+
}
|
|
50
|
+
return e;
|
|
51
|
+
}, [N, A]), F = P.reduce((e, t) => e + t.length, 0);
|
|
52
|
+
a(() => {
|
|
53
|
+
T(0), k.current && (k.current.scrollTop = 0);
|
|
54
|
+
}, [S]), a(() => {
|
|
55
|
+
var e;
|
|
56
|
+
g && ((e = O.current) == null || e.focus({ preventScroll: !0 }));
|
|
57
|
+
}, [g]);
|
|
58
|
+
let I = (e) => (b === "en" ? e.en[0] : e.pt[0]) ?? e.char, L = (e) => {
|
|
59
|
+
var t, n;
|
|
60
|
+
let r = Math.max(0, Math.min(F - 1, e));
|
|
61
|
+
T(r);
|
|
62
|
+
let i = (t = k.current) == null ? void 0 : t.querySelector(`[data-emoji-index="${r}"]`);
|
|
63
|
+
i == null || i.focus({ preventScroll: !0 }), i == null || (n = i.scrollIntoView) == null || n.call(i, { block: "nearest" });
|
|
64
|
+
}, R = (e) => {
|
|
65
|
+
let t = e.target.getAttribute("data-emoji-index");
|
|
66
|
+
if (t == null) return;
|
|
67
|
+
let n = Number(t), r = P.findIndex((e) => n >= e.start && n < e.start + e.length), i = P[r];
|
|
68
|
+
if (!i) return;
|
|
69
|
+
let a = n - i.start, o = !0;
|
|
70
|
+
if (e.key === "ArrowRight") L(n + 1);
|
|
71
|
+
else if (e.key === "ArrowLeft") L(n - 1);
|
|
72
|
+
else if (e.key === "ArrowDown") {
|
|
73
|
+
let e = P[r + 1];
|
|
74
|
+
e && L(e.start + Math.min(a, e.length - 1));
|
|
75
|
+
} else if (e.key === "ArrowUp") {
|
|
76
|
+
var s;
|
|
77
|
+
let e = P[r - 1];
|
|
78
|
+
e ? L(e.start + Math.min(a, e.length - 1)) : (s = O.current) == null || s.focus();
|
|
79
|
+
} else e.key === "Home" ? L(e.ctrlKey ? 0 : i.start) : e.key === "End" ? L(e.ctrlKey ? F - 1 : i.start + i.length - 1) : o = !1;
|
|
80
|
+
o && e.preventDefault();
|
|
81
|
+
}, z = (e) => {
|
|
82
|
+
D(e);
|
|
83
|
+
let t = k.current, n = t == null ? void 0 : t.querySelector(`[data-emoji-section="${e}"]`);
|
|
84
|
+
t && n && (t.scrollTop = n.offsetTop);
|
|
85
|
+
let r = N.findIndex((t) => t.id === e);
|
|
86
|
+
r >= 0 && T(N.slice(0, r).reduce((e, t) => e + t.items.length, 0));
|
|
87
|
+
}, B = () => {
|
|
88
|
+
let e = k.current;
|
|
89
|
+
if (!e || S.trim()) return;
|
|
90
|
+
let t = null;
|
|
91
|
+
e.querySelectorAll("[data-emoji-section]").forEach((n) => {
|
|
92
|
+
n.offsetTop <= e.scrollTop + 8 && (t = n.getAttribute("data-emoji-section"));
|
|
93
|
+
}), D(t);
|
|
94
|
+
}, V = E ?? ((v = N[0]) == null ? void 0 : v.id) ?? null, H = 0;
|
|
95
|
+
return /* @__PURE__ */ d("div", {
|
|
96
|
+
className: "select-emojipicker",
|
|
97
|
+
role: "group",
|
|
98
|
+
"aria-label": _ ?? y.emoji,
|
|
99
|
+
style: { "--select-emoji-cols": A },
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ u(n, {
|
|
102
|
+
size: "sm",
|
|
103
|
+
value: S,
|
|
104
|
+
onChange: (e) => C(e),
|
|
105
|
+
placeholder: y.emojiSearch,
|
|
106
|
+
inputLabel: y.emojiSearch,
|
|
107
|
+
inputRef: O,
|
|
108
|
+
inputProps: {
|
|
109
|
+
autoComplete: "off",
|
|
110
|
+
onKeyDown: (e) => {
|
|
111
|
+
e.key === "ArrowDown" && F > 0 && (e.preventDefault(), L(w));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
S.trim() ? null : /* @__PURE__ */ u("div", {
|
|
116
|
+
className: "select-emojipicker__cats",
|
|
117
|
+
role: "group",
|
|
118
|
+
"aria-label": y.emojiCategories,
|
|
119
|
+
children: N.map((e) => /* @__PURE__ */ u("button", {
|
|
120
|
+
type: "button",
|
|
121
|
+
className: f("select-emojipicker__cat", V === e.id && "is-active"),
|
|
122
|
+
"aria-label": e.label,
|
|
123
|
+
"aria-current": V === e.id || void 0,
|
|
124
|
+
title: e.label,
|
|
125
|
+
onClick: () => z(e.id),
|
|
126
|
+
children: /* @__PURE__ */ u("span", {
|
|
127
|
+
"aria-hidden": "true",
|
|
128
|
+
children: e.icon
|
|
129
|
+
})
|
|
130
|
+
}, e.id))
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ d("div", {
|
|
133
|
+
ref: k,
|
|
134
|
+
className: "select-emojipicker__scroll",
|
|
135
|
+
onScroll: B,
|
|
136
|
+
onKeyDown: R,
|
|
137
|
+
children: [N.map((e) => {
|
|
138
|
+
let t = `${x}-${e.id}`;
|
|
139
|
+
return e.items.length ? /* @__PURE__ */ d("div", {
|
|
140
|
+
className: "select-emojipicker__section",
|
|
141
|
+
"data-emoji-section": e.id,
|
|
142
|
+
role: "group",
|
|
143
|
+
"aria-labelledby": t,
|
|
144
|
+
children: [/* @__PURE__ */ u("div", {
|
|
145
|
+
className: "select-emojipicker__heading",
|
|
146
|
+
id: t,
|
|
147
|
+
children: e.label
|
|
148
|
+
}), /* @__PURE__ */ u("div", {
|
|
149
|
+
className: "select-emojipicker__grid",
|
|
150
|
+
children: e.items.map((t) => {
|
|
151
|
+
let n = H++, r = I(t);
|
|
152
|
+
return /* @__PURE__ */ u("button", {
|
|
153
|
+
type: "button",
|
|
154
|
+
className: "select-emojipicker__emoji",
|
|
155
|
+
"data-emoji-index": n,
|
|
156
|
+
tabIndex: n === w ? 0 : -1,
|
|
157
|
+
"aria-label": r,
|
|
158
|
+
title: r,
|
|
159
|
+
onFocus: () => T(n),
|
|
160
|
+
onClick: () => p(t.char),
|
|
161
|
+
children: t.char
|
|
162
|
+
}, `${e.id}-${t.char}`);
|
|
163
|
+
})
|
|
164
|
+
})]
|
|
165
|
+
}, e.id) : null;
|
|
166
|
+
}), S.trim() && F === 0 ? /* @__PURE__ */ u("div", {
|
|
167
|
+
className: "select-emojipicker__empty",
|
|
168
|
+
role: "status",
|
|
169
|
+
children: y.emojiNone
|
|
170
|
+
}) : null]
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
export { p as SelectEmojiPicker };
|
|
177
|
+
|
|
178
|
+
//# sourceMappingURL=SelectEmojiPicker.js.map
|
package/dist/SelectIconTile.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
/** 0.1.254: `accent` (o tom do acento do app: a foto, a lista, os botões no menu de anexar) e `violet` (o áudio). */
|
|
3
|
+
export type SelectIconTileTone = 'neutral' | 'success' | 'critical' | 'warning' | 'info' | 'pro' | 'accent' | 'violet';
|
|
3
4
|
type SelectIconTileOwnProps = {
|
|
4
5
|
icon: ReactNode;
|
|
5
6
|
tone?: SelectIconTileTone;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectLightboxItem {
|
|
3
|
+
src: string;
|
|
4
|
+
/** `video` = o vídeo com os controles do navegador. */
|
|
5
|
+
kind?: 'image' | 'video';
|
|
6
|
+
/** O que a foto mostra. */
|
|
7
|
+
alt?: string;
|
|
8
|
+
/** A legenda, embaixo. */
|
|
9
|
+
caption?: ReactNode;
|
|
10
|
+
/** Quem mandou ("Mariana Costa", "Você"). */
|
|
11
|
+
author?: ReactNode;
|
|
12
|
+
/** Quando ("Hoje, 18:20"). */
|
|
13
|
+
time?: ReactNode;
|
|
14
|
+
/** A foto ou as iniciais de quem mandou (`SelectAvatar`). */
|
|
15
|
+
avatar?: ReactNode;
|
|
16
|
+
/** O link de baixar esta mídia. */
|
|
17
|
+
downloadHref?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SelectLightboxProps {
|
|
20
|
+
open: boolean;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
items: SelectLightboxItem[];
|
|
23
|
+
/** A mídia à vista (de 0). */
|
|
24
|
+
index: number;
|
|
25
|
+
onIndexChange: (index: number) => void;
|
|
26
|
+
/** "Responder a esta foto": quem usa fecha e põe a citação no compositor. */
|
|
27
|
+
onReply?: (index: number) => void;
|
|
28
|
+
/** Baixar quando o item não tem `downloadHref` (o link gerado na hora). */
|
|
29
|
+
onDownload?: (index: number) => void;
|
|
30
|
+
'aria-label'?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function SelectLightbox({ open, onClose, items, index, onIndexChange, onReply, onDownload, 'aria-label': ariaLabel }: SelectLightboxProps): import('react').ReactPortal | null;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { safeHref as e } from "./internal/safeHref.js";
|
|
3
|
+
import { ChevronLeftIcon as t, ChevronRightIcon as n, CloseIcon as r, DownloadIcon as i, ReplyIcon as a } from "./icons.js";
|
|
4
|
+
import { useSelectMessages as o } from "./SelectLocale.js";
|
|
5
|
+
import { useFocusTrap as s } from "./internal/useFocusTrap.js";
|
|
6
|
+
import { LayerProvider as c, isTopLayer as l, openLayer as u, useParentLayer as d } from "./internal/layers.js";
|
|
7
|
+
import { useEffect as f, useRef as p, useState as m } from "react";
|
|
8
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
import { createPortal as _ } from "react-dom";
|
|
10
|
+
//#region src/SelectLightbox.tsx
|
|
11
|
+
function v({ open: v, onClose: y, items: b, index: x, onIndexChange: S, onReply: C, onDownload: w, "aria-label": T }) {
|
|
12
|
+
let E = o().chat, D = p(null), O = p(null), [k] = m(() => ({})), A = d(), j = p({
|
|
13
|
+
onClose: y,
|
|
14
|
+
onIndexChange: S,
|
|
15
|
+
index: x,
|
|
16
|
+
count: b.length
|
|
17
|
+
});
|
|
18
|
+
j.current = {
|
|
19
|
+
onClose: y,
|
|
20
|
+
onIndexChange: S,
|
|
21
|
+
index: x,
|
|
22
|
+
count: b.length
|
|
23
|
+
};
|
|
24
|
+
let M = b.length, N = Math.max(0, Math.min(M - 1, x)), P = b[N], F = v && P != null;
|
|
25
|
+
if (f(() => {
|
|
26
|
+
var e;
|
|
27
|
+
if (!F) return;
|
|
28
|
+
let t = document.activeElement;
|
|
29
|
+
O.current = t instanceof HTMLElement && t !== document.body ? t : null;
|
|
30
|
+
let n = u(k, A), r = document.body.style.overflow;
|
|
31
|
+
document.body.style.overflow = "hidden", (e = D.current) == null || e.focus({ preventScroll: !0 });
|
|
32
|
+
let i = (e) => {
|
|
33
|
+
if (!l(k)) return;
|
|
34
|
+
let { onClose: t, onIndexChange: n, index: r, count: i } = j.current;
|
|
35
|
+
if (e.key === "Escape") {
|
|
36
|
+
if (e.defaultPrevented) return;
|
|
37
|
+
e.preventDefault(), t();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let a = e.target;
|
|
41
|
+
a != null && a.closest("video, input, textarea, select") || (e.key === "ArrowLeft" && r > 0 ? (e.preventDefault(), n(r - 1)) : e.key === "ArrowRight" && r < i - 1 && (e.preventDefault(), n(r + 1)));
|
|
42
|
+
};
|
|
43
|
+
return document.addEventListener("keydown", i), () => {
|
|
44
|
+
n(), document.removeEventListener("keydown", i), document.body.style.overflow = r;
|
|
45
|
+
let e = O.current;
|
|
46
|
+
O.current = null, e != null && e.isConnected && e.focus({ preventScroll: !0 });
|
|
47
|
+
};
|
|
48
|
+
}, [
|
|
49
|
+
F,
|
|
50
|
+
k,
|
|
51
|
+
A
|
|
52
|
+
]), s(F, D, { initialFocus: !1 }), !F || typeof document > "u") return null;
|
|
53
|
+
let I = e(P.downloadHref), L = M > 1 ? E.counter(N + 1, M) : null;
|
|
54
|
+
return _(/* @__PURE__ */ h("div", {
|
|
55
|
+
ref: D,
|
|
56
|
+
className: "select select-lightbox",
|
|
57
|
+
"data-theme": "dark",
|
|
58
|
+
role: "dialog",
|
|
59
|
+
"aria-modal": "true",
|
|
60
|
+
"aria-label": T ?? E.lightbox,
|
|
61
|
+
tabIndex: -1,
|
|
62
|
+
children: /* @__PURE__ */ g(c, {
|
|
63
|
+
value: k,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ g("div", {
|
|
66
|
+
className: "select-lightbox__head",
|
|
67
|
+
children: [
|
|
68
|
+
P.avatar ? /* @__PURE__ */ h("span", {
|
|
69
|
+
className: "select-lightbox__avatar",
|
|
70
|
+
"aria-hidden": "true",
|
|
71
|
+
children: P.avatar
|
|
72
|
+
}) : null,
|
|
73
|
+
/* @__PURE__ */ g("span", {
|
|
74
|
+
className: "select-lightbox__who",
|
|
75
|
+
children: [P.author == null ? null : /* @__PURE__ */ h("span", {
|
|
76
|
+
className: "select-lightbox__author",
|
|
77
|
+
children: P.author
|
|
78
|
+
}), P.time != null || L ? /* @__PURE__ */ g("span", {
|
|
79
|
+
className: "select-lightbox__sub",
|
|
80
|
+
children: [
|
|
81
|
+
P.time,
|
|
82
|
+
P.time != null && L ? " · " : null,
|
|
83
|
+
L ? /* @__PURE__ */ h("span", {
|
|
84
|
+
"aria-live": "polite",
|
|
85
|
+
children: L
|
|
86
|
+
}) : null
|
|
87
|
+
]
|
|
88
|
+
}) : null]
|
|
89
|
+
}),
|
|
90
|
+
C ? /* @__PURE__ */ h("button", {
|
|
91
|
+
type: "button",
|
|
92
|
+
className: "select-lightbox__btn",
|
|
93
|
+
onClick: () => C(N),
|
|
94
|
+
"aria-label": E.reply,
|
|
95
|
+
title: E.reply,
|
|
96
|
+
children: /* @__PURE__ */ h(a, {})
|
|
97
|
+
}) : null,
|
|
98
|
+
I === void 0 ? w ? /* @__PURE__ */ h("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
className: "select-lightbox__btn",
|
|
101
|
+
onClick: () => w(N),
|
|
102
|
+
"aria-label": E.downloadMedia,
|
|
103
|
+
title: E.downloadMedia,
|
|
104
|
+
children: /* @__PURE__ */ h(i, {})
|
|
105
|
+
}) : null : /* @__PURE__ */ h("a", {
|
|
106
|
+
className: "select-lightbox__btn",
|
|
107
|
+
href: I,
|
|
108
|
+
download: !0,
|
|
109
|
+
target: "_blank",
|
|
110
|
+
rel: "noopener noreferrer",
|
|
111
|
+
"aria-label": E.downloadMedia,
|
|
112
|
+
title: E.downloadMedia,
|
|
113
|
+
children: /* @__PURE__ */ h(i, {})
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ h("button", {
|
|
116
|
+
type: "button",
|
|
117
|
+
className: "select-lightbox__btn",
|
|
118
|
+
onClick: y,
|
|
119
|
+
"aria-label": E.close,
|
|
120
|
+
title: E.close,
|
|
121
|
+
children: /* @__PURE__ */ h(r, {})
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ g("div", {
|
|
126
|
+
className: "select-lightbox__stage",
|
|
127
|
+
children: [
|
|
128
|
+
M > 1 ? /* @__PURE__ */ h("button", {
|
|
129
|
+
type: "button",
|
|
130
|
+
className: "select-lightbox__nav",
|
|
131
|
+
onClick: () => S(N - 1),
|
|
132
|
+
disabled: N === 0,
|
|
133
|
+
"aria-label": E.previous,
|
|
134
|
+
title: E.previous,
|
|
135
|
+
children: /* @__PURE__ */ h(t, {})
|
|
136
|
+
}) : null,
|
|
137
|
+
/* @__PURE__ */ h("div", {
|
|
138
|
+
className: "select-lightbox__figure",
|
|
139
|
+
children: P.kind === "video" ? /* @__PURE__ */ h("video", {
|
|
140
|
+
className: "select-lightbox__media",
|
|
141
|
+
src: P.src,
|
|
142
|
+
controls: !0,
|
|
143
|
+
preload: "metadata"
|
|
144
|
+
}, P.src) : /* @__PURE__ */ h("img", {
|
|
145
|
+
className: "select-lightbox__media",
|
|
146
|
+
src: P.src,
|
|
147
|
+
alt: P.alt ?? ""
|
|
148
|
+
}, P.src)
|
|
149
|
+
}),
|
|
150
|
+
M > 1 ? /* @__PURE__ */ h("button", {
|
|
151
|
+
type: "button",
|
|
152
|
+
className: "select-lightbox__nav",
|
|
153
|
+
onClick: () => S(N + 1),
|
|
154
|
+
disabled: N === M - 1,
|
|
155
|
+
"aria-label": E.next,
|
|
156
|
+
title: E.next,
|
|
157
|
+
children: /* @__PURE__ */ h(n, {})
|
|
158
|
+
}) : null
|
|
159
|
+
]
|
|
160
|
+
}),
|
|
161
|
+
P.caption == null ? null : /* @__PURE__ */ h("div", {
|
|
162
|
+
className: "select-lightbox__caption",
|
|
163
|
+
children: P.caption
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
}), document.body);
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
export { v as SelectLightbox };
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=SelectLightbox.js.map
|
package/dist/SelectLocale.d.ts
CHANGED
|
@@ -124,6 +124,74 @@ export interface SelectKitMessages {
|
|
|
124
124
|
attachmentBusy: (name: string) => string;
|
|
125
125
|
attachmentGet: (name: string) => string;
|
|
126
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* 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
|
|
129
|
+
* áudio, o gravador, os cartões das mensagens, o visualizador de mídia e o menu de anexar.
|
|
130
|
+
*/
|
|
131
|
+
chat: {
|
|
132
|
+
status: Record<'queued' | 'sent' | 'delivered' | 'read' | 'failed', string>;
|
|
133
|
+
quote: string;
|
|
134
|
+
quoteJump: string;
|
|
135
|
+
replyingTo: string;
|
|
136
|
+
cancelReply: string;
|
|
137
|
+
reactions: string;
|
|
138
|
+
reactedWith: (who: string, emoji: string) => string;
|
|
139
|
+
reactionCount: (emoji: string, n: number) => string;
|
|
140
|
+
react: (emoji: string) => string;
|
|
141
|
+
unreact: (emoji: string) => string;
|
|
142
|
+
reactionPicker: string;
|
|
143
|
+
moreEmoji: string;
|
|
144
|
+
lessEmoji: string;
|
|
145
|
+
emoji: string;
|
|
146
|
+
emojiSearch: string;
|
|
147
|
+
emojiCategories: string;
|
|
148
|
+
emojiNone: string;
|
|
149
|
+
emojiResults: string;
|
|
150
|
+
emojiRecent: string;
|
|
151
|
+
play: string;
|
|
152
|
+
pause: string;
|
|
153
|
+
seek: string;
|
|
154
|
+
position: (at: string, total: string) => string;
|
|
155
|
+
speed: (rate: string) => string;
|
|
156
|
+
voiceNote: string;
|
|
157
|
+
audioFailed: string;
|
|
158
|
+
recorder: string;
|
|
159
|
+
recording: string;
|
|
160
|
+
recPaused: string;
|
|
161
|
+
recRequesting: string;
|
|
162
|
+
recDiscard: string;
|
|
163
|
+
recPause: string;
|
|
164
|
+
recResume: string;
|
|
165
|
+
recSend: string;
|
|
166
|
+
recDenied: string;
|
|
167
|
+
recNoMic: string;
|
|
168
|
+
recUnsupported: string;
|
|
169
|
+
recFailed: string;
|
|
170
|
+
retry: string;
|
|
171
|
+
close: string;
|
|
172
|
+
openMap: string;
|
|
173
|
+
location: string;
|
|
174
|
+
download: (name: string) => string;
|
|
175
|
+
openPhoto: string;
|
|
176
|
+
openMedia: (at: number, count: number) => string;
|
|
177
|
+
moreMedia: (n: number) => string;
|
|
178
|
+
album: (n: number) => string;
|
|
179
|
+
video: string;
|
|
180
|
+
lightbox: string;
|
|
181
|
+
previous: string;
|
|
182
|
+
next: string;
|
|
183
|
+
counter: (at: number, count: number) => string;
|
|
184
|
+
reply: string;
|
|
185
|
+
downloadMedia: string;
|
|
186
|
+
attach: string;
|
|
187
|
+
unread: (n: number) => string;
|
|
188
|
+
messageActions: string;
|
|
189
|
+
template: string;
|
|
190
|
+
listOptions: string;
|
|
191
|
+
copied: string;
|
|
192
|
+
send: string;
|
|
193
|
+
record: string;
|
|
194
|
+
};
|
|
127
195
|
/** 0.1.223: a entrada — o nome de cada caixinha do código (SelectOtpInput) e a força da senha (SelectPasswordStrength). */
|
|
128
196
|
auth: {
|
|
129
197
|
digit: (n: number) => string;
|
package/dist/SelectLocale.js
CHANGED
|
@@ -132,6 +132,76 @@ var r = {
|
|
|
132
132
|
attachmentBusy: (e) => `${e}: gerando o link`,
|
|
133
133
|
attachmentGet: (e) => `Pegar o anexo ${e}`
|
|
134
134
|
},
|
|
135
|
+
chat: {
|
|
136
|
+
status: {
|
|
137
|
+
queued: "Na fila",
|
|
138
|
+
sent: "Enviada",
|
|
139
|
+
delivered: "Entregue",
|
|
140
|
+
read: "Lida",
|
|
141
|
+
failed: "Não entregue"
|
|
142
|
+
},
|
|
143
|
+
quote: "Mensagem citada",
|
|
144
|
+
quoteJump: "Ir para a mensagem citada",
|
|
145
|
+
replyingTo: "Respondendo a",
|
|
146
|
+
cancelReply: "Cancelar a resposta",
|
|
147
|
+
reactions: "Reações",
|
|
148
|
+
reactedWith: (e, t) => `${e} reagiu com ${t}`,
|
|
149
|
+
reactionCount: (e, t) => t === 1 ? `1 reação ${e}` : `${t} reações ${e}`,
|
|
150
|
+
react: (e) => `Reagir com ${e}`,
|
|
151
|
+
unreact: (e) => `Tirar a reação ${e}`,
|
|
152
|
+
reactionPicker: "Reagir à mensagem",
|
|
153
|
+
moreEmoji: "Mais emojis",
|
|
154
|
+
lessEmoji: "Menos emojis",
|
|
155
|
+
emoji: "Emojis",
|
|
156
|
+
emojiSearch: "Buscar emoji",
|
|
157
|
+
emojiCategories: "Categorias de emoji",
|
|
158
|
+
emojiNone: "Nenhum emoji encontrado",
|
|
159
|
+
emojiResults: "Resultados",
|
|
160
|
+
emojiRecent: "Recentes",
|
|
161
|
+
play: "Ouvir o áudio",
|
|
162
|
+
pause: "Pausar o áudio",
|
|
163
|
+
seek: "Posição do áudio",
|
|
164
|
+
position: (e, t) => `${e} de ${t}`,
|
|
165
|
+
speed: (e) => `Velocidade ${e}`,
|
|
166
|
+
voiceNote: "Mensagem de voz",
|
|
167
|
+
audioFailed: "Não deu para tocar o áudio",
|
|
168
|
+
recorder: "Gravar áudio",
|
|
169
|
+
recording: "Gravando",
|
|
170
|
+
recPaused: "Pausado",
|
|
171
|
+
recRequesting: "Pedindo o microfone…",
|
|
172
|
+
recDiscard: "Descartar a gravação",
|
|
173
|
+
recPause: "Pausar a gravação",
|
|
174
|
+
recResume: "Continuar a gravação",
|
|
175
|
+
recSend: "Enviar o áudio",
|
|
176
|
+
recDenied: "Sem acesso ao microfone. Libere o microfone nas permissões do navegador e tente de novo.",
|
|
177
|
+
recNoMic: "Nenhum microfone encontrado.",
|
|
178
|
+
recUnsupported: "Este navegador não grava áudio.",
|
|
179
|
+
recFailed: "A gravação parou. Tente de novo.",
|
|
180
|
+
retry: "Tentar de novo",
|
|
181
|
+
close: "Fechar",
|
|
182
|
+
openMap: "Abrir no mapa",
|
|
183
|
+
location: "Localização",
|
|
184
|
+
download: (e) => `Baixar ${e}`,
|
|
185
|
+
openPhoto: "Abrir a foto",
|
|
186
|
+
openMedia: (e, t) => `Abrir a mídia ${e} de ${t}`,
|
|
187
|
+
moreMedia: (e) => `mais ${e}`,
|
|
188
|
+
album: (e) => `${e} fotos`,
|
|
189
|
+
video: "Vídeo",
|
|
190
|
+
lightbox: "Mídia da conversa",
|
|
191
|
+
previous: "Anterior",
|
|
192
|
+
next: "Próxima",
|
|
193
|
+
counter: (e, t) => `${e} de ${t}`,
|
|
194
|
+
reply: "Responder",
|
|
195
|
+
downloadMedia: "Baixar",
|
|
196
|
+
attach: "Anexar",
|
|
197
|
+
unread: (e) => e === 1 ? "1 mensagem nova" : `${e} mensagens novas`,
|
|
198
|
+
messageActions: "Ações da mensagem",
|
|
199
|
+
template: "Modelo",
|
|
200
|
+
listOptions: "Opções da lista",
|
|
201
|
+
copied: "Copiado",
|
|
202
|
+
send: "Enviar",
|
|
203
|
+
record: "Gravar áudio"
|
|
204
|
+
},
|
|
135
205
|
carousel: {
|
|
136
206
|
label: "Destaques",
|
|
137
207
|
carousel: "carrossel",
|
|
@@ -314,6 +384,76 @@ var r = {
|
|
|
314
384
|
attachmentBusy: (e) => `${e}: getting the link`,
|
|
315
385
|
attachmentGet: (e) => `Get the attachment ${e}`
|
|
316
386
|
},
|
|
387
|
+
chat: {
|
|
388
|
+
status: {
|
|
389
|
+
queued: "Queued",
|
|
390
|
+
sent: "Sent",
|
|
391
|
+
delivered: "Delivered",
|
|
392
|
+
read: "Read",
|
|
393
|
+
failed: "Not delivered"
|
|
394
|
+
},
|
|
395
|
+
quote: "Quoted message",
|
|
396
|
+
quoteJump: "Go to the quoted message",
|
|
397
|
+
replyingTo: "Replying to",
|
|
398
|
+
cancelReply: "Cancel the reply",
|
|
399
|
+
reactions: "Reactions",
|
|
400
|
+
reactedWith: (e, t) => `${e} reacted with ${t}`,
|
|
401
|
+
reactionCount: (e, t) => t === 1 ? `1 ${e} reaction` : `${t} ${e} reactions`,
|
|
402
|
+
react: (e) => `React with ${e}`,
|
|
403
|
+
unreact: (e) => `Remove the ${e} reaction`,
|
|
404
|
+
reactionPicker: "React to the message",
|
|
405
|
+
moreEmoji: "More emoji",
|
|
406
|
+
lessEmoji: "Fewer emoji",
|
|
407
|
+
emoji: "Emoji",
|
|
408
|
+
emojiSearch: "Search emoji",
|
|
409
|
+
emojiCategories: "Emoji categories",
|
|
410
|
+
emojiNone: "No emoji found",
|
|
411
|
+
emojiResults: "Results",
|
|
412
|
+
emojiRecent: "Recent",
|
|
413
|
+
play: "Play the audio",
|
|
414
|
+
pause: "Pause the audio",
|
|
415
|
+
seek: "Audio position",
|
|
416
|
+
position: (e, t) => `${e} of ${t}`,
|
|
417
|
+
speed: (e) => `Speed ${e}`,
|
|
418
|
+
voiceNote: "Voice message",
|
|
419
|
+
audioFailed: "Couldn't play the audio",
|
|
420
|
+
recorder: "Record audio",
|
|
421
|
+
recording: "Recording",
|
|
422
|
+
recPaused: "Paused",
|
|
423
|
+
recRequesting: "Asking for the microphone…",
|
|
424
|
+
recDiscard: "Discard the recording",
|
|
425
|
+
recPause: "Pause the recording",
|
|
426
|
+
recResume: "Resume the recording",
|
|
427
|
+
recSend: "Send the audio",
|
|
428
|
+
recDenied: "No access to the microphone. Allow it in the browser permissions and try again.",
|
|
429
|
+
recNoMic: "No microphone found.",
|
|
430
|
+
recUnsupported: "This browser can't record audio.",
|
|
431
|
+
recFailed: "The recording stopped. Try again.",
|
|
432
|
+
retry: "Try again",
|
|
433
|
+
close: "Close",
|
|
434
|
+
openMap: "Open in maps",
|
|
435
|
+
location: "Location",
|
|
436
|
+
download: (e) => `Download ${e}`,
|
|
437
|
+
openPhoto: "Open the photo",
|
|
438
|
+
openMedia: (e, t) => `Open media ${e} of ${t}`,
|
|
439
|
+
moreMedia: (e) => `${e} more`,
|
|
440
|
+
album: (e) => `${e} photos`,
|
|
441
|
+
video: "Video",
|
|
442
|
+
lightbox: "Conversation media",
|
|
443
|
+
previous: "Previous",
|
|
444
|
+
next: "Next",
|
|
445
|
+
counter: (e, t) => `${e} of ${t}`,
|
|
446
|
+
reply: "Reply",
|
|
447
|
+
downloadMedia: "Download",
|
|
448
|
+
attach: "Attach",
|
|
449
|
+
unread: (e) => e === 1 ? "1 new message" : `${e} new messages`,
|
|
450
|
+
messageActions: "Message actions",
|
|
451
|
+
template: "Template",
|
|
452
|
+
listOptions: "List options",
|
|
453
|
+
copied: "Copied",
|
|
454
|
+
send: "Send",
|
|
455
|
+
record: "Record audio"
|
|
456
|
+
},
|
|
317
457
|
carousel: {
|
|
318
458
|
label: "Highlights",
|
|
319
459
|
carousel: "carousel",
|
package/dist/SelectMail.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { attachmentExt } from './internal/fileKind';
|
|
2
3
|
export interface SelectMailAddress {
|
|
3
4
|
name: string | null;
|
|
4
5
|
address: string;
|
|
@@ -186,8 +187,8 @@ export interface SelectMailAttachmentProps {
|
|
|
186
187
|
readyLabel?: ReactNode;
|
|
187
188
|
failedLabel?: ReactNode;
|
|
188
189
|
}
|
|
189
|
-
/** A extensão em maiúsculas
|
|
190
|
-
export
|
|
190
|
+
/** A extensão em maiúsculas ("XLSX"; sem extensão, "ARQ") — 0.1.254: mora em `internal/fileKind`, e segue exportada daqui. */
|
|
191
|
+
export { attachmentExt };
|
|
191
192
|
/**
|
|
192
193
|
* O anexo de uma mensagem. O arquivo vem por um link assinado e curto: o primeiro clique pede o link (`loading`), o
|
|
193
194
|
* segundo abre (`ready`) — num clique do usuário, que o navegador não barra. Nada é baixado antes do clique.
|