@vector-business-services/cristal-ds-web 0.9.0 → 0.10.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 +310 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +368 -128
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +77 -2
- package/dist/index.d.ts +77 -2
- package/dist/index.js +309 -107
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ import { ChipRemoveEvent } from 'primereact/chip';
|
|
|
6
6
|
import { MenuItemCommandEvent } from 'primereact/menuitem';
|
|
7
7
|
import { RadioButtonChangeEvent } from 'primereact/radiobutton';
|
|
8
8
|
import { InputSwitchChangeEvent } from 'primereact/inputswitch';
|
|
9
|
+
import { ToastProps as ToastProps$1 } from 'primereact/toast';
|
|
9
10
|
|
|
10
11
|
/** Type no Figma: Outline (com borda) e Filled (com fundo). */
|
|
11
12
|
type InputVariant = 'outline' | 'filled';
|
|
@@ -349,6 +350,20 @@ interface MenuPrincipalHandle {
|
|
|
349
350
|
}
|
|
350
351
|
declare const MenuPrincipal: react.ForwardRefExoticComponent<MenuPrincipalProps & react.RefAttributes<MenuPrincipalHandle>>;
|
|
351
352
|
|
|
353
|
+
/** Type no Figma. */
|
|
354
|
+
type MessageType = 'info' | 'warning' | 'success' | 'danger' | 'highlight' | 'neutral';
|
|
355
|
+
interface MessageProps {
|
|
356
|
+
/** Padrão: info. */
|
|
357
|
+
type?: MessageType;
|
|
358
|
+
/** Texto (Message no Figma). */
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
/** Show Icon no Figma. Padrão: true. */
|
|
361
|
+
showIcon?: boolean;
|
|
362
|
+
id?: string;
|
|
363
|
+
className?: string;
|
|
364
|
+
}
|
|
365
|
+
declare const Message: react.ForwardRefExoticComponent<MessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
366
|
+
|
|
352
367
|
/**
|
|
353
368
|
* Size no Figma: Small (520px), Medium (768px) e Large (1200 x 720px; abaixo de 768px de tela
|
|
354
369
|
* vira tela cheia, como o Responsive=360 do Figma).
|
|
@@ -467,6 +482,34 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
467
482
|
}
|
|
468
483
|
declare const PageHeader: react.ForwardRefExoticComponent<PageHeaderProps & react.RefAttributes<HTMLDivElement>>;
|
|
469
484
|
|
|
485
|
+
/** O que o onPageChange recebe (o mesmo evento do Prime). */
|
|
486
|
+
interface PaginatorPageChangeEvent {
|
|
487
|
+
/** Índice do primeiro item da página. */
|
|
488
|
+
first: number;
|
|
489
|
+
/** Itens por página. */
|
|
490
|
+
rows: number;
|
|
491
|
+
/** Página, a partir de 0. */
|
|
492
|
+
page: number;
|
|
493
|
+
pageCount: number;
|
|
494
|
+
}
|
|
495
|
+
interface PaginatorProps {
|
|
496
|
+
totalRecords: number;
|
|
497
|
+
/** Índice do primeiro item da página (controlado). Sem ele, o Paginator controla sozinho. */
|
|
498
|
+
first?: number;
|
|
499
|
+
/** Itens por página (controlado). Padrão: o primeiro de rowsPerPageOptions, ou 10. */
|
|
500
|
+
rows?: number;
|
|
501
|
+
/** Opções do Select de itens por página; sem elas, o Select não aparece. */
|
|
502
|
+
rowsPerPageOptions?: number[];
|
|
503
|
+
/** Quantos números de página aparecem. Padrão: 5, como no Figma. */
|
|
504
|
+
pageLinkSize?: number;
|
|
505
|
+
onPageChange?: (event: PaginatorPageChangeEvent) => void;
|
|
506
|
+
/** Nome do Select para o leitor de tela. */
|
|
507
|
+
rowsPerPageLabel?: string;
|
|
508
|
+
id?: string;
|
|
509
|
+
className?: string;
|
|
510
|
+
}
|
|
511
|
+
declare const Paginator: react.ForwardRefExoticComponent<PaginatorProps & react.RefAttributes<HTMLDivElement>>;
|
|
512
|
+
|
|
470
513
|
type PanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'onToggle'>;
|
|
471
514
|
declare const Panel: react.ForwardRefExoticComponent<PanelProps & react.RefAttributes<HTMLDivElement>>;
|
|
472
515
|
|
|
@@ -631,6 +674,38 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
631
674
|
}
|
|
632
675
|
declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLSpanElement>>;
|
|
633
676
|
|
|
677
|
+
/** Type no Figma. */
|
|
678
|
+
type ToastType = 'warning' | 'danger' | 'success' | 'info';
|
|
679
|
+
/** Onde as mensagens aparecem na tela (o position do Prime). Padrão: top-right. */
|
|
680
|
+
type ToastPosition = NonNullable<ToastProps$1['position']>;
|
|
681
|
+
/** Uma mensagem, passada para `show()`. */
|
|
682
|
+
interface ToastMessage {
|
|
683
|
+
type: ToastType;
|
|
684
|
+
/** Title no Figma. */
|
|
685
|
+
title: string;
|
|
686
|
+
/** Message no Figma (Show Message content). */
|
|
687
|
+
message?: string;
|
|
688
|
+
/** Show Icon no Figma. Padrão: true. */
|
|
689
|
+
showIcon?: boolean;
|
|
690
|
+
/** Tempo na tela, em ms. Padrão do Prime: 3000. */
|
|
691
|
+
life?: number;
|
|
692
|
+
/** Fica até alguém fechar. */
|
|
693
|
+
sticky?: boolean;
|
|
694
|
+
}
|
|
695
|
+
/** O que a ref do Toast entrega. */
|
|
696
|
+
interface ToastHandle {
|
|
697
|
+
show: (message: ToastMessage | ToastMessage[]) => void;
|
|
698
|
+
clear: () => void;
|
|
699
|
+
}
|
|
700
|
+
interface ToastProps {
|
|
701
|
+
position?: ToastPosition;
|
|
702
|
+
/** Nome do X para o leitor de tela. */
|
|
703
|
+
closeLabel?: string;
|
|
704
|
+
id?: string;
|
|
705
|
+
className?: string;
|
|
706
|
+
}
|
|
707
|
+
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
708
|
+
|
|
634
709
|
/** Type no Figma: Plain (rótulo curto, uma linha) e Rich (texto de até 300px, quebra linha). */
|
|
635
710
|
type TooltipType = 'plain' | 'rich';
|
|
636
711
|
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -652,5 +727,5 @@ interface TooltipProps {
|
|
|
652
727
|
}
|
|
653
728
|
declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
|
|
654
729
|
|
|
655
|
-
export { AutoComplete, Badge, Button, Card, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Modal, MultiSelect, PageHeader, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Tooltip };
|
|
656
|
-
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, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PageHeaderProps, PageHeaderTab, PageHeaderVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
|
|
730
|
+
export { AutoComplete, Badge, Button, Card, 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 };
|
|
731
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ChipRemoveEvent } from 'primereact/chip';
|
|
|
6
6
|
import { MenuItemCommandEvent } from 'primereact/menuitem';
|
|
7
7
|
import { RadioButtonChangeEvent } from 'primereact/radiobutton';
|
|
8
8
|
import { InputSwitchChangeEvent } from 'primereact/inputswitch';
|
|
9
|
+
import { ToastProps as ToastProps$1 } from 'primereact/toast';
|
|
9
10
|
|
|
10
11
|
/** Type no Figma: Outline (com borda) e Filled (com fundo). */
|
|
11
12
|
type InputVariant = 'outline' | 'filled';
|
|
@@ -349,6 +350,20 @@ interface MenuPrincipalHandle {
|
|
|
349
350
|
}
|
|
350
351
|
declare const MenuPrincipal: react.ForwardRefExoticComponent<MenuPrincipalProps & react.RefAttributes<MenuPrincipalHandle>>;
|
|
351
352
|
|
|
353
|
+
/** Type no Figma. */
|
|
354
|
+
type MessageType = 'info' | 'warning' | 'success' | 'danger' | 'highlight' | 'neutral';
|
|
355
|
+
interface MessageProps {
|
|
356
|
+
/** Padrão: info. */
|
|
357
|
+
type?: MessageType;
|
|
358
|
+
/** Texto (Message no Figma). */
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
/** Show Icon no Figma. Padrão: true. */
|
|
361
|
+
showIcon?: boolean;
|
|
362
|
+
id?: string;
|
|
363
|
+
className?: string;
|
|
364
|
+
}
|
|
365
|
+
declare const Message: react.ForwardRefExoticComponent<MessageProps & react.RefAttributes<HTMLDivElement>>;
|
|
366
|
+
|
|
352
367
|
/**
|
|
353
368
|
* Size no Figma: Small (520px), Medium (768px) e Large (1200 x 720px; abaixo de 768px de tela
|
|
354
369
|
* vira tela cheia, como o Responsive=360 do Figma).
|
|
@@ -467,6 +482,34 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
467
482
|
}
|
|
468
483
|
declare const PageHeader: react.ForwardRefExoticComponent<PageHeaderProps & react.RefAttributes<HTMLDivElement>>;
|
|
469
484
|
|
|
485
|
+
/** O que o onPageChange recebe (o mesmo evento do Prime). */
|
|
486
|
+
interface PaginatorPageChangeEvent {
|
|
487
|
+
/** Índice do primeiro item da página. */
|
|
488
|
+
first: number;
|
|
489
|
+
/** Itens por página. */
|
|
490
|
+
rows: number;
|
|
491
|
+
/** Página, a partir de 0. */
|
|
492
|
+
page: number;
|
|
493
|
+
pageCount: number;
|
|
494
|
+
}
|
|
495
|
+
interface PaginatorProps {
|
|
496
|
+
totalRecords: number;
|
|
497
|
+
/** Índice do primeiro item da página (controlado). Sem ele, o Paginator controla sozinho. */
|
|
498
|
+
first?: number;
|
|
499
|
+
/** Itens por página (controlado). Padrão: o primeiro de rowsPerPageOptions, ou 10. */
|
|
500
|
+
rows?: number;
|
|
501
|
+
/** Opções do Select de itens por página; sem elas, o Select não aparece. */
|
|
502
|
+
rowsPerPageOptions?: number[];
|
|
503
|
+
/** Quantos números de página aparecem. Padrão: 5, como no Figma. */
|
|
504
|
+
pageLinkSize?: number;
|
|
505
|
+
onPageChange?: (event: PaginatorPageChangeEvent) => void;
|
|
506
|
+
/** Nome do Select para o leitor de tela. */
|
|
507
|
+
rowsPerPageLabel?: string;
|
|
508
|
+
id?: string;
|
|
509
|
+
className?: string;
|
|
510
|
+
}
|
|
511
|
+
declare const Paginator: react.ForwardRefExoticComponent<PaginatorProps & react.RefAttributes<HTMLDivElement>>;
|
|
512
|
+
|
|
470
513
|
type PanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'onToggle'>;
|
|
471
514
|
declare const Panel: react.ForwardRefExoticComponent<PanelProps & react.RefAttributes<HTMLDivElement>>;
|
|
472
515
|
|
|
@@ -631,6 +674,38 @@ interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
631
674
|
}
|
|
632
675
|
declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLSpanElement>>;
|
|
633
676
|
|
|
677
|
+
/** Type no Figma. */
|
|
678
|
+
type ToastType = 'warning' | 'danger' | 'success' | 'info';
|
|
679
|
+
/** Onde as mensagens aparecem na tela (o position do Prime). Padrão: top-right. */
|
|
680
|
+
type ToastPosition = NonNullable<ToastProps$1['position']>;
|
|
681
|
+
/** Uma mensagem, passada para `show()`. */
|
|
682
|
+
interface ToastMessage {
|
|
683
|
+
type: ToastType;
|
|
684
|
+
/** Title no Figma. */
|
|
685
|
+
title: string;
|
|
686
|
+
/** Message no Figma (Show Message content). */
|
|
687
|
+
message?: string;
|
|
688
|
+
/** Show Icon no Figma. Padrão: true. */
|
|
689
|
+
showIcon?: boolean;
|
|
690
|
+
/** Tempo na tela, em ms. Padrão do Prime: 3000. */
|
|
691
|
+
life?: number;
|
|
692
|
+
/** Fica até alguém fechar. */
|
|
693
|
+
sticky?: boolean;
|
|
694
|
+
}
|
|
695
|
+
/** O que a ref do Toast entrega. */
|
|
696
|
+
interface ToastHandle {
|
|
697
|
+
show: (message: ToastMessage | ToastMessage[]) => void;
|
|
698
|
+
clear: () => void;
|
|
699
|
+
}
|
|
700
|
+
interface ToastProps {
|
|
701
|
+
position?: ToastPosition;
|
|
702
|
+
/** Nome do X para o leitor de tela. */
|
|
703
|
+
closeLabel?: string;
|
|
704
|
+
id?: string;
|
|
705
|
+
className?: string;
|
|
706
|
+
}
|
|
707
|
+
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
708
|
+
|
|
634
709
|
/** Type no Figma: Plain (rótulo curto, uma linha) e Rich (texto de até 300px, quebra linha). */
|
|
635
710
|
type TooltipType = 'plain' | 'rich';
|
|
636
711
|
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -652,5 +727,5 @@ interface TooltipProps {
|
|
|
652
727
|
}
|
|
653
728
|
declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
|
|
654
729
|
|
|
655
|
-
export { AutoComplete, Badge, Button, Card, Checkbox, Chip, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Modal, MultiSelect, PageHeader, Panel, Radio, ScrollPanel, SegmentControl, Select, Switch, TabPanel, Tabs, Tag, Tooltip };
|
|
656
|
-
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, DrawerSize, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, InputSize, InputVariant, MenuDensity, MenuHandle, MenuItem, MenuPrincipalEntry, MenuPrincipalGroup, MenuPrincipalHandle, MenuPrincipalItem, MenuPrincipalProps, MenuProps, MenubarProps, MenubarTool, MenubarUser, ModalProps, ModalSize, MultiSelectDensity, MultiSelectProps, MultiSelectSize, MultiSelectVariant, PageHeaderProps, PageHeaderTab, PageHeaderVariant, PanelProps, RadioLabelSize, RadioProps, ScrollPanelProps, SegmentControlOption, SegmentControlProps, SegmentControlVariant, SelectProps, SelectSize, SelectVariant, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TabsProps, TagProps, TagSize, TagVariant, TooltipPosition, TooltipProps, TooltipType };
|
|
730
|
+
export { AutoComplete, Badge, Button, Card, 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 };
|
|
731
|
+
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, 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 };
|