@selectwin/kit 0.1.148 → 0.1.150

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.
@@ -79,9 +79,11 @@ export interface SelectMailListItemProps {
79
79
  attachments?: number;
80
80
  /** A conversa aberta no leitor. */
81
81
  active?: boolean;
82
+ /** Tem mensagem não lida (0.1.149): quem, o assunto e a hora em destaque, e o ponto. */
83
+ unread?: boolean;
82
84
  onClick: () => void;
83
85
  }
84
- export declare function SelectMailListItem({ from, avatar, subject, snippet, date, count, attachments, active, onClick }: SelectMailListItemProps): import("react").JSX.Element;
86
+ export declare function SelectMailListItem({ from, avatar, subject, snippet, date, count, attachments, active, unread, onClick }: SelectMailListItemProps): import("react").JSX.Element;
85
87
  /** As linhas fantasmas enquanto a caixa chega. */
86
88
  export declare function SelectMailListSkeleton({ rows }: {
87
89
  rows?: number;
@@ -98,6 +100,8 @@ export interface SelectMailReaderProps {
98
100
  meta?: ReactNode;
99
101
  /** À direita: responder, responder a todos. */
100
102
  actions?: ReactNode;
103
+ /** Depois das ações e de um traço (0.1.149): os botões de ícone que organizam — arquivar, apagar, marcar como não lida. */
104
+ tools?: ReactNode;
101
105
  /** No celular, volta para a lista. */
102
106
  onBack?: () => void;
103
107
  /** As mensagens. */
@@ -105,7 +109,7 @@ export interface SelectMailReaderProps {
105
109
  /** Embaixo, fora da rolagem: o compositor da resposta. */
106
110
  footer?: ReactNode;
107
111
  }
108
- export declare function SelectMailReader({ title, meta, actions, onBack, children, footer }: SelectMailReaderProps): import("react").JSX.Element;
112
+ export declare function SelectMailReader({ title, meta, actions, tools, onBack, children, footer }: SelectMailReaderProps): import("react").JSX.Element;
109
113
  export interface SelectMailMessageProps {
110
114
  from: SelectMailAddress | null;
111
115
  to?: SelectMailAddress[];
@@ -181,11 +185,17 @@ export interface SelectMailComposerProps {
181
185
  onClose?: () => void;
182
186
  /** A recusa (de validação ou do servidor), sobre o rodapé. */
183
187
  error?: ReactNode;
188
+ /** Sob a mensagem (0.1.149): os anexos (`SelectMailComposerAttachments`). */
189
+ attachments?: ReactNode;
190
+ /** Soltar arquivos em cima do compositor anexa (0.1.149). Sem ele, soltar não faz nada. */
191
+ onFiles?: (files: File[]) => void;
192
+ /** O que aparece enquanto o arquivo passa por cima. */
193
+ dropLabel?: ReactNode;
184
194
  footer: ReactNode;
185
195
  children: ReactNode;
186
196
  'aria-label'?: string;
187
197
  }
188
- export declare function SelectMailComposer({ variant, title, minimized, onToggleMinimize, onClose, error, footer, children, 'aria-label': ariaLabel, }: SelectMailComposerProps): import("react").JSX.Element;
198
+ export declare function SelectMailComposer({ variant, title, minimized, onToggleMinimize, onClose, error, attachments, onFiles, dropLabel, footer, children, 'aria-label': ariaLabel, }: SelectMailComposerProps): import("react").JSX.Element;
189
199
  /** Uma linha do compositor: o rótulo ("Para", "Cc", "Assunto"), o campo e uma ação à direita ("Cc"). */
190
200
  export declare function SelectMailComposerRow({ label, children, action }: {
191
201
  label?: ReactNode;
@@ -209,6 +219,36 @@ export declare function SelectMailComposerBody({ value, onChange, placeholder, r
209
219
  'aria-label'?: string;
210
220
  maxLength?: number;
211
221
  }): import("react").JSX.Element;
222
+ /** O clipe do rodapé (0.1.149): abre o seletor de arquivos do sistema. Escolher o mesmo arquivo de novo também vale. */
223
+ export declare function SelectMailAttachButton({ onFiles, accept, multiple, disabled, label, }: {
224
+ onFiles: (files: File[]) => void;
225
+ /** Os tipos que o seletor oferece (`application/pdf,image/*`…). Quem recebe confere de novo. */
226
+ accept?: string;
227
+ multiple?: boolean;
228
+ disabled?: boolean;
229
+ label?: string;
230
+ }): import("react").JSX.Element;
231
+ /** A faixa dos anexos sob a mensagem, com uma nota opcional no fim ("2 anexos · 3,1 MB de 15 MB"). */
232
+ export declare function SelectMailComposerAttachments({ children, note }: {
233
+ children: ReactNode;
234
+ note?: ReactNode;
235
+ }): import("react").JSX.Element;
236
+ export type SelectMailUploadState = 'uploading' | 'done' | 'failed';
237
+ export interface SelectMailUploadProps {
238
+ name: string;
239
+ /** O tamanho, já formatado ("2,4 MB"). */
240
+ size?: ReactNode;
241
+ /** subindo → pronto; ou não subiu (com `error` e, se der, `onRetry`). */
242
+ state?: SelectMailUploadState;
243
+ /** 0 a 1, enquanto sobe. Sem ele, a barra anda sem número. */
244
+ progress?: number;
245
+ /** Por que não subiu ("O arquivo passa de 10 MB"). */
246
+ error?: ReactNode;
247
+ onRemove: () => void;
248
+ onRetry?: () => void;
249
+ }
250
+ /** Um anexo no compositor: a extensão, o nome, o tamanho (ou o progresso, ou a recusa), tirar e tentar de novo. */
251
+ export declare function SelectMailUpload({ name, size, state, progress, error, onRemove, onRetry }: SelectMailUploadProps): import("react").JSX.Element;
212
252
  /** O rodapé: `start` (o modelo), a nota do meio (por onde sai) e `end` (descartar, enviar). */
213
253
  export declare function SelectMailComposerFooter({ start, note, end }: {
214
254
  start?: ReactNode;
@@ -0,0 +1,17 @@
1
+ /** Um texto (o modelo, o rascunho antigo) no HTML do editor: um parágrafo por bloco, as quebras simples como `<br>`. */
2
+ export declare function mailTextToHtml(text: string): string;
3
+ /**
4
+ * O endereço do link, ou `null` se não serve. Sem esquema: com `@` vira `mailto:`, com cara de domínio vira `https://`.
5
+ * Nada de `javascript:`, `data:` ou caminho relativo.
6
+ */
7
+ export declare function mailLinkHref(raw: string): string | null;
8
+ export interface SelectMailEditorProps {
9
+ /** O HTML: o que o próprio editor entregou, ou `mailTextToHtml` de um texto. */
10
+ value: string;
11
+ onChange: (html: string, text: string) => void;
12
+ placeholder?: string;
13
+ 'aria-label'?: string;
14
+ /** Na janela (`dock`) a área começa mais alta. */
15
+ size?: 'inline' | 'dock';
16
+ }
17
+ export declare function SelectMailEditor({ value, onChange, placeholder, 'aria-label': ariaLabel, size }: SelectMailEditorProps): import("react").JSX.Element;
@@ -5,6 +5,10 @@ export interface SegmentedOption {
5
5
  /** Nome acessível quando o `label` é só um ícone — vira `aria-label` + `title`.
6
6
  * Sem ele um segmento icon-only não tem nome nenhum para leitor de tela. */
7
7
  title?: string;
8
+ /** Um número ao lado do rótulo (0.1.149) — as não lidas da Entrada. Some com 0. */
9
+ count?: number;
10
+ /** O que o número quer dizer, para o leitor de tela ("2 não lidas"). Padrão: o número. */
11
+ countLabel?: string;
8
12
  }
9
13
  type SelectSegmentedOwnProps = {
10
14
  value: string;
@@ -1,9 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type SelectToastVariant = 'success' | 'error' | 'info' | 'neutral';
3
+ /** Um botão no aviso (0.1.149) — o "Desfazer" de quem acabou de arquivar. Clicar roda e fecha o aviso. */
4
+ export interface SelectToastAction {
5
+ label: ReactNode;
6
+ onAction: () => void;
7
+ }
3
8
  export interface SelectToastApi {
4
9
  show: (content: ReactNode, opts?: {
5
10
  variant?: SelectToastVariant;
6
11
  duration?: number;
12
+ action?: SelectToastAction;
7
13
  }) => void;
8
14
  success: (content: ReactNode, duration?: number) => void;
9
15
  error: (content: ReactNode, duration?: number) => void;
package/dist/icons.d.ts CHANGED
@@ -212,4 +212,24 @@ export declare function ReplyAllIcon(): import("react").JSX.Element;
212
212
  export declare function PaperclipIcon(): import("react").JSX.Element;
213
213
  /** O painel lateral (0.1.148): recolher/abrir o menu do shell. */
214
214
  export declare function SidebarIcon(): import("react").JSX.Element;
215
+ /** Arquivar (0.1.149): a caixa de arquivo — a conversa sai da entrada sem ser apagada. */
216
+ export declare function ArchiveIcon(): import("react").JSX.Element;
217
+ /** Não lida (0.1.149): o envelope com o ponto de "nova". */
218
+ export declare function MailUnreadIcon(): import("react").JSX.Element;
219
+ /** Negrito (0.1.150) — a barra de formatação do e-mail. */
220
+ export declare function TextBoldIcon(): import("react").JSX.Element;
221
+ /** Itálico (0.1.150). */
222
+ export declare function TextItalicIcon(): import("react").JSX.Element;
223
+ /** Sublinhado (0.1.150). */
224
+ export declare function TextUnderlineIcon(): import("react").JSX.Element;
225
+ /** Riscado (0.1.150). */
226
+ export declare function TextStrikeIcon(): import("react").JSX.Element;
227
+ /** Lista com marcadores (0.1.150). */
228
+ export declare function ListBulletIcon(): import("react").JSX.Element;
229
+ /** Lista numerada (0.1.150). */
230
+ export declare function ListNumberIcon(): import("react").JSX.Element;
231
+ /** Citação (0.1.150): o recuo com o traço. */
232
+ export declare function TextQuoteIcon(): import("react").JSX.Element;
233
+ /** Limpar a formatação (0.1.150). */
234
+ export declare function ClearFormatIcon(): import("react").JSX.Element;
215
235
  export {};
package/dist/index.d.ts CHANGED
@@ -80,8 +80,10 @@ export { SelectCalendar, calendarRange, calendarToday } from './SelectCalendar';
80
80
  export type { SelectCalendarEvent, SelectCalendarProps, SelectCalendarView } from './SelectCalendar';
81
81
  export { SelectHtmlFrame } from './SelectHtmlFrame';
82
82
  export type { SelectHtmlFrameProps } from './SelectHtmlFrame';
83
- export { SelectInbox, SelectInboxToolbar, SelectInboxEmpty, SelectInboxBanner, SelectMailboxStatus, SelectMailList, SelectMailListGroup, SelectMailListItem, SelectMailListSkeleton, SelectMailListNote, SelectMailReader, SelectMailMessage, SelectMailNotice, SelectMailAttachment, SelectLeadChip, SelectMailComposer, SelectMailComposerRow, SelectMailComposerInput, SelectMailComposerBody, SelectMailComposerFooter, SelectRecipientInput, SelectTemplateMenu, attachmentExt, isMailAddress, mailName, } from './SelectMail';
84
- export type { SelectInboxProps, SelectInboxToolbarProps, SelectInboxEmptyProps, SelectMailboxStatusTone, SelectMailAddress, SelectMailListItemProps, SelectMailReaderProps, SelectMailMessageProps, SelectMailAttachmentProps, SelectMailAttachmentState, SelectMailComposerProps, SelectRecipientInputProps, SelectTemplateMenuItem, SelectTemplateMenuProps, } from './SelectMail';
83
+ export { SelectInbox, SelectInboxToolbar, SelectInboxEmpty, SelectInboxBanner, SelectMailboxStatus, SelectMailList, SelectMailListGroup, SelectMailListItem, SelectMailListSkeleton, SelectMailListNote, SelectMailReader, SelectMailMessage, SelectMailNotice, SelectMailAttachment, SelectLeadChip, SelectMailComposer, SelectMailComposerRow, SelectMailComposerInput, SelectMailComposerBody, SelectMailComposerFooter, SelectMailComposerAttachments, SelectMailAttachButton, SelectMailUpload, SelectRecipientInput, SelectTemplateMenu, attachmentExt, isMailAddress, mailName, } from './SelectMail';
84
+ export { SelectMailEditor, mailLinkHref, mailTextToHtml } from './SelectMailEditor';
85
+ export type { SelectMailEditorProps } from './SelectMailEditor';
86
+ export type { SelectInboxProps, SelectInboxToolbarProps, SelectInboxEmptyProps, SelectMailboxStatusTone, SelectMailAddress, SelectMailListItemProps, SelectMailReaderProps, SelectMailMessageProps, SelectMailAttachmentProps, SelectMailAttachmentState, SelectMailComposerProps, SelectMailUploadProps, SelectMailUploadState, SelectRecipientInputProps, SelectTemplateMenuItem, SelectTemplateMenuProps, } from './SelectMail';
85
87
  export type { SelectKanbanColumn, SelectKanbanProps, SelectKanbanCardProps } from './SelectKanban';
86
88
  export { SelectModal } from './SelectModal';
87
89
  export { SelectPopover } from './SelectPopover';
@@ -247,7 +249,7 @@ export type { SideNavItem, SideNavSection } from './SelectSideNav';
247
249
  export type { SelectColumn } from './SelectTable';
248
250
  export type { ComboboxOption } from './SelectCombobox';
249
251
  export type { SelectTheme } from './SelectThemeSwitcher';
250
- export type { SelectToastApi, SelectToastVariant } from './SelectToast';
252
+ export type { SelectToastApi, SelectToastAction, SelectToastVariant } from './SelectToast';
251
253
  export type { SelectPreviewFrameProps } from './SelectPreviewFrame';
252
254
  export type { SelectBalanceCardProps, SelectBalanceBucket, SelectBalanceMeta } from './SelectBalanceCard';
253
255
  export type { SelectFeeBreakdownProps, SelectFeeLine } from './SelectFeeBreakdown';