@giro-ds/react 9.1.0 → 11.0.0

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.
package/dist/index.d.ts CHANGED
@@ -30,6 +30,13 @@ interface BaseProps {
30
30
  /** Quando `true`, desabilita interações com o componente */
31
31
  disabled?: boolean;
32
32
  }
33
+ /** Props para componentes que suportam escala visual (1, 1.5 ou 2) */
34
+ interface ScalableProps extends BaseProps {
35
+ /** Escala visual do componente */
36
+ scale?: Scale;
37
+ /** Estilos CSS inline adicionais */
38
+ style?: React__default.CSSProperties;
39
+ }
33
40
 
34
41
  /**
35
42
  * Props do componente Avatar
@@ -115,8 +122,6 @@ type ButtonOwnPropsBase = {
115
122
  type?: 'button' | 'submit' | 'reset';
116
123
  /** Tamanho do botão */
117
124
  size?: Size;
118
- /** Escala visual aplicada ao botão */
119
- scale?: Scale;
120
125
  /** Define se o botão ocupa 100% da largura do container */
121
126
  fullWidth?: boolean;
122
127
  /** Label acessível para leitores de tela */
@@ -135,7 +140,7 @@ type ButtonOwnPropsBase = {
135
140
  className?: string;
136
141
  /** Handler de clique; tipado em HTMLElement para ser compatível com todos os modos */
137
142
  onClick?: React__default.MouseEventHandler<HTMLElement>;
138
- } & BaseProps;
143
+ } & ScalableProps;
139
144
  /**
140
145
  * Props próprias do componente Button.
141
146
  * Quando `iconOnly: true`, a prop `icon` é **obrigatória**.
@@ -186,7 +191,7 @@ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Rea
186
191
 
187
192
  /** Formato de exibição da data aceito pelo componente. */
188
193
  type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy' | (string & {});
189
- interface CalendarBaseProps extends Omit<BaseProps, 'disabled'> {
194
+ interface CalendarBaseProps extends Omit<ScalableProps, 'disabled'> {
190
195
  /** Data selecionada atualmente (usada pelo DatePicker). */
191
196
  selected?: Date | null;
192
197
  /**
@@ -234,12 +239,10 @@ interface CalendarBaseProps extends Omit<BaseProps, 'disabled'> {
234
239
  autoFocus?: boolean;
235
240
  /** Substitui os `classNames` padrão do react-day-picker. */
236
241
  classNames?: Partial<Record<string, string>>;
237
- /** Escala visual aplicada ao componente */
238
- scale?: Scale;
239
242
  }
240
243
  type CalendarProps = CalendarBaseProps;
241
244
 
242
- declare const Calendar: ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, format: _format, locale, autoFocus, className, scale, id, "aria-label": ariaLabel, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
245
+ declare const Calendar: ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, format: _format, locale, autoFocus, className, style, scale, id, "aria-label": ariaLabel, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
243
246
 
244
247
  /**
245
248
  * Props do componente Callout
@@ -294,6 +297,27 @@ interface CalloutProps extends Omit<BaseProps, 'disabled'>, Omit<React$1.HTMLAtt
294
297
 
295
298
  declare const Callout: React__default.FC<CalloutProps>;
296
299
 
300
+ /**
301
+ * Props do componente Card
302
+ * @example
303
+ * ```tsx
304
+ * <Card>
305
+ * <h1>Conteúdo da página</h1>
306
+ * <p>Texto dentro do card</p>
307
+ * </Card>
308
+ * ```
309
+ */
310
+ interface CardProps {
311
+ /** Conteúdo a ser renderizado dentro do card */
312
+ children: React__default.ReactNode;
313
+ /** Classe CSS customizada aplicada ao elemento raiz do card */
314
+ className?: string;
315
+ /** Define se o card é interativo, aplicando estilos de hover e cursor pointer */
316
+ hoverable?: boolean;
317
+ }
318
+
319
+ declare function Card({ children, className, hoverable }: CardProps): react_jsx_runtime.JSX.Element;
320
+
297
321
  /**
298
322
  * Props do componente Checkbox
299
323
  * @example
@@ -314,7 +338,7 @@ declare const Callout: React__default.FC<CalloutProps>;
314
338
  * />
315
339
  * ```
316
340
  */
317
- interface CheckboxProps extends BaseProps {
341
+ interface CheckboxProps extends ScalableProps {
318
342
  /** Label ou conteúdo a ser exibido ao lado do checkbox */
319
343
  label?: React__default.ReactNode;
320
344
  /** Callback executado quando o estado muda: (checked) => void */
@@ -325,10 +349,6 @@ interface CheckboxProps extends BaseProps {
325
349
  checked?: boolean;
326
350
  /** Estado indeterminado (usado em selecionar todos com seleção parcial) */
327
351
  indeterminate?: boolean;
328
- /** Classe CSS opcional */
329
- className?: string;
330
- /** Escala visual aplicada ao componente */
331
- scale?: Scale;
332
352
  }
333
353
 
334
354
  declare const Checkbox: React$1.FC<CheckboxProps>;
@@ -351,7 +371,7 @@ declare const Checkbox: React$1.FC<CheckboxProps>;
351
371
  * </Chips>
352
372
  * ```
353
373
  */
354
- interface ChipsProps extends BaseProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'color'> {
374
+ interface ChipsProps extends ScalableProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'color'> {
355
375
  /** Variante semântica do chip. Define o preset de cor de fundo. */
356
376
  variant?: Exclude<TextVariant, 'color'>;
357
377
  /** Token CSS para a cor de fundo. Ex: 'color-brand-secondary-medium'. Sobrescreve o variant. */
@@ -364,12 +384,6 @@ interface ChipsProps extends BaseProps, Omit<React$1.HTMLAttributes<HTMLDivEleme
364
384
  leftIcon?: React$1.ReactNode;
365
385
  /** Ícone posicionado à direita do texto */
366
386
  rightIcon?: React$1.ReactNode;
367
- /** Estilos inline adicionais */
368
- style?: React$1.CSSProperties;
369
- /** Classe CSS opcional */
370
- className?: string;
371
- /** Escala visual aplicada ao componente */
372
- scale?: Scale;
373
387
  }
374
388
 
375
389
  declare const MemoizedChips: React__default.NamedExoticComponent<ChipsProps>;
@@ -416,7 +430,7 @@ declare function Container({ children, className }: ContainerProps): react_jsx_r
416
430
  * />
417
431
  * ```
418
432
  */
419
- interface DatePickerProps extends BaseProps {
433
+ interface DatePickerProps extends ScalableProps {
420
434
  /** Idioma para formatação da data */
421
435
  locale?: Locale;
422
436
  /** Posição do calendário em relação ao campo */
@@ -443,12 +457,6 @@ interface DatePickerProps extends BaseProps {
443
457
  maxDate?: Date;
444
458
  /** ID para testes automatizados */
445
459
  'data-testid'?: string;
446
- /** Classe CSS opcional */
447
- className?: string;
448
- /** Escala visual aplicada ao componente */
449
- datePickerScale?: Scale;
450
- /** Escala visual aplicada ao calendário */
451
- calendarScale?: Scale;
452
460
  }
453
461
 
454
462
  declare const _default$2: React__default.NamedExoticComponent<DatePickerProps>;
@@ -745,7 +753,7 @@ interface MenuItemProps {
745
753
  * />
746
754
  * ```
747
755
  */
748
- interface MenuProps extends BaseProps {
756
+ interface MenuProps extends ScalableProps {
749
757
  /** Array de itens do menu */
750
758
  items: MenuItemProps[];
751
759
  /** Elemento trigger customizado para abrir o menu */
@@ -778,12 +786,6 @@ interface MenuProps extends BaseProps {
778
786
  onApiSearch?: (searchTerm: string) => void;
779
787
  /** Callback executado quando o menu abre/fecha: (open) => void */
780
788
  onOpenChange?: (open: boolean) => void;
781
- /** Classe CSS opcional */
782
- className?: string;
783
- /** Escala visual aplicada ao conteúdo do menu */
784
- dropdownScale?: Scale;
785
- /** Escala visual aplicada ao botão/trigger quando ele aceitar a prop `scale` */
786
- buttonScale?: Scale;
787
789
  }
788
790
 
789
791
  declare const Menu: React__default.FC<MenuProps>;
@@ -893,7 +895,7 @@ declare const Popover: React$1.FC<PopoverProps>;
893
895
  * />
894
896
  * ```
895
897
  */
896
- interface QuantityProps extends BaseProps {
898
+ interface QuantityProps extends ScalableProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'size' | 'onChange'> {
897
899
  /** Valor do componente */
898
900
  value?: number;
899
901
  /** Callback executado quando o valor muda: (value) => void */
@@ -923,10 +925,6 @@ interface QuantityProps extends BaseProps {
923
925
  incrementAriaLabel?: string;
924
926
  /** Aria label para a entrada de quantidade. Padrão: 'Quantidade' */
925
927
  inputAriaLabel?: string;
926
- /** Classe CSS opcional */
927
- className?: string;
928
- /** Escala visual aplicada ao componente */
929
- scale?: Scale;
930
928
  }
931
929
 
932
930
  declare const memorizedQuantity: React__default.NamedExoticComponent<QuantityProps>;
@@ -970,7 +968,7 @@ interface RadioProps {
970
968
  * />
971
969
  * ```
972
970
  */
973
- interface RadioGroupProps extends BaseProps {
971
+ interface RadioGroupProps extends ScalableProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir'> {
974
972
  /** Array de itens de rádio */
975
973
  items: RadioProps[];
976
974
  /** Callback executado quando o valor muda: (value) => void */
@@ -983,8 +981,6 @@ interface RadioGroupProps extends BaseProps {
983
981
  ariaLabel?: string;
984
982
  /** Orientação do layout dos radio buttons */
985
983
  orientation?: "horizontal" | "vertical";
986
- /** Escala visual aplicada ao grupo */
987
- scale?: Scale;
988
984
  }
989
985
 
990
986
  declare const Radio: React__default.FC<RadioGroupProps>;
@@ -1078,7 +1074,7 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
1078
1074
  * ```
1079
1075
  */
1080
1076
  type NativeInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown'>;
1081
- interface SearchProps extends BaseProps, NativeInputProps {
1077
+ interface SearchProps extends ScalableProps, NativeInputProps {
1082
1078
  /** Placeholder do campo de busca */
1083
1079
  placeholder?: string;
1084
1080
  /** Valor controlado do campo */
@@ -1111,16 +1107,8 @@ interface SearchProps extends BaseProps, NativeInputProps {
1111
1107
  onSearch?: (value: string) => void;
1112
1108
  /** ID para testes automatizados */
1113
1109
  'data-testid'?: string;
1114
- /** Classe CSS opcional */
1115
- className?: string;
1116
- /** Habilita o teclado virtual */
1117
- virtualKeyboard?: boolean;
1118
- /** Variante do teclado virtual (padrão: 'default') */
1119
- virtualKeyboardType?: VirtualKeyboardType;
1120
- /** Comprimento máximo permitido pelo teclado virtual */
1121
- virtualKeyboardMaxLength?: number;
1122
- /** Escala visual aplicada ao componente */
1123
- scale?: Scale;
1110
+ /** Tipo do teclado virtual (padrão: undefined = desabilitado) */
1111
+ virtualKeyboard?: VirtualKeyboardType;
1124
1112
  }
1125
1113
 
1126
1114
  declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
@@ -1128,7 +1116,7 @@ declare const Search: React__default.ForwardRefExoticComponent<SearchProps & Rea
1128
1116
  /**
1129
1117
  * Representa um item do select
1130
1118
  */
1131
- interface SelectItemProps extends BaseProps {
1119
+ interface SelectItemProps extends ScalableProps {
1132
1120
  /** Texto principal do item */
1133
1121
  text: ReactNode;
1134
1122
  /** Subtítulo ou descrição do item */
@@ -1171,7 +1159,7 @@ type SelectVariant = 'text' | 'icon' | 'checkbox';
1171
1159
  * />
1172
1160
  * ```
1173
1161
  */
1174
- interface SelectProps extends BaseProps {
1162
+ interface SelectProps extends ScalableProps {
1175
1163
  /** Array de itens do select */
1176
1164
  items: SelectItemProps[];
1177
1165
  /** Callback executado quando o valor muda: (value) => void */
@@ -1222,10 +1210,6 @@ interface SelectProps extends BaseProps {
1222
1210
  onApiSearch?: (term: string) => void;
1223
1211
  /** Estado de busca em andamento */
1224
1212
  isSearching?: boolean;
1225
- /** Classe CSS opcional */
1226
- className?: string;
1227
- /** Escala visual aplicada ao componente */
1228
- scale?: Scale;
1229
1213
  }
1230
1214
 
1231
1215
  declare const Select: React__default.FC<SelectProps>;
@@ -1461,11 +1445,7 @@ interface TableV2HeaderProps {
1461
1445
  /** Items de filtro (Status, Data de início, etc.) */
1462
1446
  filterItems?: FilterItem[];
1463
1447
  /** Habilita o teclado virtual */
1464
- virtualKeyboard?: boolean;
1465
- /** Tipo do teclado virtual (padrão: 'default') */
1466
- virtualKeyboardType?: VirtualKeyboardType;
1467
- /** Comprimento máximo permitido pelo teclado virtual */
1468
- virtualKeyboardMaxLength?: number;
1448
+ virtualKeyboard?: VirtualKeyboardType;
1469
1449
  /** Modo de busca: 'instant' chama onSearchChange a cada tecla; 'on-enter' chama apenas ao pressionar Enter (padrão) */
1470
1450
  searchMode?: 'instant' | 'on-enter';
1471
1451
  /**
@@ -1672,12 +1652,8 @@ interface TextAreaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLT
1672
1652
  height?: number;
1673
1653
  /** Classe CSS opcional */
1674
1654
  className?: string;
1675
- /** Habilita o teclado virtual */
1676
- virtualKeyboard?: boolean;
1677
- /** Tipo do teclado virtual (padrão: 'default') */
1678
- virtualKeyboardType?: VirtualKeyboardType;
1679
- /** Comprimento máximo permitido pelo teclado virtual */
1680
- virtualKeyboardMaxLength?: number;
1655
+ /** Tipo do teclado virtual (padrão: undefined = desabilitado) */
1656
+ virtualKeyboard?: VirtualKeyboardType;
1681
1657
  }
1682
1658
 
1683
1659
  declare const _default$1: React__default.NamedExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
@@ -1710,7 +1686,7 @@ type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
1710
1686
  * />
1711
1687
  * ```
1712
1688
  */
1713
- interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
1689
+ interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
1714
1690
  /** Valor controlado do campo */
1715
1691
  value?: string | number;
1716
1692
  /** Callback executado quando o valor muda: (value) => void */
@@ -1726,9 +1702,9 @@ interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInp
1726
1702
  /** Texto do tooltip */
1727
1703
  tooltipText?: string;
1728
1704
  /** Lado onde o tooltip aparece */
1729
- side?: Side;
1705
+ tooltipSide?: Side;
1730
1706
  /** Alinhamento do tooltip */
1731
- align?: Align;
1707
+ tooltipAlign?: Align;
1732
1708
  /**
1733
1709
  * Mensagem de erro exibida no campo.
1734
1710
  * Usada tanto pela validação interna (required, formato, etc.)
@@ -1741,18 +1717,12 @@ interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInp
1741
1717
  icon?: React__default.ReactNode;
1742
1718
  /** Mantém o ícone visível mesmo quando o campo tem valor */
1743
1719
  persistIcon?: boolean;
1744
- /** Classe CSS opcional */
1745
- className?: string;
1746
- /** Habilita o teclado virtual */
1747
- virtualKeyboard?: boolean;
1748
- /** Tipo do teclado virtual (padrão: 'default') */
1749
- virtualKeyboardType?: VirtualKeyboardType;
1750
- /** Comprimento máximo permitido pelo teclado virtual */
1751
- virtualKeyboardMaxLength?: number;
1752
- /** Aplica variação visual para uso acoplado ao VirtualKeyboard no modo fixed */
1720
+ /** Tipo do teclado virtual (padrão: undefined = desabilitado) */
1721
+ virtualKeyboard?: VirtualKeyboardType;
1722
+ /** Aplica variação visual para uso acoplado ao VirtualKeyboard no modo fixed, essa prop é de uso exclusivo do VirtualKeyboard no modo fixed */
1753
1723
  attachedToVirtualKeyboard?: boolean;
1754
- /** Escala visual aplicada ao componente */
1755
- scale?: Scale;
1724
+ /** Desabilita o autocomplete nativo do browser (padrão: false) */
1725
+ disableAutoComplete?: boolean;
1756
1726
  }
1757
1727
 
1758
1728
  declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
@@ -1978,7 +1948,7 @@ declare const Tooltip: React__default.FC<TooltipProps>;
1978
1948
  * />
1979
1949
  * ```
1980
1950
  */
1981
- interface SwitchProps extends BaseProps {
1951
+ interface SwitchProps extends ScalableProps {
1982
1952
  /** Estado inicial (modo não controlado) */
1983
1953
  defaultChecked?: boolean;
1984
1954
  /** Callback executado quando o estado muda: (checked) => void */
@@ -1989,10 +1959,6 @@ interface SwitchProps extends BaseProps {
1989
1959
  value?: string;
1990
1960
  /** Estado atual (modo controlado) */
1991
1961
  checked?: boolean;
1992
- /** Classe CSS opcional */
1993
- className?: string;
1994
- /** Escala visual aplicada ao componente */
1995
- scale?: Scale;
1996
1962
  }
1997
1963
 
1998
1964
  declare const Switch: React$1.FC<SwitchProps>;
@@ -2177,5 +2143,5 @@ declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, thresho
2177
2143
 
2178
2144
  declare const normalizeText: (text: React.ReactNode) => string;
2179
2145
 
2180
- export { Avatar, Badge, Button, Calendar, Callout, Checkbox, MemoizedChips as Chips, Container, _default$2 as DatePicker, Dialog, Drawer, Filter, ListItem, Menu, Modal, Popover, memorizedQuantity as Quantity, Radio, Search, Select, Switch, Table, TableHeader, TablePagination, TableV2, _default$1 as TextArea, _default as TextField, Toast, ToastContainer, ToastProvider, Tooltip, VerificationCode, VirtualKeyboard, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
2181
- export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, FilterItem$1 as FilterItem, FilterProps, ListItemProps, MenuProps, ModalProps, PopoverProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableHeaderProps, TablePaginationProps, TableProps, TableV2FooterProps, TableV2HeaderProps, TableV2Props, TextAreaProps, TextFieldProps, ToastProps, TooltipProps, VerificationCodeProps, VirtualKeyboardProps, VirtualKeyboardVariant };
2146
+ export { Avatar, Badge, Button, Calendar, Callout, Card, Checkbox, MemoizedChips as Chips, Container, _default$2 as DatePicker, Dialog, Drawer, Filter, ListItem, Menu, Modal, Popover, memorizedQuantity as Quantity, Radio, Search, Select, Switch, Table, TableHeader, TablePagination, TableV2, _default$1 as TextArea, _default as TextField, Toast, ToastContainer, ToastProvider, Tooltip, VerificationCode, VirtualKeyboard, normalizeText, useApiSimulation, useInfiniteScroll, useToast };
2147
+ export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CardProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, FilterItem$1 as FilterItem, FilterProps, ListItemProps, MenuProps, ModalProps, PopoverProps, QuantityProps, RadioGroupProps, RadioProps, SearchProps, SelectProps, SwitchProps, TableHeaderProps, TablePaginationProps, TableProps, TableV2FooterProps, TableV2HeaderProps, TableV2Props, TextAreaProps, TextFieldProps, ToastProps, TooltipProps, VerificationCodeProps, VirtualKeyboardProps, VirtualKeyboardVariant };