@selectwin/kit 0.1.159 → 0.1.161
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/SelectMail.d.ts +9 -3
- package/dist/index.js +61 -51
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectMail.d.ts
CHANGED
|
@@ -88,9 +88,11 @@ export interface SelectMailListItemProps {
|
|
|
88
88
|
active?: boolean;
|
|
89
89
|
/** Tem mensagem não lida (0.1.149): quem, o assunto e a hora em destaque, e o ponto. */
|
|
90
90
|
unread?: boolean;
|
|
91
|
+
/** 0.1.161: alguma mensagem da conversa tem estrela — a estrela cheia ao lado da hora. */
|
|
92
|
+
flagged?: boolean;
|
|
91
93
|
onClick: () => void;
|
|
92
94
|
}
|
|
93
|
-
export declare function SelectMailListItem({ from, avatar, subject, snippet, date, count, attachments, active, unread, onClick }: SelectMailListItemProps): import("react").JSX.Element;
|
|
95
|
+
export declare function SelectMailListItem({ from, avatar, subject, snippet, date, count, attachments, active, unread, flagged, onClick }: SelectMailListItemProps): import("react").JSX.Element;
|
|
94
96
|
/** As linhas fantasmas enquanto a caixa chega. */
|
|
95
97
|
export declare function SelectMailListSkeleton({ rows }: {
|
|
96
98
|
rows?: number;
|
|
@@ -123,6 +125,8 @@ export interface SelectMailMessageProps {
|
|
|
123
125
|
from: SelectMailAddress | null;
|
|
124
126
|
to?: SelectMailAddress[];
|
|
125
127
|
cc?: SelectMailAddress[];
|
|
128
|
+
/** 0.1.161: a cópia oculta — só quem enviou a vê (a mensagem entregue não leva o cabeçalho). */
|
|
129
|
+
bcc?: SelectMailAddress[];
|
|
126
130
|
/** O endereço de quem lê: vira "você" nos destinatários e "Você" na mensagem recolhida. */
|
|
127
131
|
selfAddress?: string;
|
|
128
132
|
/** Quando — já formatado. */
|
|
@@ -148,7 +152,7 @@ export interface SelectMailMessageProps {
|
|
|
148
152
|
/** Abre a recolhida; recolhe a aberta (o botão só aparece com ele). */
|
|
149
153
|
onToggle?: () => void;
|
|
150
154
|
}
|
|
151
|
-
export declare function SelectMailMessage({ from, to, cc, selfAddress, date, dateTitle, actions, notice, text, children, attachments, collapsed, snippet, hasAttachments, onToggle, }: SelectMailMessageProps): import("react").JSX.Element;
|
|
155
|
+
export declare function SelectMailMessage({ from, to, cc, bcc, selfAddress, date, dateTitle, actions, notice, text, children, attachments, collapsed, snippet, hasAttachments, onToggle, }: SelectMailMessageProps): import("react").JSX.Element;
|
|
152
156
|
/** Um aviso sobre o corpo da mensagem: as imagens externas bloqueadas (`info`), a mensagem grande demais (`warning`). */
|
|
153
157
|
export declare function SelectMailNotice({ tone, icon, children }: {
|
|
154
158
|
tone?: 'info' | 'warning';
|
|
@@ -192,6 +196,8 @@ export interface SelectMailComposerProps {
|
|
|
192
196
|
onToggleMinimize?: () => void;
|
|
193
197
|
/** Fechar (e descartar) a janela. */
|
|
194
198
|
onClose?: () => void;
|
|
199
|
+
/** 0.1.161: o nome do botão de fechar — quando fechar guarda o rascunho, ele não "descarta". */
|
|
200
|
+
closeLabel?: string;
|
|
195
201
|
/** A recusa (de validação ou do servidor), sobre o rodapé. */
|
|
196
202
|
error?: ReactNode;
|
|
197
203
|
/** Sob a mensagem (0.1.149): os anexos (`SelectMailComposerAttachments`). */
|
|
@@ -204,7 +210,7 @@ export interface SelectMailComposerProps {
|
|
|
204
210
|
children: ReactNode;
|
|
205
211
|
'aria-label'?: string;
|
|
206
212
|
}
|
|
207
|
-
export declare function SelectMailComposer({ variant, title, minimized, onToggleMinimize, onClose, error, attachments, onFiles, dropLabel, footer, children, 'aria-label': ariaLabel, }: SelectMailComposerProps): import("react").JSX.Element;
|
|
213
|
+
export declare function SelectMailComposer({ variant, title, minimized, onToggleMinimize, onClose, closeLabel, error, attachments, onFiles, dropLabel, footer, children, 'aria-label': ariaLabel, }: SelectMailComposerProps): import("react").JSX.Element;
|
|
208
214
|
/** Uma linha do compositor: o rótulo ("Para", "Cc", "Assunto"), o campo e uma ação à direita ("Cc"). */
|
|
209
215
|
export declare function SelectMailComposerRow({ label, children, action }: {
|
|
210
216
|
label?: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -8626,15 +8626,15 @@ function Ts({ label: e, children: t }) {
|
|
|
8626
8626
|
})]
|
|
8627
8627
|
});
|
|
8628
8628
|
}
|
|
8629
|
-
function Es({ from: e, avatar: t, subject: n, snippet: r, date: i, count: a, attachments: o, active: s = !1, unread: c = !1,
|
|
8630
|
-
let
|
|
8629
|
+
function Es({ from: e, avatar: t, subject: n, snippet: r, date: i, count: a, attachments: o, active: s = !1, unread: c = !1, flagged: l = !1, onClick: u }) {
|
|
8630
|
+
let d = t === !1 ? void 0 : t ?? (typeof e == "string" ? e : void 0);
|
|
8631
8631
|
return /* @__PURE__ */ g("button", {
|
|
8632
8632
|
type: "button",
|
|
8633
8633
|
className: vs("select-maillist__row", s && "is-active", c && "is-unread"),
|
|
8634
8634
|
"aria-current": s || void 0,
|
|
8635
|
-
onClick:
|
|
8635
|
+
onClick: u,
|
|
8636
8636
|
children: [t === !1 ? null : /* @__PURE__ */ h($i, {
|
|
8637
|
-
name:
|
|
8637
|
+
name: d,
|
|
8638
8638
|
initials: 2,
|
|
8639
8639
|
className: "select-maillist__avatar"
|
|
8640
8640
|
}), /* @__PURE__ */ g("span", {
|
|
@@ -8660,6 +8660,12 @@ function Es({ from: e, avatar: t, subject: n, snippet: r, date: i, count: a, att
|
|
|
8660
8660
|
className: "select-maillist__dot",
|
|
8661
8661
|
"aria-hidden": "true"
|
|
8662
8662
|
}) : null,
|
|
8663
|
+
l ? /* @__PURE__ */ h("span", {
|
|
8664
|
+
className: "select-maillist__star",
|
|
8665
|
+
role: "img",
|
|
8666
|
+
"aria-label": "Com estrela",
|
|
8667
|
+
children: /* @__PURE__ */ h(he, { filled: !0 })
|
|
8668
|
+
}) : null,
|
|
8663
8669
|
i ? /* @__PURE__ */ h("span", {
|
|
8664
8670
|
className: "select-maillist__date",
|
|
8665
8671
|
children: i
|
|
@@ -8766,28 +8772,28 @@ function ks({ title: e, meta: t, actions: n, tools: r, onBack: i, children: a, f
|
|
|
8766
8772
|
]
|
|
8767
8773
|
});
|
|
8768
8774
|
}
|
|
8769
|
-
function As({ from: e, to: t, cc: n,
|
|
8770
|
-
let
|
|
8771
|
-
if (
|
|
8775
|
+
function As({ from: e, to: t, cc: n, bcc: r, selfAddress: i, date: a, dateTitle: o, actions: s, notice: c, text: l, children: u, attachments: d, collapsed: f = !1, snippet: p, hasAttachments: m = !1, onToggle: _ }) {
|
|
8776
|
+
let v = (e) => !!e && !!i && e.address.toLowerCase() === i.toLowerCase(), y = (e) => (e ?? []).map((e) => v(e) ? "você" : _s(e)).join(", "), b = _s(e);
|
|
8777
|
+
if (f) return /* @__PURE__ */ g("button", {
|
|
8772
8778
|
type: "button",
|
|
8773
8779
|
className: "select-mailmsg select-mailmsg--collapsed",
|
|
8774
8780
|
"aria-expanded": !1,
|
|
8775
|
-
onClick:
|
|
8781
|
+
onClick: _,
|
|
8776
8782
|
children: [
|
|
8777
8783
|
/* @__PURE__ */ h($i, {
|
|
8778
|
-
name:
|
|
8784
|
+
name: b,
|
|
8779
8785
|
initials: 2,
|
|
8780
8786
|
className: "select-mailmsg__avatar select-mailmsg__avatar--sm"
|
|
8781
8787
|
}),
|
|
8782
8788
|
/* @__PURE__ */ h("span", {
|
|
8783
8789
|
className: "select-mailmsg__from",
|
|
8784
|
-
children:
|
|
8790
|
+
children: v(e) ? "Você" : b
|
|
8785
8791
|
}),
|
|
8786
8792
|
/* @__PURE__ */ h("span", {
|
|
8787
8793
|
className: "select-mailmsg__snippet",
|
|
8788
|
-
children:
|
|
8794
|
+
children: p
|
|
8789
8795
|
}),
|
|
8790
|
-
|
|
8796
|
+
m ? /* @__PURE__ */ h("span", {
|
|
8791
8797
|
className: "select-mailmsg__clip",
|
|
8792
8798
|
role: "img",
|
|
8793
8799
|
"aria-label": "Com anexo",
|
|
@@ -8795,12 +8801,16 @@ function As({ from: e, to: t, cc: n, selfAddress: r, date: i, dateTitle: a, acti
|
|
|
8795
8801
|
}) : null,
|
|
8796
8802
|
/* @__PURE__ */ h("span", {
|
|
8797
8803
|
className: "select-mailmsg__date",
|
|
8798
|
-
title:
|
|
8799
|
-
children:
|
|
8804
|
+
title: o,
|
|
8805
|
+
children: a
|
|
8800
8806
|
})
|
|
8801
8807
|
]
|
|
8802
8808
|
});
|
|
8803
|
-
let
|
|
8809
|
+
let x = [
|
|
8810
|
+
t != null && t.length ? `para ${y(t)}` : "",
|
|
8811
|
+
n != null && n.length ? `cc ${y(n)}` : "",
|
|
8812
|
+
r != null && r.length ? `cco ${y(r)}` : ""
|
|
8813
|
+
].filter(Boolean).join(" · ");
|
|
8804
8814
|
return /* @__PURE__ */ g("article", {
|
|
8805
8815
|
className: "select-mailmsg",
|
|
8806
8816
|
children: [
|
|
@@ -8808,7 +8818,7 @@ function As({ from: e, to: t, cc: n, selfAddress: r, date: i, dateTitle: a, acti
|
|
|
8808
8818
|
className: "select-mailmsg__head",
|
|
8809
8819
|
children: [
|
|
8810
8820
|
/* @__PURE__ */ h($i, {
|
|
8811
|
-
name:
|
|
8821
|
+
name: b,
|
|
8812
8822
|
initials: 2,
|
|
8813
8823
|
className: "select-mailmsg__avatar"
|
|
8814
8824
|
}),
|
|
@@ -8818,14 +8828,14 @@ function As({ from: e, to: t, cc: n, selfAddress: r, date: i, dateTitle: a, acti
|
|
|
8818
8828
|
className: "select-mailmsg__line",
|
|
8819
8829
|
children: [/* @__PURE__ */ h("span", {
|
|
8820
8830
|
className: "select-mailmsg__from",
|
|
8821
|
-
children:
|
|
8831
|
+
children: b
|
|
8822
8832
|
}), e != null && e.name ? /* @__PURE__ */ h("span", {
|
|
8823
8833
|
className: "select-mailmsg__address",
|
|
8824
8834
|
children: e.address
|
|
8825
8835
|
}) : null]
|
|
8826
|
-
}),
|
|
8836
|
+
}), x ? /* @__PURE__ */ h("span", {
|
|
8827
8837
|
className: "select-mailmsg__to",
|
|
8828
|
-
children:
|
|
8838
|
+
children: x
|
|
8829
8839
|
}) : null]
|
|
8830
8840
|
}),
|
|
8831
8841
|
/* @__PURE__ */ g("div", {
|
|
@@ -8833,35 +8843,35 @@ function As({ from: e, to: t, cc: n, selfAddress: r, date: i, dateTitle: a, acti
|
|
|
8833
8843
|
children: [
|
|
8834
8844
|
/* @__PURE__ */ h("span", {
|
|
8835
8845
|
className: "select-mailmsg__date",
|
|
8836
|
-
title:
|
|
8837
|
-
children:
|
|
8846
|
+
title: o,
|
|
8847
|
+
children: a
|
|
8838
8848
|
}),
|
|
8839
|
-
|
|
8840
|
-
|
|
8849
|
+
s,
|
|
8850
|
+
_ ? /* @__PURE__ */ h(Y, {
|
|
8841
8851
|
icon: /* @__PURE__ */ h(it, {}),
|
|
8842
8852
|
label: "Recolher a mensagem",
|
|
8843
8853
|
size: "sm",
|
|
8844
|
-
onClick:
|
|
8854
|
+
onClick: _,
|
|
8845
8855
|
"aria-expanded": !0
|
|
8846
8856
|
}) : null
|
|
8847
8857
|
]
|
|
8848
8858
|
})
|
|
8849
8859
|
]
|
|
8850
8860
|
}),
|
|
8851
|
-
|
|
8861
|
+
c ? /* @__PURE__ */ h("div", {
|
|
8852
8862
|
className: "select-mailmsg__notices",
|
|
8853
|
-
children:
|
|
8863
|
+
children: c
|
|
8854
8864
|
}) : null,
|
|
8855
|
-
|
|
8865
|
+
u ? /* @__PURE__ */ h("div", {
|
|
8856
8866
|
className: "select-mailmsg__body",
|
|
8857
|
-
children:
|
|
8858
|
-
}) :
|
|
8867
|
+
children: u
|
|
8868
|
+
}) : l ? /* @__PURE__ */ h("div", {
|
|
8859
8869
|
className: "select-mailmsg__text",
|
|
8860
|
-
children:
|
|
8870
|
+
children: l
|
|
8861
8871
|
}) : null,
|
|
8862
|
-
|
|
8872
|
+
d ? /* @__PURE__ */ h("div", {
|
|
8863
8873
|
className: "select-mailmsg__attachments",
|
|
8864
|
-
children:
|
|
8874
|
+
children: d
|
|
8865
8875
|
}) : null
|
|
8866
8876
|
]
|
|
8867
8877
|
});
|
|
@@ -8957,31 +8967,31 @@ var Rs = (e) => {
|
|
|
8957
8967
|
var t;
|
|
8958
8968
|
return Array.from(((t = e.dataTransfer) == null ? void 0 : t.types) ?? []).includes("Files");
|
|
8959
8969
|
};
|
|
8960
|
-
function zs({ variant: e = "inline", title: t, minimized: n = !1, onToggleMinimize: r, onClose: i,
|
|
8961
|
-
let
|
|
8970
|
+
function zs({ variant: e = "inline", title: t, minimized: n = !1, onToggleMinimize: r, onClose: i, closeLabel: a = "Fechar e descartar", error: o, attachments: s, onFiles: c, dropLabel: l = "Solte para anexar", footer: u, children: p, "aria-label": _ }) {
|
|
8971
|
+
let v = e === "dock", [y, b] = f(!1), x = d(0), S = c ? {
|
|
8962
8972
|
onDragEnter: (e) => {
|
|
8963
|
-
Rs(e) && (e.preventDefault(),
|
|
8973
|
+
Rs(e) && (e.preventDefault(), x.current += 1, b(!0));
|
|
8964
8974
|
},
|
|
8965
8975
|
onDragOver: (e) => {
|
|
8966
8976
|
Rs(e) && e.preventDefault();
|
|
8967
8977
|
},
|
|
8968
8978
|
onDragLeave: (e) => {
|
|
8969
|
-
Rs(e) && (
|
|
8979
|
+
Rs(e) && (x.current = Math.max(0, x.current - 1), x.current === 0 && b(!1));
|
|
8970
8980
|
},
|
|
8971
8981
|
onDrop: (e) => {
|
|
8972
8982
|
if (!Rs(e)) return;
|
|
8973
|
-
e.preventDefault(),
|
|
8983
|
+
e.preventDefault(), x.current = 0, b(!1);
|
|
8974
8984
|
let t = Array.from(e.dataTransfer.files);
|
|
8975
|
-
t.length &&
|
|
8985
|
+
t.length && c(t);
|
|
8976
8986
|
}
|
|
8977
8987
|
} : {};
|
|
8978
8988
|
return /* @__PURE__ */ g("div", {
|
|
8979
|
-
className: vs("select-mailcomposer", `select-mailcomposer--${e}`, n && "is-minimized",
|
|
8980
|
-
role:
|
|
8981
|
-
"aria-label":
|
|
8982
|
-
...
|
|
8989
|
+
className: vs("select-mailcomposer", `select-mailcomposer--${e}`, n && "is-minimized", y && "is-dragging"),
|
|
8990
|
+
role: v ? "dialog" : "group",
|
|
8991
|
+
"aria-label": _,
|
|
8992
|
+
...S,
|
|
8983
8993
|
children: [
|
|
8984
|
-
|
|
8994
|
+
v ? /* @__PURE__ */ g("div", {
|
|
8985
8995
|
className: "select-mailcomposer__bar",
|
|
8986
8996
|
children: [
|
|
8987
8997
|
/* @__PURE__ */ h("span", {
|
|
@@ -8996,34 +9006,34 @@ function zs({ variant: e = "inline", title: t, minimized: n = !1, onToggleMinimi
|
|
|
8996
9006
|
}) : null,
|
|
8997
9007
|
i ? /* @__PURE__ */ h(Y, {
|
|
8998
9008
|
icon: /* @__PURE__ */ h(le, {}),
|
|
8999
|
-
label:
|
|
9009
|
+
label: a,
|
|
9000
9010
|
size: "sm",
|
|
9001
9011
|
onClick: i
|
|
9002
9012
|
}) : null
|
|
9003
9013
|
]
|
|
9004
9014
|
}) : null,
|
|
9005
|
-
|
|
9015
|
+
y && !n ? /* @__PURE__ */ g("div", {
|
|
9006
9016
|
className: "select-mailcomposer__drop",
|
|
9007
9017
|
"aria-hidden": "true",
|
|
9008
|
-
children: [/* @__PURE__ */ h(an, {}), /* @__PURE__ */ h("span", { children:
|
|
9018
|
+
children: [/* @__PURE__ */ h(an, {}), /* @__PURE__ */ h("span", { children: l })]
|
|
9009
9019
|
}) : null,
|
|
9010
9020
|
n ? null : /* @__PURE__ */ g(m, { children: [
|
|
9011
9021
|
/* @__PURE__ */ h("div", {
|
|
9012
9022
|
className: "select-mailcomposer__fields",
|
|
9013
|
-
children:
|
|
9023
|
+
children: p
|
|
9014
9024
|
}),
|
|
9015
|
-
|
|
9016
|
-
|
|
9025
|
+
s,
|
|
9026
|
+
o ? /* @__PURE__ */ g("div", {
|
|
9017
9027
|
className: "select-mailcomposer__error",
|
|
9018
9028
|
role: "alert",
|
|
9019
9029
|
children: [/* @__PURE__ */ h("span", {
|
|
9020
9030
|
"aria-hidden": "true",
|
|
9021
9031
|
children: /* @__PURE__ */ h(ye, {})
|
|
9022
|
-
}), /* @__PURE__ */ h("span", { children:
|
|
9032
|
+
}), /* @__PURE__ */ h("span", { children: o })]
|
|
9023
9033
|
}) : null,
|
|
9024
9034
|
/* @__PURE__ */ h("div", {
|
|
9025
9035
|
className: "select-mailcomposer__footer",
|
|
9026
|
-
children:
|
|
9036
|
+
children: u
|
|
9027
9037
|
})
|
|
9028
9038
|
] })
|
|
9029
9039
|
]
|