@vector-business-services/cristal-ds-web 0.14.0 → 0.16.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,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ReactNode, InputHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, RefObject, SyntheticEvent, MouseEvent } from 'react';
2
+ import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes, CSSProperties, RefObject, SyntheticEvent, MouseEvent } from 'react';
3
3
  import { AutoCompleteProps as AutoCompleteProps$1 } from 'primereact/autocomplete';
4
4
  import { CheckboxChangeEvent } from 'primereact/checkbox';
5
5
  import { ChipRemoveEvent } from 'primereact/chip';
@@ -22,7 +22,7 @@ interface AccordionTabProps {
22
22
  }
23
23
  /** Só descreve o item: quem desenha é o Accordion. */
24
24
  declare function AccordionTab(_props: AccordionTabProps): null;
25
- interface AccordionProps {
25
+ interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
26
26
  /** Mais de um item aberto ao mesmo tempo. */
27
27
  multiple?: boolean;
28
28
  /**
@@ -139,7 +139,7 @@ interface ChartAxis {
139
139
  /** Distância entre as marcas (ex.: 50). */
140
140
  stepSize?: number;
141
141
  }
142
- interface ChartProps {
142
+ interface ChartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'> {
143
143
  /** Linhas com área (Chart / Line) ou barras (Chart / Bar). Padrão: line. */
144
144
  type?: 'line' | 'bar';
145
145
  /** Barras empilhadas: as séries somam numa barra só por rótulo. */
@@ -164,13 +164,14 @@ interface ChartProps {
164
164
  id?: string;
165
165
  className?: string;
166
166
  }
167
- declare function Chart({ type, stacked, labels, series, yAxis, y2Axis, title, help, helpLabel, actions, height, id, className, }: ChartProps): react.JSX.Element;
167
+ declare const Chart: react.ForwardRefExoticComponent<ChartProps & react.RefAttributes<HTMLDivElement>>;
168
168
 
169
169
  /** Label Position no Figma: lado da caixa em relação ao rótulo. */
170
170
  type CheckboxPosition = 'left' | 'right';
171
171
  /** Label Type no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
172
172
  type CheckboxLabelSize = 'default' | 'full';
173
- interface CheckboxProps {
173
+ /** As demais props vão no <input> (aria-describedby, onBlur, data-*...); className e style, na raiz. */
174
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'checked' | 'defaultChecked' | 'defaultValue' | 'size' | 'type' | 'children'> {
174
175
  /** Texto ao lado da caixa (Label no Figma). Sem rótulo visível, vira o nome acessível. */
175
176
  label: ReactNode;
176
177
  /** Mostra o rótulo. Padrão: true. */
@@ -240,7 +241,12 @@ type DrawerBehavior = 'full' | 'fixed';
240
241
  * tela toda) são do Cristal, nas faixas usuais de drawer.
241
242
  */
242
243
  type DrawerSize = 'small' | 'medium' | 'large' | 'full';
243
- interface DrawerProps {
244
+ /** Controle do Drawer pela ref: o elemento só existe com a gaveta aberta. */
245
+ interface DrawerHandle {
246
+ /** A raiz da gaveta, o role=dialog (null fechada). */
247
+ getElement: () => HTMLDivElement | null;
248
+ }
249
+ interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children' | 'content'> {
244
250
  visible: boolean;
245
251
  /** Pedido para fechar (X, Esc ou clique no overlay). */
246
252
  onHide: () => void;
@@ -269,7 +275,7 @@ interface DrawerProps {
269
275
  id?: string;
270
276
  className?: string;
271
277
  }
272
- declare function Drawer({ visible, onHide, title, subtitle, side, behavior, size, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
278
+ declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAttributes<DrawerHandle>>;
273
279
 
274
280
  /** Type no Figma: Plain (rótulo curto, uma linha) e Rich (texto de até 300px, quebra linha). */
275
281
  type TooltipType = 'plain' | 'rich';
@@ -339,7 +345,7 @@ interface MenuItem {
339
345
  id?: string;
340
346
  className?: string;
341
347
  }
342
- interface MenuProps {
348
+ interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
343
349
  model: MenuItem[];
344
350
  density?: MenuDensity;
345
351
  /** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
@@ -391,7 +397,7 @@ interface MenubarUser {
391
397
  /** URL da foto. Sem foto, o avatar mostra a inicial do nome (Type=No Image). */
392
398
  avatar?: string;
393
399
  }
394
- interface MenubarProps {
400
+ interface MenubarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
395
401
  /** Logo à esquerda (.Nav Logo no Figma); o padrão é o logo da Vector. */
396
402
  logo?: ReactNode;
397
403
  /** Menu principal aberto: deixa o botão de menu no estado Active. */
@@ -448,7 +454,7 @@ interface MenuPrincipalGroup {
448
454
  id?: string;
449
455
  }
450
456
  type MenuPrincipalEntry = MenuPrincipalItem | MenuPrincipalGroup;
451
- interface MenuPrincipalProps {
457
+ interface MenuPrincipalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
452
458
  /** Itens soltos e grupos, na ordem; o divisor tracejado entra antes e depois de cada grupo. */
453
459
  model: MenuPrincipalEntry[];
454
460
  /** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
@@ -472,7 +478,7 @@ declare const MenuPrincipal: react.ForwardRefExoticComponent<MenuPrincipalProps
472
478
 
473
479
  /** Type no Figma. */
474
480
  type MessageType = 'info' | 'warning' | 'success' | 'danger' | 'highlight' | 'neutral';
475
- interface MessageProps {
481
+ interface MessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'content'> {
476
482
  /** Padrão: info. */
477
483
  type?: MessageType;
478
484
  /** Texto (Message no Figma). */
@@ -489,10 +495,20 @@ declare const Message: react.ForwardRefExoticComponent<MessageProps & react.RefA
489
495
  * vira tela cheia, como o Responsive=360 do Figma).
490
496
  */
491
497
  type ModalSize = 'small' | 'medium' | 'large';
492
- interface ModalProps {
498
+ /** Controle do Modal pela ref: o elemento só existe com o modal aberto. */
499
+ interface ModalHandle {
500
+ /** O role=dialog do modal (null fechado). */
501
+ getElement: () => HTMLDivElement | null;
502
+ }
503
+ interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children' | 'content' | 'onClick'> {
493
504
  visible: boolean;
494
- /** Pedido para fechar (X ou Esc). */
505
+ /** Pedido para fechar (X, Esc ou clique fora, com dismissableMask). */
495
506
  onHide: () => void;
507
+ /**
508
+ * Fecha com o clique no overlay, fora do modal. Padrão: true, como o Drawer. Desligue quando
509
+ * fechar por engano faz perder algo (formulário preenchido, confirmação importante).
510
+ */
511
+ dismissableMask?: boolean;
496
512
  /** Título do cabeçalho; também é o nome acessível do modal. */
497
513
  title: string;
498
514
  /** Padrão: large. */
@@ -509,7 +525,7 @@ interface ModalProps {
509
525
  id?: string;
510
526
  className?: string;
511
527
  }
512
- declare function Modal({ visible, onHide, title, size, onHelp, helpLabel, closeLabel, footer, footerStart, children, id, className, }: ModalProps): react.JSX.Element;
528
+ declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<ModalHandle>>;
513
529
 
514
530
  /** Type no Figma: Outline (com borda) e Filled (com fundo). */
515
531
  type MultiSelectVariant = 'outline' | 'filled';
@@ -517,7 +533,11 @@ type MultiSelectVariant = 'outline' | 'filled';
517
533
  type MultiSelectSize = 'xsmall' | 'small' | 'medium' | 'large';
518
534
  /** Density da lista no Figma: itens de 40px (normal) ou 32px (compact). */
519
535
  type MultiSelectDensity = 'normal' | 'compact';
520
- interface MultiSelectProps {
536
+ /**
537
+ * As demais props vão para o MultiSelect do Prime: as aria-* no combobox (aria-describedby soma com
538
+ * a dica) e o resto na caixa do campo.
539
+ */
540
+ interface MultiSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'placeholder'> {
521
541
  variant?: MultiSelectVariant;
522
542
  size?: MultiSelectSize;
523
543
  density?: MultiSelectDensity;
@@ -620,7 +640,7 @@ interface PaginatorPageChangeEvent {
620
640
  page: number;
621
641
  pageCount: number;
622
642
  }
623
- interface PaginatorProps {
643
+ interface PaginatorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
624
644
  totalRecords: number;
625
645
  /** Índice do primeiro item da página (controlado). Sem ele, o Paginator controla sozinho. */
626
646
  first?: number;
@@ -643,7 +663,8 @@ declare const Panel: react.ForwardRefExoticComponent<PanelProps & react.RefAttri
643
663
 
644
664
  /** Label Size no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
645
665
  type RadioLabelSize = 'default' | 'full';
646
- interface RadioProps {
666
+ /** As demais props vão no <input> (aria-describedby, onBlur, data-*...); className e style, na raiz. */
667
+ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'checked' | 'defaultChecked' | 'defaultValue' | 'size' | 'type' | 'children'> {
647
668
  /** Texto ao lado do controle (Label no Figma). Sem rótulo visível, vira o nome acessível. */
648
669
  label: ReactNode;
649
670
  /** Mostra o rótulo. Padrão: true. */
@@ -665,7 +686,7 @@ interface RadioProps {
665
686
  }
666
687
  declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
667
688
 
668
- interface ScrollPanelProps {
689
+ interface ScrollPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
669
690
  children?: ReactNode;
670
691
  /** O que a área mostra, para o leitor de tela (ex.: "Histórico da carga"). */
671
692
  'aria-label'?: string;
@@ -689,7 +710,7 @@ interface SegmentControlOption {
689
710
  icon?: ReactNode;
690
711
  disabled?: boolean;
691
712
  }
692
- interface SegmentControlProps {
713
+ interface SegmentControlProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange' | 'defaultValue' | 'unselectable'> {
693
714
  options: SegmentControlOption[];
694
715
  /** Valor do segmento ativo (controlado). */
695
716
  value?: string | number;
@@ -708,7 +729,11 @@ declare const SegmentControl: react.ForwardRefExoticComponent<SegmentControlProp
708
729
  type SelectVariant = 'outline' | 'filled';
709
730
  /** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
710
731
  type SelectSize = 'xsmall' | 'small' | 'medium' | 'large';
711
- interface SelectProps {
732
+ /**
733
+ * As demais props vão para o Dropdown do Prime: as aria-* no combobox (aria-describedby soma com a
734
+ * dica) e o resto na caixa do campo.
735
+ */
736
+ interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'placeholder'> {
712
737
  variant?: SelectVariant;
713
738
  size?: SelectSize;
714
739
  /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
@@ -742,7 +767,8 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
742
767
  type SwitchSize = 'medium' | 'small';
743
768
  /** Label Position no Figma: lado do rótulo em relação ao switch. */
744
769
  type SwitchLabelPosition = 'right' | 'left';
745
- interface SwitchProps {
770
+ /** As demais props vão no <input> (aria-describedby, onBlur, data-*...); className e style, na raiz. */
771
+ interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'checked' | 'defaultChecked' | 'defaultValue' | 'size' | 'type' | 'children'> {
746
772
  /** Texto ao lado do switch (Label no Figma). Sem rótulo visível, vira o nome acessível. */
747
773
  label: ReactNode;
748
774
  /** Mostra o rótulo. Padrão: true. */
@@ -777,7 +803,7 @@ interface TabPanelProps {
777
803
  }
778
804
  /** Só descreve a aba: quem desenha é o Tabs. */
779
805
  declare function TabPanel(_props: TabPanelProps): null;
780
- interface TabsProps {
806
+ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
781
807
  /** Aba ativa (controlado). Sem ela, o Tabs controla sozinho. */
782
808
  activeIndex?: number;
783
809
  onTabChange?: (index: number) => void;
@@ -835,4 +861,4 @@ interface ToastProps {
835
861
  declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
836
862
 
837
863
  export { Accordion, AccordionTab, AutoComplete, Badge, Button, Card, Chart, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Message, Modal, MultiSelect, PageHeader, Paginator, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Toast, Tooltip };
838
- export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, MessageProps, MessageType, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PageHeaderProps, PageHeaderTab, PageHeaderVariant, PaginatorPageChangeEvent, PaginatorProps, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, ToastHandle, ToastMessage, ToastPosition, ToastProps, ToastType, TooltipPosition, TooltipProps, TooltipType };
864
+ export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerHandle, DrawerProps, DrawerSide, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, MessageProps, MessageType, ModalHandle, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PageHeaderProps, PageHeaderTab, PageHeaderVariant, PaginatorPageChangeEvent, PaginatorProps, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, ToastHandle, ToastMessage, ToastPosition, ToastProps, ToastType, TooltipPosition, TooltipProps, TooltipType };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ReactNode, InputHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, RefObject, SyntheticEvent, MouseEvent } from 'react';
2
+ import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes, CSSProperties, RefObject, SyntheticEvent, MouseEvent } from 'react';
3
3
  import { AutoCompleteProps as AutoCompleteProps$1 } from 'primereact/autocomplete';
4
4
  import { CheckboxChangeEvent } from 'primereact/checkbox';
5
5
  import { ChipRemoveEvent } from 'primereact/chip';
@@ -22,7 +22,7 @@ interface AccordionTabProps {
22
22
  }
23
23
  /** Só descreve o item: quem desenha é o Accordion. */
24
24
  declare function AccordionTab(_props: AccordionTabProps): null;
25
- interface AccordionProps {
25
+ interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
26
26
  /** Mais de um item aberto ao mesmo tempo. */
27
27
  multiple?: boolean;
28
28
  /**
@@ -139,7 +139,7 @@ interface ChartAxis {
139
139
  /** Distância entre as marcas (ex.: 50). */
140
140
  stepSize?: number;
141
141
  }
142
- interface ChartProps {
142
+ interface ChartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'> {
143
143
  /** Linhas com área (Chart / Line) ou barras (Chart / Bar). Padrão: line. */
144
144
  type?: 'line' | 'bar';
145
145
  /** Barras empilhadas: as séries somam numa barra só por rótulo. */
@@ -164,13 +164,14 @@ interface ChartProps {
164
164
  id?: string;
165
165
  className?: string;
166
166
  }
167
- declare function Chart({ type, stacked, labels, series, yAxis, y2Axis, title, help, helpLabel, actions, height, id, className, }: ChartProps): react.JSX.Element;
167
+ declare const Chart: react.ForwardRefExoticComponent<ChartProps & react.RefAttributes<HTMLDivElement>>;
168
168
 
169
169
  /** Label Position no Figma: lado da caixa em relação ao rótulo. */
170
170
  type CheckboxPosition = 'left' | 'right';
171
171
  /** Label Type no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
172
172
  type CheckboxLabelSize = 'default' | 'full';
173
- interface CheckboxProps {
173
+ /** As demais props vão no <input> (aria-describedby, onBlur, data-*...); className e style, na raiz. */
174
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'checked' | 'defaultChecked' | 'defaultValue' | 'size' | 'type' | 'children'> {
174
175
  /** Texto ao lado da caixa (Label no Figma). Sem rótulo visível, vira o nome acessível. */
175
176
  label: ReactNode;
176
177
  /** Mostra o rótulo. Padrão: true. */
@@ -240,7 +241,12 @@ type DrawerBehavior = 'full' | 'fixed';
240
241
  * tela toda) são do Cristal, nas faixas usuais de drawer.
241
242
  */
242
243
  type DrawerSize = 'small' | 'medium' | 'large' | 'full';
243
- interface DrawerProps {
244
+ /** Controle do Drawer pela ref: o elemento só existe com a gaveta aberta. */
245
+ interface DrawerHandle {
246
+ /** A raiz da gaveta, o role=dialog (null fechada). */
247
+ getElement: () => HTMLDivElement | null;
248
+ }
249
+ interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children' | 'content'> {
244
250
  visible: boolean;
245
251
  /** Pedido para fechar (X, Esc ou clique no overlay). */
246
252
  onHide: () => void;
@@ -269,7 +275,7 @@ interface DrawerProps {
269
275
  id?: string;
270
276
  className?: string;
271
277
  }
272
- declare function Drawer({ visible, onHide, title, subtitle, side, behavior, size, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
278
+ declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAttributes<DrawerHandle>>;
273
279
 
274
280
  /** Type no Figma: Plain (rótulo curto, uma linha) e Rich (texto de até 300px, quebra linha). */
275
281
  type TooltipType = 'plain' | 'rich';
@@ -339,7 +345,7 @@ interface MenuItem {
339
345
  id?: string;
340
346
  className?: string;
341
347
  }
342
- interface MenuProps {
348
+ interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
343
349
  model: MenuItem[];
344
350
  density?: MenuDensity;
345
351
  /** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
@@ -391,7 +397,7 @@ interface MenubarUser {
391
397
  /** URL da foto. Sem foto, o avatar mostra a inicial do nome (Type=No Image). */
392
398
  avatar?: string;
393
399
  }
394
- interface MenubarProps {
400
+ interface MenubarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
395
401
  /** Logo à esquerda (.Nav Logo no Figma); o padrão é o logo da Vector. */
396
402
  logo?: ReactNode;
397
403
  /** Menu principal aberto: deixa o botão de menu no estado Active. */
@@ -448,7 +454,7 @@ interface MenuPrincipalGroup {
448
454
  id?: string;
449
455
  }
450
456
  type MenuPrincipalEntry = MenuPrincipalItem | MenuPrincipalGroup;
451
- interface MenuPrincipalProps {
457
+ interface MenuPrincipalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
452
458
  /** Itens soltos e grupos, na ordem; o divisor tracejado entra antes e depois de cada grupo. */
453
459
  model: MenuPrincipalEntry[];
454
460
  /** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
@@ -472,7 +478,7 @@ declare const MenuPrincipal: react.ForwardRefExoticComponent<MenuPrincipalProps
472
478
 
473
479
  /** Type no Figma. */
474
480
  type MessageType = 'info' | 'warning' | 'success' | 'danger' | 'highlight' | 'neutral';
475
- interface MessageProps {
481
+ interface MessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'content'> {
476
482
  /** Padrão: info. */
477
483
  type?: MessageType;
478
484
  /** Texto (Message no Figma). */
@@ -489,10 +495,20 @@ declare const Message: react.ForwardRefExoticComponent<MessageProps & react.RefA
489
495
  * vira tela cheia, como o Responsive=360 do Figma).
490
496
  */
491
497
  type ModalSize = 'small' | 'medium' | 'large';
492
- interface ModalProps {
498
+ /** Controle do Modal pela ref: o elemento só existe com o modal aberto. */
499
+ interface ModalHandle {
500
+ /** O role=dialog do modal (null fechado). */
501
+ getElement: () => HTMLDivElement | null;
502
+ }
503
+ interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children' | 'content' | 'onClick'> {
493
504
  visible: boolean;
494
- /** Pedido para fechar (X ou Esc). */
505
+ /** Pedido para fechar (X, Esc ou clique fora, com dismissableMask). */
495
506
  onHide: () => void;
507
+ /**
508
+ * Fecha com o clique no overlay, fora do modal. Padrão: true, como o Drawer. Desligue quando
509
+ * fechar por engano faz perder algo (formulário preenchido, confirmação importante).
510
+ */
511
+ dismissableMask?: boolean;
496
512
  /** Título do cabeçalho; também é o nome acessível do modal. */
497
513
  title: string;
498
514
  /** Padrão: large. */
@@ -509,7 +525,7 @@ interface ModalProps {
509
525
  id?: string;
510
526
  className?: string;
511
527
  }
512
- declare function Modal({ visible, onHide, title, size, onHelp, helpLabel, closeLabel, footer, footerStart, children, id, className, }: ModalProps): react.JSX.Element;
528
+ declare const Modal: react.ForwardRefExoticComponent<ModalProps & react.RefAttributes<ModalHandle>>;
513
529
 
514
530
  /** Type no Figma: Outline (com borda) e Filled (com fundo). */
515
531
  type MultiSelectVariant = 'outline' | 'filled';
@@ -517,7 +533,11 @@ type MultiSelectVariant = 'outline' | 'filled';
517
533
  type MultiSelectSize = 'xsmall' | 'small' | 'medium' | 'large';
518
534
  /** Density da lista no Figma: itens de 40px (normal) ou 32px (compact). */
519
535
  type MultiSelectDensity = 'normal' | 'compact';
520
- interface MultiSelectProps {
536
+ /**
537
+ * As demais props vão para o MultiSelect do Prime: as aria-* no combobox (aria-describedby soma com
538
+ * a dica) e o resto na caixa do campo.
539
+ */
540
+ interface MultiSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'placeholder'> {
521
541
  variant?: MultiSelectVariant;
522
542
  size?: MultiSelectSize;
523
543
  density?: MultiSelectDensity;
@@ -620,7 +640,7 @@ interface PaginatorPageChangeEvent {
620
640
  page: number;
621
641
  pageCount: number;
622
642
  }
623
- interface PaginatorProps {
643
+ interface PaginatorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
624
644
  totalRecords: number;
625
645
  /** Índice do primeiro item da página (controlado). Sem ele, o Paginator controla sozinho. */
626
646
  first?: number;
@@ -643,7 +663,8 @@ declare const Panel: react.ForwardRefExoticComponent<PanelProps & react.RefAttri
643
663
 
644
664
  /** Label Size no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
645
665
  type RadioLabelSize = 'default' | 'full';
646
- interface RadioProps {
666
+ /** As demais props vão no <input> (aria-describedby, onBlur, data-*...); className e style, na raiz. */
667
+ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'checked' | 'defaultChecked' | 'defaultValue' | 'size' | 'type' | 'children'> {
647
668
  /** Texto ao lado do controle (Label no Figma). Sem rótulo visível, vira o nome acessível. */
648
669
  label: ReactNode;
649
670
  /** Mostra o rótulo. Padrão: true. */
@@ -665,7 +686,7 @@ interface RadioProps {
665
686
  }
666
687
  declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
667
688
 
668
- interface ScrollPanelProps {
689
+ interface ScrollPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
669
690
  children?: ReactNode;
670
691
  /** O que a área mostra, para o leitor de tela (ex.: "Histórico da carga"). */
671
692
  'aria-label'?: string;
@@ -689,7 +710,7 @@ interface SegmentControlOption {
689
710
  icon?: ReactNode;
690
711
  disabled?: boolean;
691
712
  }
692
- interface SegmentControlProps {
713
+ interface SegmentControlProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange' | 'defaultValue' | 'unselectable'> {
693
714
  options: SegmentControlOption[];
694
715
  /** Valor do segmento ativo (controlado). */
695
716
  value?: string | number;
@@ -708,7 +729,11 @@ declare const SegmentControl: react.ForwardRefExoticComponent<SegmentControlProp
708
729
  type SelectVariant = 'outline' | 'filled';
709
730
  /** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
710
731
  type SelectSize = 'xsmall' | 'small' | 'medium' | 'large';
711
- interface SelectProps {
732
+ /**
733
+ * As demais props vão para o Dropdown do Prime: as aria-* no combobox (aria-describedby soma com a
734
+ * dica) e o resto na caixa do campo.
735
+ */
736
+ interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'placeholder'> {
712
737
  variant?: SelectVariant;
713
738
  size?: SelectSize;
714
739
  /** Rótulo acima do campo (Label no Figma). Sem rótulo, passe `aria-label`. */
@@ -742,7 +767,8 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
742
767
  type SwitchSize = 'medium' | 'small';
743
768
  /** Label Position no Figma: lado do rótulo em relação ao switch. */
744
769
  type SwitchLabelPosition = 'right' | 'left';
745
- interface SwitchProps {
770
+ /** As demais props vão no <input> (aria-describedby, onBlur, data-*...); className e style, na raiz. */
771
+ interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'checked' | 'defaultChecked' | 'defaultValue' | 'size' | 'type' | 'children'> {
746
772
  /** Texto ao lado do switch (Label no Figma). Sem rótulo visível, vira o nome acessível. */
747
773
  label: ReactNode;
748
774
  /** Mostra o rótulo. Padrão: true. */
@@ -777,7 +803,7 @@ interface TabPanelProps {
777
803
  }
778
804
  /** Só descreve a aba: quem desenha é o Tabs. */
779
805
  declare function TabPanel(_props: TabPanelProps): null;
780
- interface TabsProps {
806
+ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
781
807
  /** Aba ativa (controlado). Sem ela, o Tabs controla sozinho. */
782
808
  activeIndex?: number;
783
809
  onTabChange?: (index: number) => void;
@@ -835,4 +861,4 @@ interface ToastProps {
835
861
  declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
836
862
 
837
863
  export { Accordion, AccordionTab, AutoComplete, Badge, Button, Card, Chart, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Message, Modal, MultiSelect, PageHeader, Paginator, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Toast, Tooltip };
838
- export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerProps, DrawerSide, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, MessageProps, MessageType, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PageHeaderProps, PageHeaderTab, PageHeaderVariant, PaginatorPageChangeEvent, PaginatorProps, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, ToastHandle, ToastMessage, ToastPosition, ToastProps, ToastType, TooltipPosition, TooltipProps, TooltipType };
864
+ export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, DividerOrientation, DividerProps, DividerVariant, DrawerBehavior, DrawerHandle, DrawerProps, DrawerSide, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, MessageProps, MessageType, ModalHandle, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PageHeaderProps, PageHeaderTab, PageHeaderVariant, PaginatorPageChangeEvent, PaginatorProps, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, ToastHandle, ToastMessage, ToastPosition, ToastProps, ToastType, TooltipPosition, TooltipProps, TooltipType };