@selectwin/kit 0.1.100 → 0.1.102

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.
@@ -6,7 +6,8 @@ export type SelectRetryStatusProps = {
6
6
  nextAttemptAt?: number | null;
7
7
  /** Length of the current wait in ms — where the bar started from. */
8
8
  waitMs?: number;
9
- /** Attempts already made; shown as a quiet caption when > 0. */
9
+ /** Attempts already made — the quiet caption under the bar. The caption line is ALWAYS there
10
+ * (its text changes per phase) so the box keeps its height and a centered modal doesn't hop. */
10
11
  attempt?: number;
11
12
  /** In-flight indicator (phase `trying`); defaults to the kit ring. */
12
13
  mark?: ReactNode;
@@ -16,6 +17,10 @@ export type SelectRetryStatusProps = {
16
17
  tryingLabel?: ReactNode;
17
18
  doneLabel?: ReactNode;
18
19
  attemptLabel?: (attempt: number) => ReactNode;
20
+ /** Caption before any attempt was made. */
21
+ firstLabel?: ReactNode;
22
+ /** Caption once it worked. */
23
+ doneCaption?: ReactNode;
19
24
  className?: string;
20
25
  };
21
- export declare function SelectRetryStatus({ phase, nextAttemptAt, waitMs, attempt, mark, action, waitingLabel, tryingLabel, doneLabel, attemptLabel, className, }: SelectRetryStatusProps): import("react").JSX.Element;
26
+ export declare function SelectRetryStatus({ phase, nextAttemptAt, waitMs, attempt, mark, action, waitingLabel, tryingLabel, doneLabel, attemptLabel, firstLabel, doneCaption, className, }: SelectRetryStatusProps): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function SelectSearchMenu({ search, onSearchChange, searchPlaceholder, status, footer, width, children, }: {
3
+ search: string;
4
+ onSearchChange: (value: string) => void;
5
+ searchPlaceholder?: string;
6
+ /** Substitui a lista por uma frase centrada (carregando, erro, nada encontrado). */
7
+ status?: ReactNode;
8
+ /** Linha discreta sob a lista (ex.: "Os 20 mais recentes de 300. Digite para buscar os demais."). */
9
+ footer?: ReactNode;
10
+ /** Largura do painel. O popover do gatilho-botão não tem largura de campo para herdar. */
11
+ width?: string;
12
+ children?: ReactNode;
13
+ }): import("react").JSX.Element;
14
+ export declare function SelectSearchMenuOption({ label, secondary, selected, disabled, onSelect, }: {
15
+ label: ReactNode;
16
+ secondary?: ReactNode;
17
+ selected?: boolean;
18
+ disabled?: boolean;
19
+ onSelect: () => void;
20
+ }): import("react").JSX.Element;
@@ -57,6 +57,14 @@ type SelectTableOwnProps = {
57
57
  onColumnResize?: (index: number, width: string) => void;
58
58
  /** Duplo clique na alça devolve a coluna ao tamanho automático. */
59
59
  onColumnResizeReset?: (index: number) => void;
60
+ /**
61
+ * A faixa de identidade vira o botão que abre/fecha o resto do card (filtros, colunas,
62
+ * linhas, rodapé). Fechado, o card é só o título + a descrição — por isso a descrição é o
63
+ * lugar do RESUMO que o operador precisa ver sem abrir. Precisa de `title`.
64
+ */
65
+ collapsible?: boolean;
66
+ /** Estado inicial quando `collapsible` (padrão: aberto). */
67
+ defaultOpen?: boolean;
60
68
  };
61
69
  export type SelectTableProps = SelectTableOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableOwnProps>;
62
70
  export declare const SelectTable: import('react').ForwardRefExoticComponent<SelectTableOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
@@ -69,9 +77,19 @@ type SelectUserCellOwnProps = {
69
77
  };
70
78
  export type SelectUserCellProps = SelectUserCellOwnProps & Omit<ComponentPropsWithoutRef<'span'>, keyof SelectUserCellOwnProps>;
71
79
  export declare const SelectUserCell: import('react').ForwardRefExoticComponent<SelectUserCellOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, keyof SelectUserCellOwnProps> & import('react').RefAttributes<HTMLSpanElement>>;
72
- export declare function SelectTableRow({ children, onClick }: {
80
+ /**
81
+ * Uma linha. Para agrupar (ex.: "Crédito · Visa" que abre as 12 parcelas): a linha-mãe leva
82
+ * `expanded` (e `onClick` para alternar) e marca a primeira célula com `disclosure`; as filhas
83
+ * vêm logo abaixo com `nested` — recuadas e num fundo afundado, na MESMA grade de colunas.
84
+ * Continua uma tabela só: nada de tabela dentro de linha (card dentro de card).
85
+ */
86
+ export declare function SelectTableRow({ children, onClick, expanded, nested, }: {
73
87
  children: ReactNode;
74
88
  onClick?: () => void;
89
+ /** Linha-mãe de um grupo: aberta/fechada (vira `aria-expanded`). */
90
+ expanded?: boolean;
91
+ /** Linha-filha de um grupo aberto. */
92
+ nested?: boolean;
75
93
  }): import("react").JSX.Element;
76
94
  type SelectTableCellOwnProps = {
77
95
  children: ReactNode;
@@ -79,6 +97,9 @@ type SelectTableCellOwnProps = {
79
97
  /** Accepted for API compatibility; column widths now come from the shared grid track set
80
98
  * (set on .select-table from the `columns`), so a per-cell width is no longer applied. */
81
99
  width?: string;
100
+ /** Chevron de grupo antes do conteúdo (primeira célula da linha-mãe). `'none'` reserva o
101
+ * espaço sem desenhar, para alinhar uma linha sem filhas com as vizinhas que têm. */
102
+ disclosure?: 'open' | 'closed' | 'none';
82
103
  };
83
104
  export type SelectTableCellProps = SelectTableCellOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableCellOwnProps>;
84
105
  export declare const SelectTableCell: import('react').ForwardRefExoticComponent<SelectTableCellOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectTableCellOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -144,6 +144,7 @@ export { SelectVenn } from './SelectVenn';
144
144
  export { SelectCirclePack } from './SelectCirclePack';
145
145
  export { SelectNetwork } from './SelectNetwork';
146
146
  export { SelectCombobox } from './SelectCombobox';
147
+ export { SelectSearchMenu, SelectSearchMenuOption } from './SelectSearchMenu';
147
148
  export { SelectThemeSwitcher, resolveSelectTheme } from './SelectThemeSwitcher';
148
149
  export { SelectDetailList, SelectDetailRow } from './SelectDetail';
149
150
  export { SelectAddButton } from './SelectAddButton';