@giro-ds/react 11.1.0 → 11.2.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.cjs +279 -205
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +80 -32
- package/dist/index.esm.js +281 -208
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -550,6 +550,41 @@ interface DrawerProps extends BaseProps {
|
|
|
550
550
|
|
|
551
551
|
declare const Drawer: React__default.FC<DrawerProps>;
|
|
552
552
|
|
|
553
|
+
interface FileUploadProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'accept' | 'multiple'> {
|
|
554
|
+
/** Tipos de arquivo aceitos pelo seletor nativo (ex: "image/*", ".pdf,.docx") */
|
|
555
|
+
accept?: string;
|
|
556
|
+
/** Permite selecionar múltiplos arquivos */
|
|
557
|
+
multiple?: boolean;
|
|
558
|
+
/** Lista controlada de arquivos */
|
|
559
|
+
value?: File[];
|
|
560
|
+
/** Callback disparado quando a lista de arquivos muda */
|
|
561
|
+
onChange?: (files: File[]) => void;
|
|
562
|
+
/** Texto auxiliar exibido abaixo da zona de drop */
|
|
563
|
+
helperText?: string;
|
|
564
|
+
/** Sinaliza estado de erro */
|
|
565
|
+
error?: boolean;
|
|
566
|
+
/** Mensagem de erro exibida no helperText quando em estado de erro.
|
|
567
|
+
* Erros internos de tipo (accept), tamanho (maxFileSize) e quantidade (maxFilesQuantity)
|
|
568
|
+
* também preenchem o helperText com mensagens padrão. */
|
|
569
|
+
errorMessage?: string;
|
|
570
|
+
/** Mensagem de erro exibida abaixo do icone de erro, caso não tenha a mensagem não ira aparecer nada */
|
|
571
|
+
descriptionErrorMessage?: string;
|
|
572
|
+
/** Tamanho máximo em bytes por arquivo */
|
|
573
|
+
maxFileSize?: number;
|
|
574
|
+
/** Número máximo de arquivos permitidos (exige multiple=true para mais de 1) */
|
|
575
|
+
maxFilesQuantity?: number;
|
|
576
|
+
/** Quando true, o componente está desabilitado */
|
|
577
|
+
disabled?: boolean;
|
|
578
|
+
/** Classes CSS adicionais */
|
|
579
|
+
className?: string;
|
|
580
|
+
/** Identificador único */
|
|
581
|
+
id?: string;
|
|
582
|
+
/** Texto de instrução exibido na zona vazia */
|
|
583
|
+
description?: string;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
declare const FileUpload: React__default.ForwardRefExoticComponent<FileUploadProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
587
|
+
|
|
553
588
|
interface FilterItem$2 {
|
|
554
589
|
/** Identificador único do item (usado em `selectedIds` e `onApplyFilter`) */
|
|
555
590
|
id?: BaseProps['id'];
|
|
@@ -831,6 +866,8 @@ interface ModalProps extends BaseProps {
|
|
|
831
866
|
footer?: ReactNode;
|
|
832
867
|
/** Largura customizada do modal (ex: '500px', '80%') */
|
|
833
868
|
customWidth?: string;
|
|
869
|
+
/** Altura customizada do modal (ex: '500px', '80%') */
|
|
870
|
+
customHeight?: string;
|
|
834
871
|
/** Define se o modal ocupa toda a tela. Tem prioridade sobre customWidth */
|
|
835
872
|
fullscreen?: boolean;
|
|
836
873
|
/** Classe CSS opcional */
|
|
@@ -1032,6 +1069,14 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
|
|
|
1032
1069
|
onChange?: (value: string) => void;
|
|
1033
1070
|
/** Callback executado quando uma tecla é pressionada: (key) => void */
|
|
1034
1071
|
onKeyPress?: (key: string) => void;
|
|
1072
|
+
/**
|
|
1073
|
+
* Callback executado sempre que o `type` do teclado muda.
|
|
1074
|
+
* Útil para que o consumidor saiba o tipo atual e possa reagir à mudança
|
|
1075
|
+
* (ex.: buscar dados diferentes, ajustar layout, etc.).
|
|
1076
|
+
*
|
|
1077
|
+
* Sempre dispara na montagem inicial, servindo como fallback para consulta do tipo atual.
|
|
1078
|
+
*/
|
|
1079
|
+
onTypeChange?: (type: VirtualKeyboardType) => void;
|
|
1035
1080
|
/** Limite máximo de caracteres */
|
|
1036
1081
|
maxLength?: number;
|
|
1037
1082
|
/** Controla a exibição do botão {emoticon} nos layouts suportados */
|
|
@@ -1045,6 +1090,13 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
|
|
|
1045
1090
|
* @default true
|
|
1046
1091
|
*/
|
|
1047
1092
|
showEnterKey?: boolean;
|
|
1093
|
+
/**
|
|
1094
|
+
* Controla a exibição da tecla de alternância entre os layouts default ("123") e numeric ("ABC").
|
|
1095
|
+
* Quando `false`, a tecla "123" (no layout default) é removida — a tecla espaço cresce para ocupar o espaço —
|
|
1096
|
+
* e a tecla "ABC" (no layout numeric) é substituída por um espaço vazio.
|
|
1097
|
+
* @default true
|
|
1098
|
+
*/
|
|
1099
|
+
showTypeSwitchKey?: boolean;
|
|
1048
1100
|
/** Texto de ajuda do TextField exibido no modo `fixed` */
|
|
1049
1101
|
helperText?: string;
|
|
1050
1102
|
/** Sinaliza erro no TextField exibido no modo `fixed` */
|
|
@@ -1970,61 +2022,57 @@ interface SwitchProps extends ScalableProps {
|
|
|
1970
2022
|
|
|
1971
2023
|
declare const Switch: React$1.FC<SwitchProps>;
|
|
1972
2024
|
|
|
1973
|
-
/** Tipos de
|
|
1974
|
-
type
|
|
2025
|
+
/** Tipos de validação suportados pelo VerificationCode */
|
|
2026
|
+
type OTPValidationType = 'numeric' | 'alphanumeric' | 'alpha';
|
|
1975
2027
|
/**
|
|
1976
2028
|
* Props do componente VerificationCode
|
|
1977
2029
|
* @example
|
|
1978
2030
|
* ```tsx
|
|
1979
2031
|
* <VerificationCode
|
|
1980
2032
|
* length={6}
|
|
1981
|
-
*
|
|
1982
|
-
*
|
|
2033
|
+
* validationType="numeric"
|
|
2034
|
+
* onValueChange={(v) => console.log(v)}
|
|
1983
2035
|
* />
|
|
1984
2036
|
* ```
|
|
1985
2037
|
* @example
|
|
1986
2038
|
* ```tsx
|
|
1987
2039
|
* <VerificationCode
|
|
1988
2040
|
* length={4}
|
|
1989
|
-
*
|
|
1990
|
-
*
|
|
2041
|
+
* name="otp"
|
|
2042
|
+
* autoSubmit
|
|
2043
|
+
* onAutoSubmit={(v) => handleVerify(v)}
|
|
1991
2044
|
* hasError={!!error}
|
|
1992
2045
|
* errorMessage="Código inválido"
|
|
1993
|
-
* disabled={isVerifying}
|
|
1994
2046
|
* />
|
|
1995
2047
|
* ```
|
|
1996
2048
|
*/
|
|
1997
2049
|
interface VerificationCodeProps extends BaseProps {
|
|
1998
|
-
/** Número de dígitos
|
|
2050
|
+
/** Número de campos/dígitos (padrão: 6) */
|
|
1999
2051
|
length?: number;
|
|
2000
|
-
/** Tipo de
|
|
2001
|
-
|
|
2002
|
-
/**
|
|
2003
|
-
|
|
2052
|
+
/** Tipo de validação aceita pelo campo (padrão: 'numeric') */
|
|
2053
|
+
validationType?: OTPValidationType;
|
|
2054
|
+
/** Valor controlado do campo */
|
|
2055
|
+
value?: string;
|
|
2056
|
+
/** Valor inicial não controlado */
|
|
2057
|
+
defaultValue?: string;
|
|
2058
|
+
/** Callback chamado quando o valor muda */
|
|
2059
|
+
onValueChange?: (value: string) => void;
|
|
2060
|
+
/** Submete o formulário associado automaticamente ao completar */
|
|
2061
|
+
autoSubmit?: boolean;
|
|
2062
|
+
/** Callback chamado ao completar (quando autoSubmit está ativo) */
|
|
2063
|
+
onAutoSubmit?: (value: string) => void;
|
|
2064
|
+
/** Nome do campo para envio em formulários */
|
|
2065
|
+
name?: string;
|
|
2066
|
+
/** ID do formulário associado */
|
|
2067
|
+
form?: string;
|
|
2004
2068
|
/** Define se o campo está em estado de erro */
|
|
2005
2069
|
hasError?: boolean;
|
|
2006
2070
|
/** Mensagem de erro exibida abaixo do componente */
|
|
2007
2071
|
errorMessage?: string;
|
|
2008
|
-
/**
|
|
2009
|
-
|
|
2072
|
+
/** Define o campo como somente leitura */
|
|
2073
|
+
readOnly?: boolean;
|
|
2010
2074
|
}
|
|
2011
2075
|
|
|
2012
|
-
/**
|
|
2013
|
-
* Componente VerificationCode para entrada de códigos de verificação
|
|
2014
|
-
*
|
|
2015
|
-
* @description Permite entrada de códigos com múltiplos dígitos,
|
|
2016
|
-
* suportando diferentes tipos de caracteres e navegação por teclado.
|
|
2017
|
-
*
|
|
2018
|
-
* @example
|
|
2019
|
-
* ```tsx
|
|
2020
|
-
* <VerificationCode
|
|
2021
|
-
* length={6}
|
|
2022
|
-
* inputType="numeric"
|
|
2023
|
-
* onComplete={(code) => console.log('Código:', code)}
|
|
2024
|
-
* hasError={false}
|
|
2025
|
-
* />
|
|
2026
|
-
* ```
|
|
2027
|
-
*/
|
|
2028
2076
|
declare const VerificationCode: React__default.FC<VerificationCodeProps>;
|
|
2029
2077
|
|
|
2030
2078
|
/**
|
|
@@ -2150,5 +2198,5 @@ declare function useInfiniteScroll({ status, page, lastPage, onLoadMore, thresho
|
|
|
2150
2198
|
|
|
2151
2199
|
declare const normalizeText: (text: React.ReactNode) => string;
|
|
2152
2200
|
|
|
2153
|
-
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 };
|
|
2154
|
-
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 };
|
|
2201
|
+
export { Avatar, Badge, Button, Calendar, Callout, Card, Checkbox, MemoizedChips as Chips, Container, _default$2 as DatePicker, Dialog, Drawer, FileUpload, 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 };
|
|
2202
|
+
export type { AvatarProps, BadgeProps, ButtonProps, CalendarProps, CalloutProps, CardProps, CheckboxProps, ChipsProps, ContainerProps, DatePickerProps, DialogProps, DrawerProps, FileUploadProps, 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 };
|