@giro-ds/react 6.0.0 → 6.0.2
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +22 -6
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,16 +4,27 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
4
4
|
import { Matcher } from 'react-day-picker';
|
|
5
5
|
import { Toast as Toast$1 } from 'radix-ui';
|
|
6
6
|
|
|
7
|
+
/** Tamanho do componente: 'sm' (pequeno) ou 'lg' (grande) */
|
|
7
8
|
type Size = 'sm' | 'lg';
|
|
9
|
+
/** Variante visual do componente: 'filled' (preenchido), 'outlined' (contorno) ou 'text' (apenas texto) */
|
|
8
10
|
type Variant = 'filled' | 'outlined' | 'text';
|
|
11
|
+
/** Variante de cor do texto: 'neutral' (neutro), 'brand' (marca), 'color' (colorido), 'success' (sucesso) ou 'alert' (alerta) */
|
|
9
12
|
type TextVariant = 'neutral' | 'brand' | 'color' | 'success' | 'alert';
|
|
13
|
+
/** Lado de posicionamento: 'top' (topo), 'right' (direita), 'bottom' (base) ou 'left' (esquerda) */
|
|
10
14
|
type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
15
|
+
/** Alinhamento do componente: 'start' (início), 'center' (centro) ou 'end' (fim) */
|
|
11
16
|
type Align = 'start' | 'center' | 'end';
|
|
17
|
+
/** Posição horizontal de um elemento secundário: 'right' (direita), 'left' (esquerda) ou 'both' (ambos os lados) */
|
|
12
18
|
type Position = 'right' | 'left' | 'both';
|
|
19
|
+
/** Localidade do componente: 'pt-br' (Português do Brasil) ou 'en-us' (Inglês dos EUA) */
|
|
13
20
|
type Locale = 'pt-br' | 'en-us';
|
|
21
|
+
/** Props base compartilhadas por todos os componentes do design system */
|
|
14
22
|
interface BaseProps {
|
|
23
|
+
/** Identificador único do elemento HTML */
|
|
15
24
|
id?: string;
|
|
25
|
+
/** Classes CSS adicionais a serem aplicadas ao componente */
|
|
16
26
|
className?: string;
|
|
27
|
+
/** Quando `true`, desabilita interações com o componente */
|
|
17
28
|
disabled?: boolean;
|
|
18
29
|
}
|
|
19
30
|
|
|
@@ -28,7 +39,7 @@ interface BaseProps {
|
|
|
28
39
|
* <Avatar src="https://example.com/avatar.jpg" icon={<UserIcon />} size="sm" />
|
|
29
40
|
* ```
|
|
30
41
|
*/
|
|
31
|
-
interface AvatarProps extends BaseProps {
|
|
42
|
+
interface AvatarProps extends Omit<BaseProps, 'disabled'> {
|
|
32
43
|
/** Ícone ou conteúdo a ser exibido no fallback quando não há imagem ou ela falha ao carregar */
|
|
33
44
|
icon?: React$1.ReactNode;
|
|
34
45
|
/** Tamanho do avatar: 'sm' (32px) ou 'lg' (44px). @default 'lg' */
|
|
@@ -210,7 +221,7 @@ interface CalendarBaseProps extends Omit<BaseProps, 'disabled'> {
|
|
|
210
221
|
*/
|
|
211
222
|
format?: DateFormat;
|
|
212
223
|
/**
|
|
213
|
-
*
|
|
224
|
+
* Idioma da interface — aceita os códigos internos do design system.
|
|
214
225
|
* @default 'pt-br'
|
|
215
226
|
*/
|
|
216
227
|
locale?: Locale;
|
|
@@ -373,7 +384,7 @@ declare function Container({ children }: ContainerProps): react_jsx_runtime.JSX.
|
|
|
373
384
|
* ```
|
|
374
385
|
*/
|
|
375
386
|
interface DatePickerProps extends BaseProps {
|
|
376
|
-
/**
|
|
387
|
+
/** Idioma para formatação da data */
|
|
377
388
|
locale?: Locale;
|
|
378
389
|
/** Posição do calendário em relação ao campo */
|
|
379
390
|
calendarSide?: Side;
|
|
@@ -414,10 +425,11 @@ declare const _default$2: React__default.NamedExoticComponent<DatePickerProps>;
|
|
|
414
425
|
* />
|
|
415
426
|
*/
|
|
416
427
|
interface DialogProps extends BaseProps, React.HTMLAttributes<HTMLDivElement> {
|
|
428
|
+
/** Controla a visibilidade do Dialog */
|
|
417
429
|
show?: boolean;
|
|
418
|
-
/** Título exibido no cabeçalho do
|
|
430
|
+
/** Título exibido no cabeçalho do Dialog */
|
|
419
431
|
title?: string;
|
|
420
|
-
/** Texto ou conteúdo do corpo do
|
|
432
|
+
/** Texto ou conteúdo do corpo do Dialog */
|
|
421
433
|
bodyContent?: ReactNode;
|
|
422
434
|
/** Texto do botão de ação primária */
|
|
423
435
|
textPrimaryAction?: string;
|
|
@@ -554,7 +566,7 @@ interface FilterProps extends BaseProps {
|
|
|
554
566
|
minDate?: Date;
|
|
555
567
|
/** Data máxima selecionável (para tipo calendar) */
|
|
556
568
|
maxDate?: Date;
|
|
557
|
-
/**
|
|
569
|
+
/** Idioma do calendário */
|
|
558
570
|
locale?: Locale;
|
|
559
571
|
}
|
|
560
572
|
|
|
@@ -1451,9 +1463,13 @@ declare const useToast: () => {
|
|
|
1451
1463
|
};
|
|
1452
1464
|
|
|
1453
1465
|
interface TooltipProps extends BaseProps {
|
|
1466
|
+
/** Conteúdo textual exibido dentro do tooltip */
|
|
1454
1467
|
text: React__default.ReactNode;
|
|
1468
|
+
/** Lado em que o tooltip aparece em relação ao elemento filho. @default 'top' */
|
|
1455
1469
|
side?: Side;
|
|
1470
|
+
/** Alinhamento do tooltip em relação ao elemento filho. @default 'center' */
|
|
1456
1471
|
align?: Align;
|
|
1472
|
+
/** Deslocamento em pixels no eixo lateral (side) entre o tooltip e o elemento filho */
|
|
1457
1473
|
sideOffset?: number;
|
|
1458
1474
|
/** Deslocamento em pixels no eixo de alinhamento */
|
|
1459
1475
|
alignOffset?: number;
|
package/dist/index.esm.js
CHANGED
|
@@ -3484,7 +3484,7 @@ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onS
|
|
|
3484
3484
|
hasReachedEndRef.current = false;
|
|
3485
3485
|
}
|
|
3486
3486
|
};
|
|
3487
|
-
return (jsxs(DropdownMenu.Root, { open: open, onOpenChange: handleOpenChange, children: [jsx(DropdownMenu.Trigger, { asChild: true, children: children }), jsx(DropdownMenu.Portal, { children: jsxs(DropdownMenu.Content, { className: clsx(styles$8.content, className), sideOffset: 8, align: align, onInteractOutside: () => { closedByPointerRef.current = true; }, onCloseAutoFocus: (e) => {
|
|
3487
|
+
return (jsxs(DropdownMenu.Root, { open: open, onOpenChange: handleOpenChange, children: [jsx(DropdownMenu.Trigger, { asChild: true, children: children }), jsx(DropdownMenu.Portal, { children: jsxs(DropdownMenu.Content, { className: clsx(styles$8.content, className), sideOffset: 8, align: align, onPointerDown: () => { closedByPointerRef.current = true; }, onInteractOutside: () => { closedByPointerRef.current = true; }, onCloseAutoFocus: (e) => {
|
|
3488
3488
|
if (closedByPointerRef.current) {
|
|
3489
3489
|
e.preventDefault();
|
|
3490
3490
|
closedByPointerRef.current = false;
|