@vector-business-services/cristal-ds-web 0.15.0 → 0.17.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 +825 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +616 -167
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +210 -51
- package/dist/index.d.ts +210 -51
- package/dist/index.js +821 -143
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes, CSSProperties,
|
|
2
|
+
import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes, CSSProperties, SyntheticEvent, RefObject, MouseEvent, Ref, ReactElement } 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';
|
|
6
6
|
import { MenuItemCommandEvent } from 'primereact/menuitem';
|
|
7
7
|
import { RadioButtonChangeEvent } from 'primereact/radiobutton';
|
|
8
8
|
import { InputSwitchChangeEvent } from 'primereact/inputswitch';
|
|
9
|
+
import { DataTableValue, DataTableProps, DataTableSelectionSingleChangeEvent, DataTableSelectionMultipleChangeEvent, DataTable } from 'primereact/datatable';
|
|
10
|
+
import { ColumnProps as ColumnProps$1 } from 'primereact/column';
|
|
9
11
|
import { ToastProps as ToastProps$1 } from 'primereact/toast';
|
|
10
12
|
|
|
11
13
|
/** Um item (.Accordion Item no Figma) e o conteúdo dele. */
|
|
@@ -200,8 +202,8 @@ type ChipVariant = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'high
|
|
|
200
202
|
/** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
|
|
201
203
|
type ChipSize = 'small' | 'medium' | 'large' | 'x-large';
|
|
202
204
|
interface ChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
203
|
-
/** Texto do chip (Label no Figma). */
|
|
204
|
-
label:
|
|
205
|
+
/** Texto do chip (Label no Figma). Aceita marcação, como o rótulo e o valor do filtro da Table. */
|
|
206
|
+
label: ReactNode;
|
|
205
207
|
variant?: ChipVariant;
|
|
206
208
|
size?: ChipSize;
|
|
207
209
|
/** Ícone antes do texto (Leading Icon no Figma). Use um ícone de `@vector-business-services/cristal-ds-web/icons`. */
|
|
@@ -219,6 +221,80 @@ interface ChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
|
219
221
|
}
|
|
220
222
|
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLDivElement>>;
|
|
221
223
|
|
|
224
|
+
/** Density no Figma: Normal (itens de 37px) e Compacted (29px). */
|
|
225
|
+
type MenuDensity = 'normal' | 'compact';
|
|
226
|
+
/** Um item da lista (.Dropdown Item no Figma). */
|
|
227
|
+
interface MenuItem {
|
|
228
|
+
label: string;
|
|
229
|
+
/** Ícone à esquerda (Leading Icon no Figma). Use um ícone de `@vector-business-services/cristal-ds-web/icons`. */
|
|
230
|
+
icon?: ReactNode;
|
|
231
|
+
/** Estado Selected do Figma: texto e ícone em brand, fundo selected/subtlest. */
|
|
232
|
+
selected?: boolean;
|
|
233
|
+
disabled?: boolean;
|
|
234
|
+
/** Ação do item; o menu popup fecha depois dela. */
|
|
235
|
+
command?: (event: MenuItemCommandEvent) => void;
|
|
236
|
+
/** Link do item; sem ele o clique não navega. */
|
|
237
|
+
url?: string;
|
|
238
|
+
target?: string;
|
|
239
|
+
id?: string;
|
|
240
|
+
className?: string;
|
|
241
|
+
}
|
|
242
|
+
interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
243
|
+
model: MenuItem[];
|
|
244
|
+
density?: MenuDensity;
|
|
245
|
+
/** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
|
|
246
|
+
popup?: boolean;
|
|
247
|
+
/** Alinhamento do popup com o elemento que o abriu. */
|
|
248
|
+
popupAlignment?: 'left' | 'right';
|
|
249
|
+
/** Estado Loading do Figma: troca os itens pelo indicador de carregamento. */
|
|
250
|
+
loading?: boolean;
|
|
251
|
+
/** O que o leitor de tela anuncia no carregamento. */
|
|
252
|
+
loadingLabel?: string;
|
|
253
|
+
'aria-label'?: string;
|
|
254
|
+
'aria-labelledby'?: string;
|
|
255
|
+
onShow?: (event: SyntheticEvent) => void;
|
|
256
|
+
onHide?: (event: SyntheticEvent) => void;
|
|
257
|
+
id?: string;
|
|
258
|
+
className?: string;
|
|
259
|
+
}
|
|
260
|
+
/** Controle do menu popup, pela ref. */
|
|
261
|
+
interface MenuHandle {
|
|
262
|
+
toggle: (event: SyntheticEvent) => void;
|
|
263
|
+
show: (event: SyntheticEvent) => void;
|
|
264
|
+
hide: (event: SyntheticEvent) => void;
|
|
265
|
+
/** O <div> raiz do menu (só existe com o popup aberto). */
|
|
266
|
+
getElement: () => HTMLDivElement | null;
|
|
267
|
+
}
|
|
268
|
+
declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<MenuHandle>>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Um item do menu de contexto: o mesmo do Menu, sem o Selected (o Context Menu do Prime não diz
|
|
272
|
+
* ao item qual está selecionado, então o estado não seria anunciado).
|
|
273
|
+
*/
|
|
274
|
+
type ContextMenuItem = Omit<MenuItem, 'selected'>;
|
|
275
|
+
interface ContextMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
276
|
+
model: ContextMenuItem[];
|
|
277
|
+
/** Density no Figma: Normal (itens de 37px) e Compacted (29px). Padrão: normal. */
|
|
278
|
+
density?: MenuDensity;
|
|
279
|
+
/** Abre com o botão direito em qualquer lugar da página, sem precisar chamar `show`. */
|
|
280
|
+
global?: boolean;
|
|
281
|
+
'aria-label'?: string;
|
|
282
|
+
'aria-labelledby'?: string;
|
|
283
|
+
onShow?: (event: SyntheticEvent) => void;
|
|
284
|
+
onHide?: (event: SyntheticEvent) => void;
|
|
285
|
+
id?: string;
|
|
286
|
+
className?: string;
|
|
287
|
+
}
|
|
288
|
+
/** Controle do menu de contexto, pela ref. */
|
|
289
|
+
interface ContextMenuHandle {
|
|
290
|
+
/** Abre no ponto do evento (o do botão direito, normalmente o onContextMenu). */
|
|
291
|
+
show: (event: SyntheticEvent) => void;
|
|
292
|
+
hide: (event: SyntheticEvent) => void;
|
|
293
|
+
/** O <div> raiz do menu (só existe com ele aberto). */
|
|
294
|
+
getElement: () => HTMLDivElement | null;
|
|
295
|
+
}
|
|
296
|
+
declare const ContextMenu: react.ForwardRefExoticComponent<ContextMenuProps & react.RefAttributes<ContextMenuHandle>>;
|
|
297
|
+
|
|
222
298
|
/** Horizontal Divider e Vertical Divider no Figma. */
|
|
223
299
|
type DividerOrientation = 'horizontal' | 'vertical';
|
|
224
300
|
/** Style no Figma: Solid (Default no vertical) e Dashed. */
|
|
@@ -327,52 +403,6 @@ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
327
403
|
}
|
|
328
404
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
329
405
|
|
|
330
|
-
/** Density no Figma: Normal (itens de 37px) e Compacted (29px). */
|
|
331
|
-
type MenuDensity = 'normal' | 'compact';
|
|
332
|
-
/** Um item da lista (.Dropdown Item no Figma). */
|
|
333
|
-
interface MenuItem {
|
|
334
|
-
label: string;
|
|
335
|
-
/** Ícone à esquerda (Leading Icon no Figma). Use um ícone de `@vector-business-services/cristal-ds-web/icons`. */
|
|
336
|
-
icon?: ReactNode;
|
|
337
|
-
/** Estado Selected do Figma: texto e ícone em brand, fundo selected/subtlest. */
|
|
338
|
-
selected?: boolean;
|
|
339
|
-
disabled?: boolean;
|
|
340
|
-
/** Ação do item; o menu popup fecha depois dela. */
|
|
341
|
-
command?: (event: MenuItemCommandEvent) => void;
|
|
342
|
-
/** Link do item; sem ele o clique não navega. */
|
|
343
|
-
url?: string;
|
|
344
|
-
target?: string;
|
|
345
|
-
id?: string;
|
|
346
|
-
className?: string;
|
|
347
|
-
}
|
|
348
|
-
interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
349
|
-
model: MenuItem[];
|
|
350
|
-
density?: MenuDensity;
|
|
351
|
-
/** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
|
|
352
|
-
popup?: boolean;
|
|
353
|
-
/** Alinhamento do popup com o elemento que o abriu. */
|
|
354
|
-
popupAlignment?: 'left' | 'right';
|
|
355
|
-
/** Estado Loading do Figma: troca os itens pelo indicador de carregamento. */
|
|
356
|
-
loading?: boolean;
|
|
357
|
-
/** O que o leitor de tela anuncia no carregamento. */
|
|
358
|
-
loadingLabel?: string;
|
|
359
|
-
'aria-label'?: string;
|
|
360
|
-
'aria-labelledby'?: string;
|
|
361
|
-
onShow?: (event: SyntheticEvent) => void;
|
|
362
|
-
onHide?: (event: SyntheticEvent) => void;
|
|
363
|
-
id?: string;
|
|
364
|
-
className?: string;
|
|
365
|
-
}
|
|
366
|
-
/** Controle do menu popup, pela ref. */
|
|
367
|
-
interface MenuHandle {
|
|
368
|
-
toggle: (event: SyntheticEvent) => void;
|
|
369
|
-
show: (event: SyntheticEvent) => void;
|
|
370
|
-
hide: (event: SyntheticEvent) => void;
|
|
371
|
-
/** O <div> raiz do menu (só existe com o popup aberto). */
|
|
372
|
-
getElement: () => HTMLDivElement | null;
|
|
373
|
-
}
|
|
374
|
-
declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<MenuHandle>>;
|
|
375
|
-
|
|
376
406
|
/** Um botão de ferramenta (.Menubar Tools Button no Figma). */
|
|
377
407
|
interface MenubarTool {
|
|
378
408
|
/** Nome do botão: vira o aria-label e o texto do tooltip. */
|
|
@@ -763,6 +793,22 @@ interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' |
|
|
|
763
793
|
}
|
|
764
794
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
765
795
|
|
|
796
|
+
/** Formato do bloco. */
|
|
797
|
+
type SkeletonShape = 'rectangle' | 'circle';
|
|
798
|
+
interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
799
|
+
/** Padrão: rectangle. */
|
|
800
|
+
shape?: SkeletonShape;
|
|
801
|
+
/** Largura (CSS). Padrão: 100%. */
|
|
802
|
+
width?: string;
|
|
803
|
+
/** Altura (CSS). Padrão: 16px. */
|
|
804
|
+
height?: string;
|
|
805
|
+
/** Largura e altura iguais (para o círculo ou um quadrado). */
|
|
806
|
+
size?: string;
|
|
807
|
+
/** Brilho que passa pelo bloco. Padrão: true (parado com prefers-reduced-motion). */
|
|
808
|
+
animated?: boolean;
|
|
809
|
+
}
|
|
810
|
+
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
|
|
811
|
+
|
|
766
812
|
/** Size no Figma: Medium (48x28) e Small (32x20). */
|
|
767
813
|
type SwitchSize = 'medium' | 'small';
|
|
768
814
|
/** Label Position no Figma: lado do rótulo em relação ao switch. */
|
|
@@ -814,6 +860,119 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
|
814
860
|
}
|
|
815
861
|
declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
|
|
816
862
|
|
|
863
|
+
/**
|
|
864
|
+
* Props da Column do PrimeReact (filtros, edição, `body`, `sortable`, `frozen`, `align`, `style`...),
|
|
865
|
+
* mais a ajuda do Figma. O visual (pt e unstyled) é do Cristal.
|
|
866
|
+
*/
|
|
867
|
+
interface ColumnProps extends Omit<ColumnProps$1, 'pt' | 'ptOptions' | 'unstyled'> {
|
|
868
|
+
/** Texto do tooltip no ícone de ajuda antes do título (Show Help no Figma). */
|
|
869
|
+
help?: ReactNode;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Uma coluna da Table. Não desenha nada sozinha: a Table lê as props de cada `<Column>` e monta a
|
|
873
|
+
* Column do Prime com o visual do Cristal.
|
|
874
|
+
*/
|
|
875
|
+
declare function Column(_props: ColumnProps): null;
|
|
876
|
+
type PrimeTableProps<T extends DataTableValue> = Omit<DataTableProps<T[]>, 'pt' | 'ptOptions' | 'unstyled' | 'value' | 'children' | 'selection' | 'selectionMode' | 'onSelectionChange' | 'cellSelection' | 'onContextMenuSelectionChange'>;
|
|
877
|
+
/** Props do DataTable do PrimeReact, mais o que o Cristal acrescenta. */
|
|
878
|
+
interface TableProps<T extends DataTableValue> extends PrimeTableProps<T> {
|
|
879
|
+
/** Linhas da tabela. */
|
|
880
|
+
value: T[];
|
|
881
|
+
/** As colunas (`<Column>`). */
|
|
882
|
+
children: ReactNode;
|
|
883
|
+
/**
|
|
884
|
+
* Como no Prime. Com uma `<Column selectionMode="multiple" />` e sem este, o Cristal usa
|
|
885
|
+
* `checkbox`: só a caixa seleciona (o clique na linha, não).
|
|
886
|
+
*/
|
|
887
|
+
selectionMode?: 'single' | 'radiobutton' | 'multiple' | 'checkbox' | null;
|
|
888
|
+
selection?: T | T[] | null;
|
|
889
|
+
onSelectionChange?: (event: DataTableSelectionSingleChangeEvent<T[]> | DataTableSelectionMultipleChangeEvent<T[]>) => void;
|
|
890
|
+
/** Texto do rodapé. Padrão: "Mostrando 10 de 123 registros". */
|
|
891
|
+
report?: (info: {
|
|
892
|
+
shown: number;
|
|
893
|
+
totalRecords: number;
|
|
894
|
+
}) => ReactNode;
|
|
895
|
+
/** Nome do Select de itens por página para o leitor de tela. Padrão: "Itens por página". */
|
|
896
|
+
rowsPerPageLabel?: string;
|
|
897
|
+
/**
|
|
898
|
+
* Menu de contexto do cabeçalho (a Dropdown List do Figma): o botão direito numa coluna abre
|
|
899
|
+
* Fixar coluna, Ajustar ao conteúdo e, nas ordenáveis, Ordenar ascendente e descendente.
|
|
900
|
+
* Padrão: true.
|
|
901
|
+
*/
|
|
902
|
+
columnMenu?: boolean;
|
|
903
|
+
}
|
|
904
|
+
/** A ref da Table é a do DataTable do Prime: `getElement()`, `exportCSV()`, `reset()`... */
|
|
905
|
+
type TableHandle<T extends DataTableValue = DataTableValue> = DataTable<T[]>;
|
|
906
|
+
/** Table do Figma "Cristal - Core Components | Web", sobre o DataTable do PrimeReact. */
|
|
907
|
+
declare const Table: <T extends DataTableValue>(props: TableProps<T> & {
|
|
908
|
+
ref?: Ref<TableHandle<T>>;
|
|
909
|
+
}) => ReactElement;
|
|
910
|
+
|
|
911
|
+
/** Um botão da Topbar (os Buttons à direita no Figma). */
|
|
912
|
+
interface TableToolbarAction {
|
|
913
|
+
label: string;
|
|
914
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
915
|
+
/** primary: o botão principal (fica visível até 768px); tertiary: os demais. Padrão: tertiary. */
|
|
916
|
+
variant?: 'primary' | 'tertiary';
|
|
917
|
+
icon?: ReactNode;
|
|
918
|
+
disabled?: boolean;
|
|
919
|
+
}
|
|
920
|
+
/** Um filtro aplicado (Chip da .Filter bar no Figma). */
|
|
921
|
+
interface TableFilter {
|
|
922
|
+
/** Nome do filtro, como "Status do lote". */
|
|
923
|
+
label: string;
|
|
924
|
+
/** Valor escolhido, como "Divulgação". */
|
|
925
|
+
value: string;
|
|
926
|
+
onRemove?: () => void;
|
|
927
|
+
}
|
|
928
|
+
interface TableToolbarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
929
|
+
/** Texto da busca (controlado). Com ele ou com onSearchChange, a busca aparece. */
|
|
930
|
+
searchValue?: string;
|
|
931
|
+
onSearchChange?: (value: string) => void;
|
|
932
|
+
/** Padrão: "Procurar por". */
|
|
933
|
+
searchPlaceholder?: string;
|
|
934
|
+
/** Nome do campo de busca para o leitor de tela. Padrão: "Procurar". */
|
|
935
|
+
searchLabel?: string;
|
|
936
|
+
/** Clique no Filtrar. Sem ele, o botão não aparece. */
|
|
937
|
+
onFilter?: (event: MouseEvent<HTMLElement>) => void;
|
|
938
|
+
/** Padrão: "Filtrar". */
|
|
939
|
+
filterLabel?: string;
|
|
940
|
+
/** Filtros aplicados: viram os chips da .Filter bar e o Badge do Filtrar. */
|
|
941
|
+
filters?: TableFilter[];
|
|
942
|
+
/** Limpar todos os filtros (a lixeira da .Filter bar). */
|
|
943
|
+
onClearFilters?: () => void;
|
|
944
|
+
/** Padrão: "Limpar filtros". */
|
|
945
|
+
clearFiltersLabel?: string;
|
|
946
|
+
/** Botões à direita. */
|
|
947
|
+
actions?: TableToolbarAction[];
|
|
948
|
+
/** Nome do botão que abre o menu com os botões que não cabem. Padrão: "Mais ações". */
|
|
949
|
+
moreActionsLabel?: string;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Topbar da Table (.Table Topbar no Figma): busca, Filtrar, botões e, com filtros aplicados, a
|
|
953
|
+
* .Filter bar. Vai no `toolbar` da Table.
|
|
954
|
+
*/
|
|
955
|
+
declare const TableToolbar: react.ForwardRefExoticComponent<TableToolbarProps & react.RefAttributes<HTMLDivElement>>;
|
|
956
|
+
|
|
957
|
+
interface TableRowActionsProps {
|
|
958
|
+
/** Itens do menu (os do Menu do Cristal). Cada `command` já sabe de que linha é. */
|
|
959
|
+
model: MenuItem[];
|
|
960
|
+
/** Nome do botão, com a linha: por exemplo "Ações do lote M000000374". */
|
|
961
|
+
'aria-label': string;
|
|
962
|
+
/** Padrão: a engrenagem (GearSix) do Type=Actions no Figma. */
|
|
963
|
+
icon?: ReactNode;
|
|
964
|
+
/** Tooltip do botão. Padrão: "Ações". */
|
|
965
|
+
tooltip?: ReactNode;
|
|
966
|
+
/** Lado do menu em relação ao botão. Padrão: left. */
|
|
967
|
+
popupAlignment?: 'left' | 'right';
|
|
968
|
+
disabled?: boolean;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Ações da linha (Type=Actions do .Table Main Cell no Figma): a engrenagem abre o Menu do Cristal
|
|
972
|
+
* com as ações daquela linha. Vai no `body` de uma `<Column align="center">`.
|
|
973
|
+
*/
|
|
974
|
+
declare function TableRowActions({ model, 'aria-label': label, icon, tooltip, popupAlignment, disabled, }: TableRowActionsProps): react.JSX.Element;
|
|
975
|
+
|
|
817
976
|
/** Type no Figma. */
|
|
818
977
|
type TagVariant = 'default' | 'success' | 'warning' | 'danger' | 'info' | 'purple' | 'gray' | 'inverse' | 'outline';
|
|
819
978
|
/** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
|
|
@@ -860,5 +1019,5 @@ interface ToastProps {
|
|
|
860
1019
|
}
|
|
861
1020
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
862
1021
|
|
|
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 };
|
|
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 };
|
|
1022
|
+
export { Accordion, AccordionTab, AutoComplete, Badge, Button, Card, Chart, Checkbox, Chip, Column, ContextMenu, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Message, Modal, MultiSelect, PageHeader, Paginator, Panel, Radio, ScrollPanel, SegmentControl, Select, Skeleton, Switch, TabPanel, Table, TableRowActions, TableToolbar, Tabs, Tag, Toast, Tooltip };
|
|
1023
|
+
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, ColumnProps, ContextMenuHandle, ContextMenuItem, ContextMenuProps, 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, SkeletonProps, SkeletonShape, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TableFilter, TableHandle, TableProps, TableRowActionsProps, TableToolbarAction, TableToolbarProps, TabsProps, TagProps, TagSize, TagVariant, ToastHandle, ToastMessage, ToastPosition, ToastProps, ToastType, TooltipPosition, TooltipProps, TooltipType };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes, CSSProperties,
|
|
2
|
+
import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes, CSSProperties, SyntheticEvent, RefObject, MouseEvent, Ref, ReactElement } 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';
|
|
6
6
|
import { MenuItemCommandEvent } from 'primereact/menuitem';
|
|
7
7
|
import { RadioButtonChangeEvent } from 'primereact/radiobutton';
|
|
8
8
|
import { InputSwitchChangeEvent } from 'primereact/inputswitch';
|
|
9
|
+
import { DataTableValue, DataTableProps, DataTableSelectionSingleChangeEvent, DataTableSelectionMultipleChangeEvent, DataTable } from 'primereact/datatable';
|
|
10
|
+
import { ColumnProps as ColumnProps$1 } from 'primereact/column';
|
|
9
11
|
import { ToastProps as ToastProps$1 } from 'primereact/toast';
|
|
10
12
|
|
|
11
13
|
/** Um item (.Accordion Item no Figma) e o conteúdo dele. */
|
|
@@ -200,8 +202,8 @@ type ChipVariant = 'default' | 'success' | 'danger' | 'warning' | 'info' | 'high
|
|
|
200
202
|
/** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
|
|
201
203
|
type ChipSize = 'small' | 'medium' | 'large' | 'x-large';
|
|
202
204
|
interface ChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
203
|
-
/** Texto do chip (Label no Figma). */
|
|
204
|
-
label:
|
|
205
|
+
/** Texto do chip (Label no Figma). Aceita marcação, como o rótulo e o valor do filtro da Table. */
|
|
206
|
+
label: ReactNode;
|
|
205
207
|
variant?: ChipVariant;
|
|
206
208
|
size?: ChipSize;
|
|
207
209
|
/** Ícone antes do texto (Leading Icon no Figma). Use um ícone de `@vector-business-services/cristal-ds-web/icons`. */
|
|
@@ -219,6 +221,80 @@ interface ChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
|
219
221
|
}
|
|
220
222
|
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLDivElement>>;
|
|
221
223
|
|
|
224
|
+
/** Density no Figma: Normal (itens de 37px) e Compacted (29px). */
|
|
225
|
+
type MenuDensity = 'normal' | 'compact';
|
|
226
|
+
/** Um item da lista (.Dropdown Item no Figma). */
|
|
227
|
+
interface MenuItem {
|
|
228
|
+
label: string;
|
|
229
|
+
/** Ícone à esquerda (Leading Icon no Figma). Use um ícone de `@vector-business-services/cristal-ds-web/icons`. */
|
|
230
|
+
icon?: ReactNode;
|
|
231
|
+
/** Estado Selected do Figma: texto e ícone em brand, fundo selected/subtlest. */
|
|
232
|
+
selected?: boolean;
|
|
233
|
+
disabled?: boolean;
|
|
234
|
+
/** Ação do item; o menu popup fecha depois dela. */
|
|
235
|
+
command?: (event: MenuItemCommandEvent) => void;
|
|
236
|
+
/** Link do item; sem ele o clique não navega. */
|
|
237
|
+
url?: string;
|
|
238
|
+
target?: string;
|
|
239
|
+
id?: string;
|
|
240
|
+
className?: string;
|
|
241
|
+
}
|
|
242
|
+
interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
243
|
+
model: MenuItem[];
|
|
244
|
+
density?: MenuDensity;
|
|
245
|
+
/** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
|
|
246
|
+
popup?: boolean;
|
|
247
|
+
/** Alinhamento do popup com o elemento que o abriu. */
|
|
248
|
+
popupAlignment?: 'left' | 'right';
|
|
249
|
+
/** Estado Loading do Figma: troca os itens pelo indicador de carregamento. */
|
|
250
|
+
loading?: boolean;
|
|
251
|
+
/** O que o leitor de tela anuncia no carregamento. */
|
|
252
|
+
loadingLabel?: string;
|
|
253
|
+
'aria-label'?: string;
|
|
254
|
+
'aria-labelledby'?: string;
|
|
255
|
+
onShow?: (event: SyntheticEvent) => void;
|
|
256
|
+
onHide?: (event: SyntheticEvent) => void;
|
|
257
|
+
id?: string;
|
|
258
|
+
className?: string;
|
|
259
|
+
}
|
|
260
|
+
/** Controle do menu popup, pela ref. */
|
|
261
|
+
interface MenuHandle {
|
|
262
|
+
toggle: (event: SyntheticEvent) => void;
|
|
263
|
+
show: (event: SyntheticEvent) => void;
|
|
264
|
+
hide: (event: SyntheticEvent) => void;
|
|
265
|
+
/** O <div> raiz do menu (só existe com o popup aberto). */
|
|
266
|
+
getElement: () => HTMLDivElement | null;
|
|
267
|
+
}
|
|
268
|
+
declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<MenuHandle>>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Um item do menu de contexto: o mesmo do Menu, sem o Selected (o Context Menu do Prime não diz
|
|
272
|
+
* ao item qual está selecionado, então o estado não seria anunciado).
|
|
273
|
+
*/
|
|
274
|
+
type ContextMenuItem = Omit<MenuItem, 'selected'>;
|
|
275
|
+
interface ContextMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
276
|
+
model: ContextMenuItem[];
|
|
277
|
+
/** Density no Figma: Normal (itens de 37px) e Compacted (29px). Padrão: normal. */
|
|
278
|
+
density?: MenuDensity;
|
|
279
|
+
/** Abre com o botão direito em qualquer lugar da página, sem precisar chamar `show`. */
|
|
280
|
+
global?: boolean;
|
|
281
|
+
'aria-label'?: string;
|
|
282
|
+
'aria-labelledby'?: string;
|
|
283
|
+
onShow?: (event: SyntheticEvent) => void;
|
|
284
|
+
onHide?: (event: SyntheticEvent) => void;
|
|
285
|
+
id?: string;
|
|
286
|
+
className?: string;
|
|
287
|
+
}
|
|
288
|
+
/** Controle do menu de contexto, pela ref. */
|
|
289
|
+
interface ContextMenuHandle {
|
|
290
|
+
/** Abre no ponto do evento (o do botão direito, normalmente o onContextMenu). */
|
|
291
|
+
show: (event: SyntheticEvent) => void;
|
|
292
|
+
hide: (event: SyntheticEvent) => void;
|
|
293
|
+
/** O <div> raiz do menu (só existe com ele aberto). */
|
|
294
|
+
getElement: () => HTMLDivElement | null;
|
|
295
|
+
}
|
|
296
|
+
declare const ContextMenu: react.ForwardRefExoticComponent<ContextMenuProps & react.RefAttributes<ContextMenuHandle>>;
|
|
297
|
+
|
|
222
298
|
/** Horizontal Divider e Vertical Divider no Figma. */
|
|
223
299
|
type DividerOrientation = 'horizontal' | 'vertical';
|
|
224
300
|
/** Style no Figma: Solid (Default no vertical) e Dashed. */
|
|
@@ -327,52 +403,6 @@ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
327
403
|
}
|
|
328
404
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
329
405
|
|
|
330
|
-
/** Density no Figma: Normal (itens de 37px) e Compacted (29px). */
|
|
331
|
-
type MenuDensity = 'normal' | 'compact';
|
|
332
|
-
/** Um item da lista (.Dropdown Item no Figma). */
|
|
333
|
-
interface MenuItem {
|
|
334
|
-
label: string;
|
|
335
|
-
/** Ícone à esquerda (Leading Icon no Figma). Use um ícone de `@vector-business-services/cristal-ds-web/icons`. */
|
|
336
|
-
icon?: ReactNode;
|
|
337
|
-
/** Estado Selected do Figma: texto e ícone em brand, fundo selected/subtlest. */
|
|
338
|
-
selected?: boolean;
|
|
339
|
-
disabled?: boolean;
|
|
340
|
-
/** Ação do item; o menu popup fecha depois dela. */
|
|
341
|
-
command?: (event: MenuItemCommandEvent) => void;
|
|
342
|
-
/** Link do item; sem ele o clique não navega. */
|
|
343
|
-
url?: string;
|
|
344
|
-
target?: string;
|
|
345
|
-
id?: string;
|
|
346
|
-
className?: string;
|
|
347
|
-
}
|
|
348
|
-
interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
349
|
-
model: MenuItem[];
|
|
350
|
-
density?: MenuDensity;
|
|
351
|
-
/** Abre sobre a tela, posicionado no elemento que chamou `toggle`/`show` pela ref. */
|
|
352
|
-
popup?: boolean;
|
|
353
|
-
/** Alinhamento do popup com o elemento que o abriu. */
|
|
354
|
-
popupAlignment?: 'left' | 'right';
|
|
355
|
-
/** Estado Loading do Figma: troca os itens pelo indicador de carregamento. */
|
|
356
|
-
loading?: boolean;
|
|
357
|
-
/** O que o leitor de tela anuncia no carregamento. */
|
|
358
|
-
loadingLabel?: string;
|
|
359
|
-
'aria-label'?: string;
|
|
360
|
-
'aria-labelledby'?: string;
|
|
361
|
-
onShow?: (event: SyntheticEvent) => void;
|
|
362
|
-
onHide?: (event: SyntheticEvent) => void;
|
|
363
|
-
id?: string;
|
|
364
|
-
className?: string;
|
|
365
|
-
}
|
|
366
|
-
/** Controle do menu popup, pela ref. */
|
|
367
|
-
interface MenuHandle {
|
|
368
|
-
toggle: (event: SyntheticEvent) => void;
|
|
369
|
-
show: (event: SyntheticEvent) => void;
|
|
370
|
-
hide: (event: SyntheticEvent) => void;
|
|
371
|
-
/** O <div> raiz do menu (só existe com o popup aberto). */
|
|
372
|
-
getElement: () => HTMLDivElement | null;
|
|
373
|
-
}
|
|
374
|
-
declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<MenuHandle>>;
|
|
375
|
-
|
|
376
406
|
/** Um botão de ferramenta (.Menubar Tools Button no Figma). */
|
|
377
407
|
interface MenubarTool {
|
|
378
408
|
/** Nome do botão: vira o aria-label e o texto do tooltip. */
|
|
@@ -763,6 +793,22 @@ interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' |
|
|
|
763
793
|
}
|
|
764
794
|
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
765
795
|
|
|
796
|
+
/** Formato do bloco. */
|
|
797
|
+
type SkeletonShape = 'rectangle' | 'circle';
|
|
798
|
+
interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
799
|
+
/** Padrão: rectangle. */
|
|
800
|
+
shape?: SkeletonShape;
|
|
801
|
+
/** Largura (CSS). Padrão: 100%. */
|
|
802
|
+
width?: string;
|
|
803
|
+
/** Altura (CSS). Padrão: 16px. */
|
|
804
|
+
height?: string;
|
|
805
|
+
/** Largura e altura iguais (para o círculo ou um quadrado). */
|
|
806
|
+
size?: string;
|
|
807
|
+
/** Brilho que passa pelo bloco. Padrão: true (parado com prefers-reduced-motion). */
|
|
808
|
+
animated?: boolean;
|
|
809
|
+
}
|
|
810
|
+
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
|
|
811
|
+
|
|
766
812
|
/** Size no Figma: Medium (48x28) e Small (32x20). */
|
|
767
813
|
type SwitchSize = 'medium' | 'small';
|
|
768
814
|
/** Label Position no Figma: lado do rótulo em relação ao switch. */
|
|
@@ -814,6 +860,119 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
|
814
860
|
}
|
|
815
861
|
declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement>>;
|
|
816
862
|
|
|
863
|
+
/**
|
|
864
|
+
* Props da Column do PrimeReact (filtros, edição, `body`, `sortable`, `frozen`, `align`, `style`...),
|
|
865
|
+
* mais a ajuda do Figma. O visual (pt e unstyled) é do Cristal.
|
|
866
|
+
*/
|
|
867
|
+
interface ColumnProps extends Omit<ColumnProps$1, 'pt' | 'ptOptions' | 'unstyled'> {
|
|
868
|
+
/** Texto do tooltip no ícone de ajuda antes do título (Show Help no Figma). */
|
|
869
|
+
help?: ReactNode;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Uma coluna da Table. Não desenha nada sozinha: a Table lê as props de cada `<Column>` e monta a
|
|
873
|
+
* Column do Prime com o visual do Cristal.
|
|
874
|
+
*/
|
|
875
|
+
declare function Column(_props: ColumnProps): null;
|
|
876
|
+
type PrimeTableProps<T extends DataTableValue> = Omit<DataTableProps<T[]>, 'pt' | 'ptOptions' | 'unstyled' | 'value' | 'children' | 'selection' | 'selectionMode' | 'onSelectionChange' | 'cellSelection' | 'onContextMenuSelectionChange'>;
|
|
877
|
+
/** Props do DataTable do PrimeReact, mais o que o Cristal acrescenta. */
|
|
878
|
+
interface TableProps<T extends DataTableValue> extends PrimeTableProps<T> {
|
|
879
|
+
/** Linhas da tabela. */
|
|
880
|
+
value: T[];
|
|
881
|
+
/** As colunas (`<Column>`). */
|
|
882
|
+
children: ReactNode;
|
|
883
|
+
/**
|
|
884
|
+
* Como no Prime. Com uma `<Column selectionMode="multiple" />` e sem este, o Cristal usa
|
|
885
|
+
* `checkbox`: só a caixa seleciona (o clique na linha, não).
|
|
886
|
+
*/
|
|
887
|
+
selectionMode?: 'single' | 'radiobutton' | 'multiple' | 'checkbox' | null;
|
|
888
|
+
selection?: T | T[] | null;
|
|
889
|
+
onSelectionChange?: (event: DataTableSelectionSingleChangeEvent<T[]> | DataTableSelectionMultipleChangeEvent<T[]>) => void;
|
|
890
|
+
/** Texto do rodapé. Padrão: "Mostrando 10 de 123 registros". */
|
|
891
|
+
report?: (info: {
|
|
892
|
+
shown: number;
|
|
893
|
+
totalRecords: number;
|
|
894
|
+
}) => ReactNode;
|
|
895
|
+
/** Nome do Select de itens por página para o leitor de tela. Padrão: "Itens por página". */
|
|
896
|
+
rowsPerPageLabel?: string;
|
|
897
|
+
/**
|
|
898
|
+
* Menu de contexto do cabeçalho (a Dropdown List do Figma): o botão direito numa coluna abre
|
|
899
|
+
* Fixar coluna, Ajustar ao conteúdo e, nas ordenáveis, Ordenar ascendente e descendente.
|
|
900
|
+
* Padrão: true.
|
|
901
|
+
*/
|
|
902
|
+
columnMenu?: boolean;
|
|
903
|
+
}
|
|
904
|
+
/** A ref da Table é a do DataTable do Prime: `getElement()`, `exportCSV()`, `reset()`... */
|
|
905
|
+
type TableHandle<T extends DataTableValue = DataTableValue> = DataTable<T[]>;
|
|
906
|
+
/** Table do Figma "Cristal - Core Components | Web", sobre o DataTable do PrimeReact. */
|
|
907
|
+
declare const Table: <T extends DataTableValue>(props: TableProps<T> & {
|
|
908
|
+
ref?: Ref<TableHandle<T>>;
|
|
909
|
+
}) => ReactElement;
|
|
910
|
+
|
|
911
|
+
/** Um botão da Topbar (os Buttons à direita no Figma). */
|
|
912
|
+
interface TableToolbarAction {
|
|
913
|
+
label: string;
|
|
914
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
915
|
+
/** primary: o botão principal (fica visível até 768px); tertiary: os demais. Padrão: tertiary. */
|
|
916
|
+
variant?: 'primary' | 'tertiary';
|
|
917
|
+
icon?: ReactNode;
|
|
918
|
+
disabled?: boolean;
|
|
919
|
+
}
|
|
920
|
+
/** Um filtro aplicado (Chip da .Filter bar no Figma). */
|
|
921
|
+
interface TableFilter {
|
|
922
|
+
/** Nome do filtro, como "Status do lote". */
|
|
923
|
+
label: string;
|
|
924
|
+
/** Valor escolhido, como "Divulgação". */
|
|
925
|
+
value: string;
|
|
926
|
+
onRemove?: () => void;
|
|
927
|
+
}
|
|
928
|
+
interface TableToolbarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
929
|
+
/** Texto da busca (controlado). Com ele ou com onSearchChange, a busca aparece. */
|
|
930
|
+
searchValue?: string;
|
|
931
|
+
onSearchChange?: (value: string) => void;
|
|
932
|
+
/** Padrão: "Procurar por". */
|
|
933
|
+
searchPlaceholder?: string;
|
|
934
|
+
/** Nome do campo de busca para o leitor de tela. Padrão: "Procurar". */
|
|
935
|
+
searchLabel?: string;
|
|
936
|
+
/** Clique no Filtrar. Sem ele, o botão não aparece. */
|
|
937
|
+
onFilter?: (event: MouseEvent<HTMLElement>) => void;
|
|
938
|
+
/** Padrão: "Filtrar". */
|
|
939
|
+
filterLabel?: string;
|
|
940
|
+
/** Filtros aplicados: viram os chips da .Filter bar e o Badge do Filtrar. */
|
|
941
|
+
filters?: TableFilter[];
|
|
942
|
+
/** Limpar todos os filtros (a lixeira da .Filter bar). */
|
|
943
|
+
onClearFilters?: () => void;
|
|
944
|
+
/** Padrão: "Limpar filtros". */
|
|
945
|
+
clearFiltersLabel?: string;
|
|
946
|
+
/** Botões à direita. */
|
|
947
|
+
actions?: TableToolbarAction[];
|
|
948
|
+
/** Nome do botão que abre o menu com os botões que não cabem. Padrão: "Mais ações". */
|
|
949
|
+
moreActionsLabel?: string;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Topbar da Table (.Table Topbar no Figma): busca, Filtrar, botões e, com filtros aplicados, a
|
|
953
|
+
* .Filter bar. Vai no `toolbar` da Table.
|
|
954
|
+
*/
|
|
955
|
+
declare const TableToolbar: react.ForwardRefExoticComponent<TableToolbarProps & react.RefAttributes<HTMLDivElement>>;
|
|
956
|
+
|
|
957
|
+
interface TableRowActionsProps {
|
|
958
|
+
/** Itens do menu (os do Menu do Cristal). Cada `command` já sabe de que linha é. */
|
|
959
|
+
model: MenuItem[];
|
|
960
|
+
/** Nome do botão, com a linha: por exemplo "Ações do lote M000000374". */
|
|
961
|
+
'aria-label': string;
|
|
962
|
+
/** Padrão: a engrenagem (GearSix) do Type=Actions no Figma. */
|
|
963
|
+
icon?: ReactNode;
|
|
964
|
+
/** Tooltip do botão. Padrão: "Ações". */
|
|
965
|
+
tooltip?: ReactNode;
|
|
966
|
+
/** Lado do menu em relação ao botão. Padrão: left. */
|
|
967
|
+
popupAlignment?: 'left' | 'right';
|
|
968
|
+
disabled?: boolean;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Ações da linha (Type=Actions do .Table Main Cell no Figma): a engrenagem abre o Menu do Cristal
|
|
972
|
+
* com as ações daquela linha. Vai no `body` de uma `<Column align="center">`.
|
|
973
|
+
*/
|
|
974
|
+
declare function TableRowActions({ model, 'aria-label': label, icon, tooltip, popupAlignment, disabled, }: TableRowActionsProps): react.JSX.Element;
|
|
975
|
+
|
|
817
976
|
/** Type no Figma. */
|
|
818
977
|
type TagVariant = 'default' | 'success' | 'warning' | 'danger' | 'info' | 'purple' | 'gray' | 'inverse' | 'outline';
|
|
819
978
|
/** Size no Figma: small = 24px, medium = 28px, large = 32px, x-large = 36px de altura. */
|
|
@@ -860,5 +1019,5 @@ interface ToastProps {
|
|
|
860
1019
|
}
|
|
861
1020
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
862
1021
|
|
|
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 };
|
|
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 };
|
|
1022
|
+
export { Accordion, AccordionTab, AutoComplete, Badge, Button, Card, Chart, Checkbox, Chip, Column, ContextMenu, Divider, Drawer, IconButton, Input, Menu, MenuPrincipal, Menubar, Message, Modal, MultiSelect, PageHeader, Paginator, Panel, Radio, ScrollPanel, SegmentControl, Select, Skeleton, Switch, TabPanel, Table, TableRowActions, TableToolbar, Tabs, Tag, Toast, Tooltip };
|
|
1023
|
+
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, ColumnProps, ContextMenuHandle, ContextMenuItem, ContextMenuProps, 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, SkeletonProps, SkeletonShape, SwitchLabelPosition, SwitchProps, SwitchSize, TabPanelProps, TableFilter, TableHandle, TableProps, TableRowActionsProps, TableToolbarAction, TableToolbarProps, TabsProps, TagProps, TagSize, TagVariant, ToastHandle, ToastMessage, ToastPosition, ToastProps, ToastType, TooltipPosition, TooltipProps, TooltipType };
|