@selectwin/kit 0.1.143 → 0.1.145

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,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 {};
@@ -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,8 @@ 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 type { SelectKanbanColumn, SelectKanbanProps, SelectKanbanCardProps } from './SelectKanban';
78
80
  export { SelectModal } from './SelectModal';
79
81
  export { SelectPopover } from './SelectPopover';
80
82
  export { SelectActionList } from './SelectActionList';