@giro-ds/react 10.0.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.cjs +55 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -62
- package/dist/index.esm.js +55 -101
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +3 -3
- package/package.json +1 -1
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
|
-
} &
|
|
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<
|
|
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
|
|
@@ -335,7 +338,7 @@ declare function Card({ children, className, hoverable }: CardProps): react_jsx_
|
|
|
335
338
|
* />
|
|
336
339
|
* ```
|
|
337
340
|
*/
|
|
338
|
-
interface CheckboxProps extends
|
|
341
|
+
interface CheckboxProps extends ScalableProps {
|
|
339
342
|
/** Label ou conteúdo a ser exibido ao lado do checkbox */
|
|
340
343
|
label?: React__default.ReactNode;
|
|
341
344
|
/** Callback executado quando o estado muda: (checked) => void */
|
|
@@ -346,10 +349,6 @@ interface CheckboxProps extends BaseProps {
|
|
|
346
349
|
checked?: boolean;
|
|
347
350
|
/** Estado indeterminado (usado em selecionar todos com seleção parcial) */
|
|
348
351
|
indeterminate?: boolean;
|
|
349
|
-
/** Classe CSS opcional */
|
|
350
|
-
className?: string;
|
|
351
|
-
/** Escala visual aplicada ao componente */
|
|
352
|
-
scale?: Scale;
|
|
353
352
|
}
|
|
354
353
|
|
|
355
354
|
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
@@ -372,7 +371,7 @@ declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
|
372
371
|
* </Chips>
|
|
373
372
|
* ```
|
|
374
373
|
*/
|
|
375
|
-
interface ChipsProps extends
|
|
374
|
+
interface ChipsProps extends ScalableProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'color'> {
|
|
376
375
|
/** Variante semântica do chip. Define o preset de cor de fundo. */
|
|
377
376
|
variant?: Exclude<TextVariant, 'color'>;
|
|
378
377
|
/** Token CSS para a cor de fundo. Ex: 'color-brand-secondary-medium'. Sobrescreve o variant. */
|
|
@@ -385,12 +384,6 @@ interface ChipsProps extends BaseProps, Omit<React$1.HTMLAttributes<HTMLDivEleme
|
|
|
385
384
|
leftIcon?: React$1.ReactNode;
|
|
386
385
|
/** Ícone posicionado à direita do texto */
|
|
387
386
|
rightIcon?: React$1.ReactNode;
|
|
388
|
-
/** Estilos inline adicionais */
|
|
389
|
-
style?: React$1.CSSProperties;
|
|
390
|
-
/** Classe CSS opcional */
|
|
391
|
-
className?: string;
|
|
392
|
-
/** Escala visual aplicada ao componente */
|
|
393
|
-
scale?: Scale;
|
|
394
387
|
}
|
|
395
388
|
|
|
396
389
|
declare const MemoizedChips: React__default.NamedExoticComponent<ChipsProps>;
|
|
@@ -437,7 +430,7 @@ declare function Container({ children, className }: ContainerProps): react_jsx_r
|
|
|
437
430
|
* />
|
|
438
431
|
* ```
|
|
439
432
|
*/
|
|
440
|
-
interface DatePickerProps extends
|
|
433
|
+
interface DatePickerProps extends ScalableProps {
|
|
441
434
|
/** Idioma para formatação da data */
|
|
442
435
|
locale?: Locale;
|
|
443
436
|
/** Posição do calendário em relação ao campo */
|
|
@@ -464,12 +457,6 @@ interface DatePickerProps extends BaseProps {
|
|
|
464
457
|
maxDate?: Date;
|
|
465
458
|
/** ID para testes automatizados */
|
|
466
459
|
'data-testid'?: string;
|
|
467
|
-
/** Classe CSS opcional */
|
|
468
|
-
className?: string;
|
|
469
|
-
/** Escala visual aplicada ao componente */
|
|
470
|
-
datePickerScale?: Scale;
|
|
471
|
-
/** Escala visual aplicada ao calendário */
|
|
472
|
-
calendarScale?: Scale;
|
|
473
460
|
}
|
|
474
461
|
|
|
475
462
|
declare const _default$2: React__default.NamedExoticComponent<DatePickerProps>;
|
|
@@ -766,7 +753,7 @@ interface MenuItemProps {
|
|
|
766
753
|
* />
|
|
767
754
|
* ```
|
|
768
755
|
*/
|
|
769
|
-
interface MenuProps extends
|
|
756
|
+
interface MenuProps extends ScalableProps {
|
|
770
757
|
/** Array de itens do menu */
|
|
771
758
|
items: MenuItemProps[];
|
|
772
759
|
/** Elemento trigger customizado para abrir o menu */
|
|
@@ -799,12 +786,6 @@ interface MenuProps extends BaseProps {
|
|
|
799
786
|
onApiSearch?: (searchTerm: string) => void;
|
|
800
787
|
/** Callback executado quando o menu abre/fecha: (open) => void */
|
|
801
788
|
onOpenChange?: (open: boolean) => void;
|
|
802
|
-
/** Classe CSS opcional */
|
|
803
|
-
className?: string;
|
|
804
|
-
/** Escala visual aplicada ao conteúdo do menu */
|
|
805
|
-
dropdownScale?: Scale;
|
|
806
|
-
/** Escala visual aplicada ao botão/trigger quando ele aceitar a prop `scale` */
|
|
807
|
-
buttonScale?: Scale;
|
|
808
789
|
}
|
|
809
790
|
|
|
810
791
|
declare const Menu: React__default.FC<MenuProps>;
|
|
@@ -914,7 +895,7 @@ declare const Popover: React$1.FC<PopoverProps>;
|
|
|
914
895
|
* />
|
|
915
896
|
* ```
|
|
916
897
|
*/
|
|
917
|
-
interface QuantityProps extends
|
|
898
|
+
interface QuantityProps extends ScalableProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'size' | 'onChange'> {
|
|
918
899
|
/** Valor do componente */
|
|
919
900
|
value?: number;
|
|
920
901
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -944,10 +925,6 @@ interface QuantityProps extends BaseProps {
|
|
|
944
925
|
incrementAriaLabel?: string;
|
|
945
926
|
/** Aria label para a entrada de quantidade. Padrão: 'Quantidade' */
|
|
946
927
|
inputAriaLabel?: string;
|
|
947
|
-
/** Classe CSS opcional */
|
|
948
|
-
className?: string;
|
|
949
|
-
/** Escala visual aplicada ao componente */
|
|
950
|
-
scale?: Scale;
|
|
951
928
|
}
|
|
952
929
|
|
|
953
930
|
declare const memorizedQuantity: React__default.NamedExoticComponent<QuantityProps>;
|
|
@@ -991,7 +968,7 @@ interface RadioProps {
|
|
|
991
968
|
* />
|
|
992
969
|
* ```
|
|
993
970
|
*/
|
|
994
|
-
interface RadioGroupProps extends
|
|
971
|
+
interface RadioGroupProps extends ScalableProps, Omit<React$1.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir'> {
|
|
995
972
|
/** Array de itens de rádio */
|
|
996
973
|
items: RadioProps[];
|
|
997
974
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -1004,8 +981,6 @@ interface RadioGroupProps extends BaseProps {
|
|
|
1004
981
|
ariaLabel?: string;
|
|
1005
982
|
/** Orientação do layout dos radio buttons */
|
|
1006
983
|
orientation?: "horizontal" | "vertical";
|
|
1007
|
-
/** Escala visual aplicada ao grupo */
|
|
1008
|
-
scale?: Scale;
|
|
1009
984
|
}
|
|
1010
985
|
|
|
1011
986
|
declare const Radio: React__default.FC<RadioGroupProps>;
|
|
@@ -1099,7 +1074,7 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
|
|
|
1099
1074
|
* ```
|
|
1100
1075
|
*/
|
|
1101
1076
|
type NativeInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown'>;
|
|
1102
|
-
interface SearchProps extends
|
|
1077
|
+
interface SearchProps extends ScalableProps, NativeInputProps {
|
|
1103
1078
|
/** Placeholder do campo de busca */
|
|
1104
1079
|
placeholder?: string;
|
|
1105
1080
|
/** Valor controlado do campo */
|
|
@@ -1132,12 +1107,8 @@ interface SearchProps extends BaseProps, NativeInputProps {
|
|
|
1132
1107
|
onSearch?: (value: string) => void;
|
|
1133
1108
|
/** ID para testes automatizados */
|
|
1134
1109
|
'data-testid'?: string;
|
|
1135
|
-
/** Classe CSS opcional */
|
|
1136
|
-
className?: string;
|
|
1137
1110
|
/** Tipo do teclado virtual (padrão: undefined = desabilitado) */
|
|
1138
1111
|
virtualKeyboard?: VirtualKeyboardType;
|
|
1139
|
-
/** Escala visual aplicada ao componente */
|
|
1140
|
-
scale?: Scale;
|
|
1141
1112
|
}
|
|
1142
1113
|
|
|
1143
1114
|
declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
@@ -1145,7 +1116,7 @@ declare const Search: React__default.ForwardRefExoticComponent<SearchProps & Rea
|
|
|
1145
1116
|
/**
|
|
1146
1117
|
* Representa um item do select
|
|
1147
1118
|
*/
|
|
1148
|
-
interface SelectItemProps extends
|
|
1119
|
+
interface SelectItemProps extends ScalableProps {
|
|
1149
1120
|
/** Texto principal do item */
|
|
1150
1121
|
text: ReactNode;
|
|
1151
1122
|
/** Subtítulo ou descrição do item */
|
|
@@ -1188,7 +1159,7 @@ type SelectVariant = 'text' | 'icon' | 'checkbox';
|
|
|
1188
1159
|
* />
|
|
1189
1160
|
* ```
|
|
1190
1161
|
*/
|
|
1191
|
-
interface SelectProps extends
|
|
1162
|
+
interface SelectProps extends ScalableProps {
|
|
1192
1163
|
/** Array de itens do select */
|
|
1193
1164
|
items: SelectItemProps[];
|
|
1194
1165
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -1239,10 +1210,6 @@ interface SelectProps extends BaseProps {
|
|
|
1239
1210
|
onApiSearch?: (term: string) => void;
|
|
1240
1211
|
/** Estado de busca em andamento */
|
|
1241
1212
|
isSearching?: boolean;
|
|
1242
|
-
/** Classe CSS opcional */
|
|
1243
|
-
className?: string;
|
|
1244
|
-
/** Escala visual aplicada ao componente */
|
|
1245
|
-
scale?: Scale;
|
|
1246
1213
|
}
|
|
1247
1214
|
|
|
1248
1215
|
declare const Select: React__default.FC<SelectProps>;
|
|
@@ -1719,7 +1686,7 @@ type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
|
1719
1686
|
* />
|
|
1720
1687
|
* ```
|
|
1721
1688
|
*/
|
|
1722
|
-
interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
|
|
1689
|
+
interface TextFieldProps extends ScalableProps, Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'type'> {
|
|
1723
1690
|
/** Valor controlado do campo */
|
|
1724
1691
|
value?: string | number;
|
|
1725
1692
|
/** Callback executado quando o valor muda: (value) => void */
|
|
@@ -1750,14 +1717,10 @@ interface TextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInp
|
|
|
1750
1717
|
icon?: React__default.ReactNode;
|
|
1751
1718
|
/** Mantém o ícone visível mesmo quando o campo tem valor */
|
|
1752
1719
|
persistIcon?: boolean;
|
|
1753
|
-
/** Classe CSS opcional */
|
|
1754
|
-
className?: string;
|
|
1755
1720
|
/** Tipo do teclado virtual (padrão: undefined = desabilitado) */
|
|
1756
1721
|
virtualKeyboard?: VirtualKeyboardType;
|
|
1757
1722
|
/** Aplica variação visual para uso acoplado ao VirtualKeyboard no modo fixed, essa prop é de uso exclusivo do VirtualKeyboard no modo fixed */
|
|
1758
1723
|
attachedToVirtualKeyboard?: boolean;
|
|
1759
|
-
/** Escala visual aplicada ao componente */
|
|
1760
|
-
scale?: Scale;
|
|
1761
1724
|
/** Desabilita o autocomplete nativo do browser (padrão: false) */
|
|
1762
1725
|
disableAutoComplete?: boolean;
|
|
1763
1726
|
}
|
|
@@ -1985,7 +1948,7 @@ declare const Tooltip: React__default.FC<TooltipProps>;
|
|
|
1985
1948
|
* />
|
|
1986
1949
|
* ```
|
|
1987
1950
|
*/
|
|
1988
|
-
interface SwitchProps extends
|
|
1951
|
+
interface SwitchProps extends ScalableProps {
|
|
1989
1952
|
/** Estado inicial (modo não controlado) */
|
|
1990
1953
|
defaultChecked?: boolean;
|
|
1991
1954
|
/** Callback executado quando o estado muda: (checked) => void */
|
|
@@ -1996,10 +1959,6 @@ interface SwitchProps extends BaseProps {
|
|
|
1996
1959
|
value?: string;
|
|
1997
1960
|
/** Estado atual (modo controlado) */
|
|
1998
1961
|
checked?: boolean;
|
|
1999
|
-
/** Classe CSS opcional */
|
|
2000
|
-
className?: string;
|
|
2001
|
-
/** Escala visual aplicada ao componente */
|
|
2002
|
-
scale?: Scale;
|
|
2003
1962
|
}
|
|
2004
1963
|
|
|
2005
1964
|
declare const Switch: React$1.FC<SwitchProps>;
|