@selectwin/kit 0.1.81 → 0.1.83

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,19 @@
1
+ import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ export interface SelectMark {
3
+ id: string;
4
+ /** Nome por extenso — vira o `title` (tooltip nativo) e o rótulo acessível. */
5
+ label: string;
6
+ /** Glifo da marca, quando o kit tem um. */
7
+ icon?: ReactNode;
8
+ /** Monograma de 1–3 letras, quando não tem (padrão: a primeira letra de `label`).
9
+ * Com 3 letras a fonte encolhe sozinha — o círculo não muda de tamanho. */
10
+ initials?: string;
11
+ }
12
+ type SelectMarkStackOwnProps = {
13
+ marks: SelectMark[];
14
+ /** Quantas marcas antes do "+N" (padrão 4). */
15
+ max?: number;
16
+ };
17
+ export type SelectMarkStackProps = SelectMarkStackOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectMarkStackOwnProps>;
18
+ export declare const SelectMarkStack: import('react').ForwardRefExoticComponent<SelectMarkStackOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectMarkStackOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
19
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ type SelectOfferPriceOwnProps = {
3
+ /** O que o comprador paga, em CENTAVOS. Ausente = o bloco não é renderizado. */
4
+ price?: number | null;
5
+ /** O preço de antes, em CENTAVOS. Só entra quando maior que `price`. */
6
+ was?: number | null;
7
+ /** Esconde o selo de desconto (o card já diz isso de outro jeito). */
8
+ hideDiscount?: boolean;
9
+ };
10
+ export type SelectOfferPriceProps = SelectOfferPriceOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectOfferPriceOwnProps>;
11
+ export declare const SelectOfferPrice: import('react').ForwardRefExoticComponent<SelectOfferPriceOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectOfferPriceOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ type SelectRatingQuoteOwnProps = {
3
+ /** Nota de 0 a `max`. Ausente = sem estrelas. */
4
+ stars?: number | null;
5
+ max?: number;
6
+ /** Título da avaliação (a frase curta que a pessoa deu ao depoimento). */
7
+ title?: ReactNode;
8
+ /** O depoimento. Cortado em 2 linhas. */
9
+ text?: ReactNode;
10
+ };
11
+ export type SelectRatingQuoteProps = SelectRatingQuoteOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectRatingQuoteOwnProps>;
12
+ export declare const SelectRatingQuote: import('react').ForwardRefExoticComponent<SelectRatingQuoteOwnProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SelectRatingQuoteOwnProps> & import('react').RefAttributes<HTMLDivElement>>;
13
+ export {};
@@ -13,6 +13,9 @@ export interface SelectColumn {
13
13
  sortable?: boolean;
14
14
  sortDir?: 'asc' | 'desc' | null;
15
15
  onSort?: () => void;
16
+ /** Deixa a coluna fora do arrasto de largura (default: arrastável). Use em coluna que não é
17
+ * conteúdo — a de ações, que tem tamanho de ícone e nada a revelar se esticada. */
18
+ resizable?: boolean;
16
19
  }
17
20
  type SelectTableOwnProps = {
18
21
  columns: SelectColumn[];
@@ -41,6 +44,19 @@ type SelectTableOwnProps = {
41
44
  * filtros, não junto do título. Sem `filters` não existe faixa de consulta, então eles
42
45
  * voltam para o lado do `action` (uma faixa só para a engrenagem seria vazia). */
43
46
  tools?: ReactNode;
47
+ /**
48
+ * Liga as alças de arrastar a largura da coluna (a barrinha na divisa do cabeçalho).
49
+ *
50
+ * A tabela NÃO guarda a largura: ela avisa, e quem chamou decide. É o mesmo arranjo do sort e
51
+ * da visibilidade — o primitivo desenha, a SelectDataTable é dona do estado e da persistência.
52
+ * O `width` que voltar entra como track fixo do grid, exatamente como um `width` declarado.
53
+ *
54
+ * Sem esta prop não há alça nenhuma: uma tabela que não sabe guardar a largura não deve
55
+ * oferecer o gesto, porque ele se desfaria no próximo render.
56
+ */
57
+ onColumnResize?: (index: number, width: string) => void;
58
+ /** Duplo clique na alça devolve a coluna ao tamanho automático. */
59
+ onColumnResizeReset?: (index: number) => void;
44
60
  };
45
61
  export type SelectTableProps = SelectTableOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SelectTableOwnProps>;
46
62
  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>>;
package/dist/index.d.ts CHANGED
@@ -82,6 +82,9 @@ export { SelectDataTable, SELECT_COL_DATETIME, SELECT_COL_ID, useSelectPageSize
82
82
  export { SelectCardGrid } from './SelectCardGrid';
83
83
  export { SelectRecordCard, SelectLayoutThumb } from './SelectRecordCard';
84
84
  export { SelectSplitChain } from './SelectSplitChain';
85
+ export { SelectOfferPrice } from './SelectOfferPrice';
86
+ export { SelectRatingQuote } from './SelectRatingQuote';
87
+ export { SelectMarkStack } from './SelectMarkStack';
85
88
  export { SelectPagination } from './SelectPagination';
86
89
  export { SelectFilterBar } from './SelectFilterBar';
87
90
  export { SelectTagSelect } from './SelectTagSelect';
@@ -212,6 +215,9 @@ export type { SelectTimelineItem, SelectTimelineTone } from './SelectTimeline';
212
215
  export type { SelectDataColumn } from './SelectDataTable';
213
216
  export type { SelectRecordCardProps, SelectRecordCardTone, SelectLayoutThumbProps } from './SelectRecordCard';
214
217
  export type { SelectSplitChainProps, SelectSplitNode } from './SelectSplitChain';
218
+ export type { SelectOfferPriceProps } from './SelectOfferPrice';
219
+ export type { SelectRatingQuoteProps } from './SelectRatingQuote';
220
+ export type { SelectMarkStackProps, SelectMark } from './SelectMarkStack';
215
221
  export type { SelectListPagination } from './internal/listChrome';
216
222
  export type { SelectPaginationProps } from './SelectPagination';
217
223
  export type { SelectFilterDef } from './SelectFilterBar';