@selectwin/kit 0.1.144 → 0.1.146

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.
@@ -0,0 +1,14 @@
1
+ export interface SelectHtmlFrameProps {
2
+ /** O documento: um caminho da própria origem (`/api/…`) ou uma URL `https:`. Fora disso, nada é carregado. */
3
+ src: string;
4
+ /** O nome do quadro para o leitor de tela (ex.: "Corpo da mensagem"). */
5
+ title: string;
6
+ /** Altura do quadro; o conteúdo rola dentro. Padrão `28rem`. */
7
+ height?: string;
8
+ /** Os links do documento abrem em outra aba. Nunca libera script nem a origem. */
9
+ allowLinks?: boolean;
10
+ className?: string;
11
+ }
12
+ /** Só a própria origem (um caminho que não é `//host`) ou `https:`. */
13
+ export declare function frameSrcAllowed(src: string): boolean;
14
+ export declare function SelectHtmlFrame({ src, title, height, allowLinks, className }: SelectHtmlFrameProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { ReactNode } from 'react';
2
+ type KanbanTone = 'neutral' | 'info' | 'success' | 'warning' | 'critical';
3
+ export interface SelectKanbanColumn {
4
+ id: string;
5
+ title: ReactNode;
6
+ /** O total da coluna — o `total` da lista, que pode passar dos cards carregados. `null`/ausente: não se sabe. */
7
+ count?: number | null;
8
+ /** A cor do ponto ao lado do título. */
9
+ tone?: KanbanTone;
10
+ /** Uma linha sob o título (ex.: "anda sozinha com o cadastro"). */
11
+ description?: ReactNode;
12
+ /** Aceita um card solto aqui. */
13
+ droppable?: boolean;
14
+ /** Sem card nenhum. */
15
+ empty?: ReactNode;
16
+ /** Sob os cards (ex.: "Ver mais 12"). */
17
+ footer?: ReactNode;
18
+ /** Os cards (`SelectKanbanCard`). */
19
+ children?: ReactNode;
20
+ }
21
+ export interface SelectKanbanProps {
22
+ columns: SelectKanbanColumn[];
23
+ /** Um card foi solto em outra coluna que aceita. Sem `onMove`, nada arrasta. */
24
+ onMove?: (cardId: string, fromColumnId: string, toColumnId: string) => void;
25
+ className?: string;
26
+ 'aria-label'?: string;
27
+ }
28
+ export declare function SelectKanban({ columns, onMove, className, 'aria-label': ariaLabel }: SelectKanbanProps): import("react").JSX.Element;
29
+ export interface SelectKanbanCardProps {
30
+ id: string;
31
+ title: ReactNode;
32
+ /** A linha de baixo do título (ex.: a empresa). */
33
+ subtitle?: ReactNode;
34
+ /** O rodapé do card: selos, responsável, data. */
35
+ meta?: ReactNode;
36
+ /** No canto do card (ex.: o menu "Mover para…"). O clique ali não abre o card. */
37
+ actions?: ReactNode;
38
+ /** Abrir o card (o título vira botão, para o teclado). */
39
+ onOpen?: () => void;
40
+ /** Este card não arrasta (ex.: a etapa dele anda sozinha). */
41
+ locked?: boolean;
42
+ }
43
+ export declare function SelectKanbanCard({ id, title, subtitle, meta, actions, onOpen, locked }: SelectKanbanCardProps): import("react").JSX.Element;
44
+ export {};
@@ -0,0 +1,45 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SelectMailAddress {
3
+ name: string | null;
4
+ address: string;
5
+ }
6
+ /** "Ana Souza" ou, sem nome, o endereço. */
7
+ export declare function mailName(a: SelectMailAddress | null | undefined): string;
8
+ export declare function SelectMailList({ children, 'aria-label': ariaLabel }: {
9
+ children: ReactNode;
10
+ 'aria-label'?: string;
11
+ }): import("react").JSX.Element;
12
+ export interface SelectMailListItemProps {
13
+ /** Quem escreveu (na entrada) ou para quem foi (nos enviados). */
14
+ from: ReactNode;
15
+ subject: ReactNode;
16
+ snippet?: ReactNode;
17
+ /** Quando — já formatado. */
18
+ date: ReactNode;
19
+ /** Mensagens na conversa (só aparece de 2 em diante). */
20
+ count?: number;
21
+ /** Quantos anexos a mensagem mais recente leva. */
22
+ attachments?: number;
23
+ /** A conversa aberta no leitor. */
24
+ active?: boolean;
25
+ onClick: () => void;
26
+ }
27
+ export declare function SelectMailListItem({ from, subject, snippet, date, count, attachments, active, onClick }: SelectMailListItemProps): import("react").JSX.Element;
28
+ export interface SelectMailMessageProps {
29
+ from: SelectMailAddress | null;
30
+ to?: SelectMailAddress[];
31
+ cc?: SelectMailAddress[];
32
+ /** Quando — já formatado. */
33
+ date: ReactNode;
34
+ /** No canto do cabeçalho (ex.: "Responder"). */
35
+ actions?: ReactNode;
36
+ /** Sobre o corpo (ex.: "3 imagens externas bloqueadas"). */
37
+ notice?: ReactNode;
38
+ /** O corpo em texto — escapado, com as quebras de linha. Ignorado quando há `children`. */
39
+ text?: string | null;
40
+ /** O corpo em HTML: só o `SelectHtmlFrame`. */
41
+ children?: ReactNode;
42
+ /** Sob o corpo: os anexos. */
43
+ attachments?: ReactNode;
44
+ }
45
+ export declare function SelectMailMessage({ from, to, cc, date, actions, notice, text, children, attachments }: SelectMailMessageProps): import("react").JSX.Element;
@@ -4,6 +4,8 @@ type SelectWorkspaceSwitcherOwnProps = {
4
4
  name: ReactNode;
5
5
  badge?: ReactNode;
6
6
  onClick?: () => void;
7
+ /** Sem troca possível: desenha o mesmo pill, sem a seta e sem ser botão. */
8
+ readOnly?: boolean;
7
9
  };
8
10
  export type SelectWorkspaceSwitcherProps = SelectWorkspaceSwitcherOwnProps & Omit<ComponentPropsWithoutRef<'button'>, keyof SelectWorkspaceSwitcherOwnProps>;
9
11
  export declare const SelectWorkspaceSwitcher: import('react').ForwardRefExoticComponent<SelectWorkspaceSwitcherOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof SelectWorkspaceSwitcherOwnProps> & import('react').RefAttributes<HTMLButtonElement>>;
package/dist/index.d.ts CHANGED
@@ -75,6 +75,12 @@ export { SelectCollapsible } from './SelectCollapsible';
75
75
  export { SelectActionCard } from './SelectActionCard';
76
76
  export { SelectAppTile, SelectCreateTile } from './SelectTile';
77
77
  export { SelectWorkspaceSwitcher } from './SelectWorkspaceSwitcher';
78
+ export { SelectKanban, SelectKanbanCard } from './SelectKanban';
79
+ export { SelectHtmlFrame } from './SelectHtmlFrame';
80
+ export type { SelectHtmlFrameProps } from './SelectHtmlFrame';
81
+ export { SelectMailList, SelectMailListItem, SelectMailMessage, mailName } from './SelectMail';
82
+ export type { SelectMailAddress, SelectMailListItemProps, SelectMailMessageProps } from './SelectMail';
83
+ export type { SelectKanbanColumn, SelectKanbanProps, SelectKanbanCardProps } from './SelectKanban';
78
84
  export { SelectModal } from './SelectModal';
79
85
  export { SelectPopover } from './SelectPopover';
80
86
  export { SelectActionList } from './SelectActionList';