@vector-business-services/cristal-ds-web 0.4.0 → 0.6.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.cts CHANGED
@@ -1,8 +1,11 @@
1
1
  import * as react from 'react';
2
- import { InputHTMLAttributes, ReactNode, HTMLAttributes, ButtonHTMLAttributes, SyntheticEvent, MouseEvent, RefObject } from 'react';
2
+ import { InputHTMLAttributes, ReactNode, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, SyntheticEvent, MouseEvent, RefObject } from 'react';
3
3
  import { AutoCompleteProps as AutoCompleteProps$1 } from 'primereact/autocomplete';
4
+ import { CheckboxChangeEvent } from 'primereact/checkbox';
4
5
  import { ChipRemoveEvent } from 'primereact/chip';
5
6
  import { MenuItemCommandEvent } from 'primereact/menuitem';
7
+ import { RadioButtonChangeEvent } from 'primereact/radiobutton';
8
+ import { InputSwitchChangeEvent } from 'primereact/inputswitch';
6
9
 
7
10
  /** Type no Figma: Outline (com borda) e Filled (com fundo). */
8
11
  type InputVariant = 'outline' | 'filled';
@@ -77,6 +80,34 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
77
80
  }
78
81
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
79
82
 
83
+ /** Label Position no Figma: lado da caixa em relação ao rótulo. */
84
+ type CheckboxPosition = 'left' | 'right';
85
+ /** Label Type no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
86
+ type CheckboxLabelSize = 'default' | 'full';
87
+ interface CheckboxProps {
88
+ /** Texto ao lado da caixa (Label no Figma). Sem rótulo visível, vira o nome acessível. */
89
+ label: ReactNode;
90
+ /** Mostra o rótulo. Padrão: true. */
91
+ showLabel?: boolean;
92
+ /** Lado da caixa. Padrão: left. */
93
+ position?: CheckboxPosition;
94
+ /** Padrão: default. */
95
+ labelSize?: CheckboxLabelSize;
96
+ checked?: boolean;
97
+ /** Type=Indeterminate no Figma: traço no lugar do check; o leitor de tela anuncia "misto". */
98
+ indeterminate?: boolean;
99
+ onChange?: (event: CheckboxChangeEvent) => void;
100
+ disabled?: boolean;
101
+ required?: boolean;
102
+ name?: string;
103
+ value?: unknown;
104
+ /** Vai no <input>. */
105
+ id?: string;
106
+ className?: string;
107
+ style?: CSSProperties;
108
+ }
109
+ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
110
+
80
111
  /** Type no Figma. */
81
112
  type ChipVariant = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'highlight' | 'inverse' | 'outline' | 'neutral' | 'on-image';
82
113
  /** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
@@ -111,6 +142,42 @@ interface DividerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>
111
142
  }
112
143
  declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
113
144
 
145
+ /** Side no Figma: de que lado da tela a gaveta abre. */
146
+ type DrawerSide = 'right' | 'left';
147
+ /**
148
+ * Behavior no Figma: Full Body (tudo rola junto) ou Fixed Body (cabeçalho e rodapé fixos, só o
149
+ * corpo rola).
150
+ */
151
+ type DrawerBehavior = 'full' | 'fixed';
152
+ interface DrawerProps {
153
+ visible: boolean;
154
+ /** Pedido para fechar (X, Esc ou clique no overlay). */
155
+ onHide: () => void;
156
+ /** Título do cabeçalho; também é o nome acessível da gaveta. */
157
+ title: string;
158
+ /** Subtítulo descritivo, até 2 linhas. */
159
+ subtitle?: ReactNode;
160
+ /** Padrão: right. */
161
+ side?: DrawerSide;
162
+ /** Padrão: full. */
163
+ behavior?: DrawerBehavior;
164
+ /**
165
+ * Com overlay (padrão): a gaveta é modal, a página atrás fica bloqueada e o clique no overlay
166
+ * fecha. Sem overlay (`false`): a página continua rolando e clicável, e só o X e o Esc fecham.
167
+ */
168
+ modal?: boolean;
169
+ /** Mostra o botão de voltar antes do título. */
170
+ onBack?: () => void;
171
+ backLabel?: string;
172
+ closeLabel?: string;
173
+ /** Botões do rodapé, alinhados à direita. */
174
+ footer?: ReactNode;
175
+ children?: ReactNode;
176
+ id?: string;
177
+ className?: string;
178
+ }
179
+ declare function Drawer({ visible, onHide, title, subtitle, side, behavior, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
180
+
114
181
  /**
115
182
  * Hierarchy no Figma: Primary (Filled), Secondary (Tonal), Tertiary (Outlined) e Other (Icon),
116
183
  * que aqui é `ghost`: só o ícone, com fundo no hover.
@@ -227,6 +294,33 @@ interface MenubarProps {
227
294
  }
228
295
  declare const Menubar: react.ForwardRefExoticComponent<MenubarProps & react.RefAttributes<HTMLDivElement>>;
229
296
 
297
+ /**
298
+ * Size no Figma: Small (520px), Medium (768px) e Large (1200 x 720px; abaixo de 768px de tela
299
+ * vira tela cheia, como o Responsive=360 do Figma).
300
+ */
301
+ type ModalSize = 'small' | 'medium' | 'large';
302
+ interface ModalProps {
303
+ visible: boolean;
304
+ /** Pedido para fechar (X ou Esc). */
305
+ onHide: () => void;
306
+ /** Título do cabeçalho; também é o nome acessível do modal. */
307
+ title: string;
308
+ /** Padrão: large. */
309
+ size?: ModalSize;
310
+ /** Mostra o botão de ajuda (QuestionMark) ao lado do X, no small e no medium. */
311
+ onHelp?: () => void;
312
+ helpLabel?: string;
313
+ closeLabel?: string;
314
+ /** Botões do rodapé, à direita. */
315
+ footer?: ReactNode;
316
+ /** Conteúdo do rodapé à esquerda (ex.: o botão secundário dos Two/Tree Buttons do Figma). */
317
+ footerStart?: ReactNode;
318
+ children?: ReactNode;
319
+ id?: string;
320
+ className?: string;
321
+ }
322
+ declare function Modal({ visible, onHide, title, size, onHelp, helpLabel, closeLabel, footer, footerStart, children, id, className, }: ModalProps): react.JSX.Element;
323
+
230
324
  /** Type no Figma: Outline (com borda) e Filled (com fundo). */
231
325
  type MultiSelectVariant = 'outline' | 'filled';
232
326
  /** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
@@ -279,6 +373,156 @@ interface MultiSelectProps {
279
373
  }
280
374
  declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLInputElement>>;
281
375
 
376
+ type PanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'onToggle'>;
377
+ declare const Panel: react.ForwardRefExoticComponent<PanelProps & react.RefAttributes<HTMLDivElement>>;
378
+
379
+ /** Label Size no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
380
+ type RadioLabelSize = 'default' | 'full';
381
+ interface RadioProps {
382
+ /** Texto ao lado do controle (Label no Figma). Sem rótulo visível, vira o nome acessível. */
383
+ label: ReactNode;
384
+ /** Mostra o rótulo. Padrão: true. */
385
+ showLabel?: boolean;
386
+ /** Padrão: default. */
387
+ labelSize?: RadioLabelSize;
388
+ checked?: boolean;
389
+ /** Valor da opção, devolvido no `onChange`. */
390
+ value?: unknown;
391
+ /** Nome do grupo: radios com o mesmo `name` se excluem e navegam pelas setas. */
392
+ name?: string;
393
+ onChange?: (event: RadioButtonChangeEvent) => void;
394
+ disabled?: boolean;
395
+ required?: boolean;
396
+ /** Vai no <input>. */
397
+ id?: string;
398
+ className?: string;
399
+ style?: CSSProperties;
400
+ }
401
+ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
402
+
403
+ interface ScrollPanelProps {
404
+ children?: ReactNode;
405
+ /** O que a área mostra, para o leitor de tela (ex.: "Histórico da carga"). */
406
+ 'aria-label'?: string;
407
+ 'aria-labelledby'?: string;
408
+ /** Dê uma altura (ou max-height) para a área rolar. */
409
+ style?: CSSProperties;
410
+ id?: string;
411
+ className?: string;
412
+ }
413
+ declare const ScrollPanel: react.ForwardRefExoticComponent<ScrollPanelProps & react.RefAttributes<HTMLDivElement>>;
414
+
415
+ /**
416
+ * No Figma: Primary é o Header Segment Control (pílula em fill/brand/subtlest) e Secondary é o
417
+ * Segment Control (cinza, com ícones).
418
+ */
419
+ type SegmentControlVariant = 'primary' | 'secondary';
420
+ interface SegmentControlOption {
421
+ label: string;
422
+ value: string | number;
423
+ /** Ícone de 16px antes do texto (o Secondary do Figma usa). */
424
+ icon?: ReactNode;
425
+ disabled?: boolean;
426
+ }
427
+ interface SegmentControlProps {
428
+ options: SegmentControlOption[];
429
+ /** Valor do segmento ativo (controlado). */
430
+ value?: string | number;
431
+ onChange?: (value: string | number) => void;
432
+ variant?: SegmentControlVariant;
433
+ /** O que o grupo controla, para o leitor de tela (ex.: "Visualização"). */
434
+ 'aria-label'?: string;
435
+ 'aria-labelledby'?: string;
436
+ disabled?: boolean;
437
+ id?: string;
438
+ className?: string;
439
+ }
440
+ declare const SegmentControl: react.ForwardRefExoticComponent<SegmentControlProps & react.RefAttributes<HTMLDivElement>>;
441
+
442
+ /** Type no Figma: Outline (com borda) e Filled (com fundo). */
443
+ type SelectVariant = 'outline' | 'filled';
444
+ /** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
445
+ type SelectSize = 'xsmall' | 'small' | 'medium' | 'large';
446
+ interface SelectProps {
447
+ variant?: SelectVariant;
448
+ size?: SelectSize;
449
+ /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
450
+ label?: string;
451
+ 'aria-label'?: string;
452
+ /** Opções da lista. */
453
+ options: unknown[];
454
+ /** Campo da opção usado como texto (padrão: `label`). */
455
+ optionLabel?: string;
456
+ /** Campo da opção usado como valor; sem ele, o valor é a própria opção. */
457
+ optionValue?: string;
458
+ /** Valor selecionado (controlado). */
459
+ value?: unknown;
460
+ onChange?: (value: unknown) => void;
461
+ /** Texto do campo vazio (Field Text no Figma). */
462
+ placeholder?: string;
463
+ /** Dica abaixo do campo (Hint Info no Figma). */
464
+ hint?: string;
465
+ /** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
466
+ error?: string;
467
+ required?: boolean;
468
+ disabled?: boolean;
469
+ /** Vai no campo (combobox). */
470
+ id?: string;
471
+ name?: string;
472
+ className?: string;
473
+ }
474
+ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLInputElement>>;
475
+
476
+ /** Size no Figma: Medium (48x28) e Small (32x20). */
477
+ type SwitchSize = 'medium' | 'small';
478
+ /** Label Position no Figma: lado do rótulo em relação ao switch. */
479
+ type SwitchLabelPosition = 'right' | 'left';
480
+ interface SwitchProps {
481
+ /** Texto ao lado do switch (Label no Figma). Sem rótulo visível, vira o nome acessível. */
482
+ label: ReactNode;
483
+ /** Mostra o rótulo. Padrão: true. */
484
+ showLabel?: boolean;
485
+ /** Padrão: right. */
486
+ labelPosition?: SwitchLabelPosition;
487
+ /** Padrão: medium. */
488
+ size?: SwitchSize;
489
+ checked?: boolean;
490
+ onChange?: (event: InputSwitchChangeEvent) => void;
491
+ disabled?: boolean;
492
+ name?: string;
493
+ /** Vai no <input>. */
494
+ id?: string;
495
+ className?: string;
496
+ style?: CSSProperties;
497
+ }
498
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
499
+
500
+ /** Uma aba (.Tab Item no Figma) e o conteúdo dela. */
501
+ interface TabPanelProps {
502
+ /** Texto da aba (Label no Figma). */
503
+ header: string;
504
+ /** Ícone antes do texto (Leading Icon no Figma). */
505
+ leftIcon?: ReactNode;
506
+ /** Contador depois do texto (Badge no Figma). */
507
+ badge?: ReactNode;
508
+ /** Mostra o X (Tab Btn no Figma) e é chamado ao fechar a aba (clique no X ou Delete na aba). */
509
+ onClose?: () => void;
510
+ disabled?: boolean;
511
+ children?: ReactNode;
512
+ }
513
+ /** Só descreve a aba: quem desenha é o Tabs. */
514
+ declare function TabPanel(_props: TabPanelProps): null;
515
+ interface TabsProps {
516
+ /** Aba ativa (controlado). Sem ela, o Tabs controla sozinho. */
517
+ activeIndex?: number;
518
+ onTabChange?: (index: number) => void;
519
+ /** As abas, como `<TabPanel>`. */
520
+ children: ReactNode;
521
+ id?: string;
522
+ className?: string;
523
+ }
524
+ declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
525
+
282
526
  /** Type no Figma. */
283
527
  type TagVariant = 'default' | 'success' | 'warning' | 'danger' | 'info' | 'purple' | 'gray' | 'inverse' | 'outline';
284
528
  /** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
@@ -314,5 +558,5 @@ interface TooltipProps {
314
558
  }
315
559
  declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
316
560
 
317
- export { AutoComplete, Badge, Button, Card, Chip, Divider, IconButton, Input, Menu, Menubar, MultiSelect, Tag, Tooltip };
318
- export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuProps, MenubarProps, MenubarTool, MenubarUser, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
561
+ export { AutoComplete, Badge, Button, Card, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, Menubar, Modal, MultiSelect, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Tooltip };
562
+ export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  import * as react from 'react';
2
- import { InputHTMLAttributes, ReactNode, HTMLAttributes, ButtonHTMLAttributes, SyntheticEvent, MouseEvent, RefObject } from 'react';
2
+ import { InputHTMLAttributes, ReactNode, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, SyntheticEvent, MouseEvent, RefObject } from 'react';
3
3
  import { AutoCompleteProps as AutoCompleteProps$1 } from 'primereact/autocomplete';
4
+ import { CheckboxChangeEvent } from 'primereact/checkbox';
4
5
  import { ChipRemoveEvent } from 'primereact/chip';
5
6
  import { MenuItemCommandEvent } from 'primereact/menuitem';
7
+ import { RadioButtonChangeEvent } from 'primereact/radiobutton';
8
+ import { InputSwitchChangeEvent } from 'primereact/inputswitch';
6
9
 
7
10
  /** Type no Figma: Outline (com borda) e Filled (com fundo). */
8
11
  type InputVariant = 'outline' | 'filled';
@@ -77,6 +80,34 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
77
80
  }
78
81
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
79
82
 
83
+ /** Label Position no Figma: lado da caixa em relação ao rótulo. */
84
+ type CheckboxPosition = 'left' | 'right';
85
+ /** Label Type no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
86
+ type CheckboxLabelSize = 'default' | 'full';
87
+ interface CheckboxProps {
88
+ /** Texto ao lado da caixa (Label no Figma). Sem rótulo visível, vira o nome acessível. */
89
+ label: ReactNode;
90
+ /** Mostra o rótulo. Padrão: true. */
91
+ showLabel?: boolean;
92
+ /** Lado da caixa. Padrão: left. */
93
+ position?: CheckboxPosition;
94
+ /** Padrão: default. */
95
+ labelSize?: CheckboxLabelSize;
96
+ checked?: boolean;
97
+ /** Type=Indeterminate no Figma: traço no lugar do check; o leitor de tela anuncia "misto". */
98
+ indeterminate?: boolean;
99
+ onChange?: (event: CheckboxChangeEvent) => void;
100
+ disabled?: boolean;
101
+ required?: boolean;
102
+ name?: string;
103
+ value?: unknown;
104
+ /** Vai no <input>. */
105
+ id?: string;
106
+ className?: string;
107
+ style?: CSSProperties;
108
+ }
109
+ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
110
+
80
111
  /** Type no Figma. */
81
112
  type ChipVariant = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'highlight' | 'inverse' | 'outline' | 'neutral' | 'on-image';
82
113
  /** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
@@ -111,6 +142,42 @@ interface DividerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>
111
142
  }
112
143
  declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
113
144
 
145
+ /** Side no Figma: de que lado da tela a gaveta abre. */
146
+ type DrawerSide = 'right' | 'left';
147
+ /**
148
+ * Behavior no Figma: Full Body (tudo rola junto) ou Fixed Body (cabeçalho e rodapé fixos, só o
149
+ * corpo rola).
150
+ */
151
+ type DrawerBehavior = 'full' | 'fixed';
152
+ interface DrawerProps {
153
+ visible: boolean;
154
+ /** Pedido para fechar (X, Esc ou clique no overlay). */
155
+ onHide: () => void;
156
+ /** Título do cabeçalho; também é o nome acessível da gaveta. */
157
+ title: string;
158
+ /** Subtítulo descritivo, até 2 linhas. */
159
+ subtitle?: ReactNode;
160
+ /** Padrão: right. */
161
+ side?: DrawerSide;
162
+ /** Padrão: full. */
163
+ behavior?: DrawerBehavior;
164
+ /**
165
+ * Com overlay (padrão): a gaveta é modal, a página atrás fica bloqueada e o clique no overlay
166
+ * fecha. Sem overlay (`false`): a página continua rolando e clicável, e só o X e o Esc fecham.
167
+ */
168
+ modal?: boolean;
169
+ /** Mostra o botão de voltar antes do título. */
170
+ onBack?: () => void;
171
+ backLabel?: string;
172
+ closeLabel?: string;
173
+ /** Botões do rodapé, alinhados à direita. */
174
+ footer?: ReactNode;
175
+ children?: ReactNode;
176
+ id?: string;
177
+ className?: string;
178
+ }
179
+ declare function Drawer({ visible, onHide, title, subtitle, side, behavior, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
180
+
114
181
  /**
115
182
  * Hierarchy no Figma: Primary (Filled), Secondary (Tonal), Tertiary (Outlined) e Other (Icon),
116
183
  * que aqui é `ghost`: só o ícone, com fundo no hover.
@@ -227,6 +294,33 @@ interface MenubarProps {
227
294
  }
228
295
  declare const Menubar: react.ForwardRefExoticComponent<MenubarProps & react.RefAttributes<HTMLDivElement>>;
229
296
 
297
+ /**
298
+ * Size no Figma: Small (520px), Medium (768px) e Large (1200 x 720px; abaixo de 768px de tela
299
+ * vira tela cheia, como o Responsive=360 do Figma).
300
+ */
301
+ type ModalSize = 'small' | 'medium' | 'large';
302
+ interface ModalProps {
303
+ visible: boolean;
304
+ /** Pedido para fechar (X ou Esc). */
305
+ onHide: () => void;
306
+ /** Título do cabeçalho; também é o nome acessível do modal. */
307
+ title: string;
308
+ /** Padrão: large. */
309
+ size?: ModalSize;
310
+ /** Mostra o botão de ajuda (QuestionMark) ao lado do X, no small e no medium. */
311
+ onHelp?: () => void;
312
+ helpLabel?: string;
313
+ closeLabel?: string;
314
+ /** Botões do rodapé, à direita. */
315
+ footer?: ReactNode;
316
+ /** Conteúdo do rodapé à esquerda (ex.: o botão secundário dos Two/Tree Buttons do Figma). */
317
+ footerStart?: ReactNode;
318
+ children?: ReactNode;
319
+ id?: string;
320
+ className?: string;
321
+ }
322
+ declare function Modal({ visible, onHide, title, size, onHelp, helpLabel, closeLabel, footer, footerStart, children, id, className, }: ModalProps): react.JSX.Element;
323
+
230
324
  /** Type no Figma: Outline (com borda) e Filled (com fundo). */
231
325
  type MultiSelectVariant = 'outline' | 'filled';
232
326
  /** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
@@ -279,6 +373,156 @@ interface MultiSelectProps {
279
373
  }
280
374
  declare const MultiSelect: react.ForwardRefExoticComponent<MultiSelectProps & react.RefAttributes<HTMLInputElement>>;
281
375
 
376
+ type PanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'onToggle'>;
377
+ declare const Panel: react.ForwardRefExoticComponent<PanelProps & react.RefAttributes<HTMLDivElement>>;
378
+
379
+ /** Label Size no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
380
+ type RadioLabelSize = 'default' | 'full';
381
+ interface RadioProps {
382
+ /** Texto ao lado do controle (Label no Figma). Sem rótulo visível, vira o nome acessível. */
383
+ label: ReactNode;
384
+ /** Mostra o rótulo. Padrão: true. */
385
+ showLabel?: boolean;
386
+ /** Padrão: default. */
387
+ labelSize?: RadioLabelSize;
388
+ checked?: boolean;
389
+ /** Valor da opção, devolvido no `onChange`. */
390
+ value?: unknown;
391
+ /** Nome do grupo: radios com o mesmo `name` se excluem e navegam pelas setas. */
392
+ name?: string;
393
+ onChange?: (event: RadioButtonChangeEvent) => void;
394
+ disabled?: boolean;
395
+ required?: boolean;
396
+ /** Vai no <input>. */
397
+ id?: string;
398
+ className?: string;
399
+ style?: CSSProperties;
400
+ }
401
+ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
402
+
403
+ interface ScrollPanelProps {
404
+ children?: ReactNode;
405
+ /** O que a área mostra, para o leitor de tela (ex.: "Histórico da carga"). */
406
+ 'aria-label'?: string;
407
+ 'aria-labelledby'?: string;
408
+ /** Dê uma altura (ou max-height) para a área rolar. */
409
+ style?: CSSProperties;
410
+ id?: string;
411
+ className?: string;
412
+ }
413
+ declare const ScrollPanel: react.ForwardRefExoticComponent<ScrollPanelProps & react.RefAttributes<HTMLDivElement>>;
414
+
415
+ /**
416
+ * No Figma: Primary é o Header Segment Control (pílula em fill/brand/subtlest) e Secondary é o
417
+ * Segment Control (cinza, com ícones).
418
+ */
419
+ type SegmentControlVariant = 'primary' | 'secondary';
420
+ interface SegmentControlOption {
421
+ label: string;
422
+ value: string | number;
423
+ /** Ícone de 16px antes do texto (o Secondary do Figma usa). */
424
+ icon?: ReactNode;
425
+ disabled?: boolean;
426
+ }
427
+ interface SegmentControlProps {
428
+ options: SegmentControlOption[];
429
+ /** Valor do segmento ativo (controlado). */
430
+ value?: string | number;
431
+ onChange?: (value: string | number) => void;
432
+ variant?: SegmentControlVariant;
433
+ /** O que o grupo controla, para o leitor de tela (ex.: "Visualização"). */
434
+ 'aria-label'?: string;
435
+ 'aria-labelledby'?: string;
436
+ disabled?: boolean;
437
+ id?: string;
438
+ className?: string;
439
+ }
440
+ declare const SegmentControl: react.ForwardRefExoticComponent<SegmentControlProps & react.RefAttributes<HTMLDivElement>>;
441
+
442
+ /** Type no Figma: Outline (com borda) e Filled (com fundo). */
443
+ type SelectVariant = 'outline' | 'filled';
444
+ /** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
445
+ type SelectSize = 'xsmall' | 'small' | 'medium' | 'large';
446
+ interface SelectProps {
447
+ variant?: SelectVariant;
448
+ size?: SelectSize;
449
+ /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
450
+ label?: string;
451
+ 'aria-label'?: string;
452
+ /** Opções da lista. */
453
+ options: unknown[];
454
+ /** Campo da opção usado como texto (padrão: `label`). */
455
+ optionLabel?: string;
456
+ /** Campo da opção usado como valor; sem ele, o valor é a própria opção. */
457
+ optionValue?: string;
458
+ /** Valor selecionado (controlado). */
459
+ value?: unknown;
460
+ onChange?: (value: unknown) => void;
461
+ /** Texto do campo vazio (Field Text no Figma). */
462
+ placeholder?: string;
463
+ /** Dica abaixo do campo (Hint Info no Figma). */
464
+ hint?: string;
465
+ /** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
466
+ error?: string;
467
+ required?: boolean;
468
+ disabled?: boolean;
469
+ /** Vai no campo (combobox). */
470
+ id?: string;
471
+ name?: string;
472
+ className?: string;
473
+ }
474
+ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLInputElement>>;
475
+
476
+ /** Size no Figma: Medium (48x28) e Small (32x20). */
477
+ type SwitchSize = 'medium' | 'small';
478
+ /** Label Position no Figma: lado do rótulo em relação ao switch. */
479
+ type SwitchLabelPosition = 'right' | 'left';
480
+ interface SwitchProps {
481
+ /** Texto ao lado do switch (Label no Figma). Sem rótulo visível, vira o nome acessível. */
482
+ label: ReactNode;
483
+ /** Mostra o rótulo. Padrão: true. */
484
+ showLabel?: boolean;
485
+ /** Padrão: right. */
486
+ labelPosition?: SwitchLabelPosition;
487
+ /** Padrão: medium. */
488
+ size?: SwitchSize;
489
+ checked?: boolean;
490
+ onChange?: (event: InputSwitchChangeEvent) => void;
491
+ disabled?: boolean;
492
+ name?: string;
493
+ /** Vai no <input>. */
494
+ id?: string;
495
+ className?: string;
496
+ style?: CSSProperties;
497
+ }
498
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
499
+
500
+ /** Uma aba (.Tab Item no Figma) e o conteúdo dela. */
501
+ interface TabPanelProps {
502
+ /** Texto da aba (Label no Figma). */
503
+ header: string;
504
+ /** Ícone antes do texto (Leading Icon no Figma). */
505
+ leftIcon?: ReactNode;
506
+ /** Contador depois do texto (Badge no Figma). */
507
+ badge?: ReactNode;
508
+ /** Mostra o X (Tab Btn no Figma) e é chamado ao fechar a aba (clique no X ou Delete na aba). */
509
+ onClose?: () => void;
510
+ disabled?: boolean;
511
+ children?: ReactNode;
512
+ }
513
+ /** Só descreve a aba: quem desenha é o Tabs. */
514
+ declare function TabPanel(_props: TabPanelProps): null;
515
+ interface TabsProps {
516
+ /** Aba ativa (controlado). Sem ela, o Tabs controla sozinho. */
517
+ activeIndex?: number;
518
+ onTabChange?: (index: number) => void;
519
+ /** As abas, como `<TabPanel>`. */
520
+ children: ReactNode;
521
+ id?: string;
522
+ className?: string;
523
+ }
524
+ declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
525
+
282
526
  /** Type no Figma. */
283
527
  type TagVariant = 'default' | 'success' | 'warning' | 'danger' | 'info' | 'purple' | 'gray' | 'inverse' | 'outline';
284
528
  /** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
@@ -314,5 +558,5 @@ interface TooltipProps {
314
558
  }
315
559
  declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
316
560
 
317
- export { AutoComplete, Badge, Button, Card, Chip, Divider, IconButton, Input, Menu, Menubar, MultiSelect, Tag, Tooltip };
318
- export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuProps, MenubarProps, MenubarTool, MenubarUser, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
561
+ export { AutoComplete, Badge, Button, Card, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, Menubar, Modal, MultiSelect, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Tooltip };
562
+ export type { AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };