@vector-business-services/cristal-ds-web 0.11.0 → 0.13.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 +368 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +139 -39
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +101 -26
- package/dist/index.d.ts +101 -26
- package/dist/index.js +370 -68
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, InputHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, SyntheticEvent, MouseEvent
|
|
2
|
+
import { ReactNode, InputHTMLAttributes, HTMLAttributes, 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';
|
|
@@ -111,6 +111,61 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
111
111
|
}
|
|
112
112
|
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
113
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Cor da série: os tokens de gráfico (color/chart/fill/<cor>/<tom>), na ordem fixa. Sem `color`,
|
|
116
|
+
* cada série pega a da sua posição; a cor acompanha a série, nunca a ordem. A quinary (ciano) fica
|
|
117
|
+
* de fora: clara demais sobre o fundo (1,75:1).
|
|
118
|
+
*/
|
|
119
|
+
type ChartColor = 'primary' | 'secondary' | 'tertiary' | 'quaternary';
|
|
120
|
+
/** Tom da cor (o passo do token). Padrão: 600 na linha e 500 na barra, como no Figma. */
|
|
121
|
+
type ChartTone = 100 | 200 | 300 | 400 | 500 | 600;
|
|
122
|
+
/** Uma série: uma linha ou um conjunto de barras. */
|
|
123
|
+
interface ChartSeries {
|
|
124
|
+
label: string;
|
|
125
|
+
/** Um valor por rótulo do eixo X; null deixa o ponto em branco. */
|
|
126
|
+
data: (number | null)[];
|
|
127
|
+
color?: ChartColor;
|
|
128
|
+
/** Tom da cor: nas barras empilhadas do Figma, partes de um total usam tons da mesma cor. */
|
|
129
|
+
tone?: ChartTone;
|
|
130
|
+
/** Eixo do valor: o da esquerda (padrão) ou o da direita (y2Axis). */
|
|
131
|
+
axis?: 'left' | 'right';
|
|
132
|
+
}
|
|
133
|
+
/** Escala de um eixo Y. */
|
|
134
|
+
interface ChartAxis {
|
|
135
|
+
/** Texto de cada marca e do valor no tooltip (ex.: `(v) => \`R$ ${v}\``). */
|
|
136
|
+
format?: (value: number) => string;
|
|
137
|
+
min?: number;
|
|
138
|
+
max?: number;
|
|
139
|
+
/** Distância entre as marcas (ex.: 50). */
|
|
140
|
+
stepSize?: number;
|
|
141
|
+
}
|
|
142
|
+
interface ChartProps {
|
|
143
|
+
/** Linhas com área (Chart / Line) ou barras (Chart / Bar). Padrão: line. */
|
|
144
|
+
type?: 'line' | 'bar';
|
|
145
|
+
/** Barras empilhadas: as séries somam numa barra só por rótulo. */
|
|
146
|
+
stacked?: boolean;
|
|
147
|
+
/** Rótulos do eixo X, um por ponto. */
|
|
148
|
+
labels: string[];
|
|
149
|
+
/** As séries, até 4 cores (as de gráfico dos tokens). */
|
|
150
|
+
series: ChartSeries[];
|
|
151
|
+
/** Eixo da esquerda. */
|
|
152
|
+
yAxis?: ChartAxis;
|
|
153
|
+
/** Eixo da direita, para séries com `axis: 'right'`. */
|
|
154
|
+
y2Axis?: ChartAxis;
|
|
155
|
+
/** Título do card. Sem título nem ações, só o gráfico e a legenda, sem a caixa. */
|
|
156
|
+
title?: string;
|
|
157
|
+
/** Texto do ícone de ajuda (Question) ao lado do título, num Tooltip. */
|
|
158
|
+
help?: string;
|
|
159
|
+
helpLabel?: string;
|
|
160
|
+
/** Botões à direita do título (IconButton tertiary xsmall no Figma). */
|
|
161
|
+
actions?: ReactNode;
|
|
162
|
+
/** Altura da área do gráfico, com os eixos. Padrão: 266px, a do Figma. */
|
|
163
|
+
height?: number;
|
|
164
|
+
id?: string;
|
|
165
|
+
className?: string;
|
|
166
|
+
}
|
|
167
|
+
declare function Chart({ type, stacked, labels, series, yAxis, y2Axis, title, help, helpLabel, actions, height, id, className, }: ChartProps): react.JSX.Element;
|
|
168
|
+
|
|
114
169
|
/** Label Position no Figma: lado da caixa em relação ao rótulo. */
|
|
115
170
|
type CheckboxPosition = 'left' | 'right';
|
|
116
171
|
/** Label Type no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
|
|
@@ -216,6 +271,32 @@ interface DrawerProps {
|
|
|
216
271
|
}
|
|
217
272
|
declare function Drawer({ visible, onHide, title, subtitle, side, behavior, size, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
|
|
218
273
|
|
|
274
|
+
/** Type no Figma: Plain (rótulo curto, uma linha) e Rich (texto de até 300px, quebra linha). */
|
|
275
|
+
type TooltipType = 'plain' | 'rich';
|
|
276
|
+
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
277
|
+
interface TooltipProps {
|
|
278
|
+
/** Elemento que mostra o tooltip: ref, elemento ou seletor CSS. */
|
|
279
|
+
target: RefObject<HTMLElement | null> | HTMLElement | string;
|
|
280
|
+
/** Texto do tooltip (Label no Plain, Text no Rich). */
|
|
281
|
+
content: ReactNode;
|
|
282
|
+
type?: TooltipType;
|
|
283
|
+
/** Lado do alvo. O Prime inverte o lado se faltar espaço na tela. */
|
|
284
|
+
position?: TooltipPosition;
|
|
285
|
+
/** O que abre o tooltip; o padrão abre no hover e no foco do teclado. */
|
|
286
|
+
event?: 'hover' | 'focus' | 'both';
|
|
287
|
+
showDelay?: number;
|
|
288
|
+
hideDelay?: number;
|
|
289
|
+
disabled?: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Liga o texto ao alvo como descrição (aria-describedby). Padrão: true. Use false quando o texto
|
|
292
|
+
* já é o nome do alvo (como no IconButton), para o leitor de tela não ler duas vezes.
|
|
293
|
+
*/
|
|
294
|
+
describe?: boolean;
|
|
295
|
+
id?: string;
|
|
296
|
+
className?: string;
|
|
297
|
+
}
|
|
298
|
+
declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, describe, id, className, }: TooltipProps): react.JSX.Element;
|
|
299
|
+
|
|
219
300
|
/**
|
|
220
301
|
* Hierarchy no Figma: Primary (Filled), Secondary (Tonal), Tertiary (Outlined) e Other (Icon),
|
|
221
302
|
* que aqui é `ghost`: só o ícone, com fundo no hover.
|
|
@@ -230,6 +311,13 @@ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
230
311
|
icon: ReactNode;
|
|
231
312
|
/** Obrigatório: o botão não tem texto, então é isso que o leitor de tela anuncia. */
|
|
232
313
|
'aria-label': string;
|
|
314
|
+
/**
|
|
315
|
+
* Tooltip do botão. Padrão: o próprio `aria-label`, para quem vê saber o que o ícone faz. Um
|
|
316
|
+
* texto diferente vira também a descrição do botão; `false` tira o tooltip.
|
|
317
|
+
*/
|
|
318
|
+
tooltip?: ReactNode | false;
|
|
319
|
+
/** Lado do tooltip. Padrão: bottom. */
|
|
320
|
+
tooltipPosition?: TooltipPosition;
|
|
233
321
|
}
|
|
234
322
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
235
323
|
|
|
@@ -499,9 +587,17 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
499
587
|
segmentControl?: ReactNode;
|
|
500
588
|
/** Botões das ferramentas (Show Buttons no Figma), 8px entre eles. */
|
|
501
589
|
actions?: ReactNode;
|
|
502
|
-
/**
|
|
503
|
-
|
|
590
|
+
/**
|
|
591
|
+
* Mostra o botão de expandir, o último das ferramentas. Recebe o novo estado: true ao expandir,
|
|
592
|
+
* false ao recolher.
|
|
593
|
+
*/
|
|
594
|
+
onExpand?: (expanded: boolean) => void;
|
|
595
|
+
/** Expandido (controlado). Sem ele, o PageHeader alterna sozinho a cada clique. */
|
|
596
|
+
expanded?: boolean;
|
|
597
|
+
/** Nome do botão recolhido (ArrowsOutSimple). */
|
|
504
598
|
expandLabel?: string;
|
|
599
|
+
/** Nome do botão expandido (ArrowsInSimple). */
|
|
600
|
+
collapseLabel?: string;
|
|
505
601
|
/** Abas abaixo do título (Show Tabs no Figma). */
|
|
506
602
|
tabs?: PageHeaderTab[];
|
|
507
603
|
/** Aba ativa (controlado). Sem ela, o PageHeader controla sozinho. */
|
|
@@ -736,26 +832,5 @@ interface ToastProps {
|
|
|
736
832
|
}
|
|
737
833
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
738
834
|
|
|
739
|
-
|
|
740
|
-
type
|
|
741
|
-
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
742
|
-
interface TooltipProps {
|
|
743
|
-
/** Elemento que mostra o tooltip: ref, elemento ou seletor CSS. */
|
|
744
|
-
target: RefObject<HTMLElement | null> | HTMLElement | string;
|
|
745
|
-
/** Texto do tooltip (Label no Plain, Text no Rich). */
|
|
746
|
-
content: ReactNode;
|
|
747
|
-
type?: TooltipType;
|
|
748
|
-
/** Lado do alvo. O Prime inverte o lado se faltar espaço na tela. */
|
|
749
|
-
position?: TooltipPosition;
|
|
750
|
-
/** O que abre o tooltip; o padrão abre no hover e no foco do teclado. */
|
|
751
|
-
event?: 'hover' | 'focus' | 'both';
|
|
752
|
-
showDelay?: number;
|
|
753
|
-
hideDelay?: number;
|
|
754
|
-
disabled?: boolean;
|
|
755
|
-
id?: string;
|
|
756
|
-
className?: string;
|
|
757
|
-
}
|
|
758
|
-
declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
|
|
759
|
-
|
|
760
|
-
export { Accordion, AccordionTab, 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 };
|
|
761
|
-
export type { AccordionProps, AccordionTabProps, 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 };
|
|
835
|
+
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 };
|
|
836
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, InputHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, SyntheticEvent, MouseEvent
|
|
2
|
+
import { ReactNode, InputHTMLAttributes, HTMLAttributes, 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';
|
|
@@ -111,6 +111,61 @@ interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
111
111
|
}
|
|
112
112
|
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
113
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Cor da série: os tokens de gráfico (color/chart/fill/<cor>/<tom>), na ordem fixa. Sem `color`,
|
|
116
|
+
* cada série pega a da sua posição; a cor acompanha a série, nunca a ordem. A quinary (ciano) fica
|
|
117
|
+
* de fora: clara demais sobre o fundo (1,75:1).
|
|
118
|
+
*/
|
|
119
|
+
type ChartColor = 'primary' | 'secondary' | 'tertiary' | 'quaternary';
|
|
120
|
+
/** Tom da cor (o passo do token). Padrão: 600 na linha e 500 na barra, como no Figma. */
|
|
121
|
+
type ChartTone = 100 | 200 | 300 | 400 | 500 | 600;
|
|
122
|
+
/** Uma série: uma linha ou um conjunto de barras. */
|
|
123
|
+
interface ChartSeries {
|
|
124
|
+
label: string;
|
|
125
|
+
/** Um valor por rótulo do eixo X; null deixa o ponto em branco. */
|
|
126
|
+
data: (number | null)[];
|
|
127
|
+
color?: ChartColor;
|
|
128
|
+
/** Tom da cor: nas barras empilhadas do Figma, partes de um total usam tons da mesma cor. */
|
|
129
|
+
tone?: ChartTone;
|
|
130
|
+
/** Eixo do valor: o da esquerda (padrão) ou o da direita (y2Axis). */
|
|
131
|
+
axis?: 'left' | 'right';
|
|
132
|
+
}
|
|
133
|
+
/** Escala de um eixo Y. */
|
|
134
|
+
interface ChartAxis {
|
|
135
|
+
/** Texto de cada marca e do valor no tooltip (ex.: `(v) => \`R$ ${v}\``). */
|
|
136
|
+
format?: (value: number) => string;
|
|
137
|
+
min?: number;
|
|
138
|
+
max?: number;
|
|
139
|
+
/** Distância entre as marcas (ex.: 50). */
|
|
140
|
+
stepSize?: number;
|
|
141
|
+
}
|
|
142
|
+
interface ChartProps {
|
|
143
|
+
/** Linhas com área (Chart / Line) ou barras (Chart / Bar). Padrão: line. */
|
|
144
|
+
type?: 'line' | 'bar';
|
|
145
|
+
/** Barras empilhadas: as séries somam numa barra só por rótulo. */
|
|
146
|
+
stacked?: boolean;
|
|
147
|
+
/** Rótulos do eixo X, um por ponto. */
|
|
148
|
+
labels: string[];
|
|
149
|
+
/** As séries, até 4 cores (as de gráfico dos tokens). */
|
|
150
|
+
series: ChartSeries[];
|
|
151
|
+
/** Eixo da esquerda. */
|
|
152
|
+
yAxis?: ChartAxis;
|
|
153
|
+
/** Eixo da direita, para séries com `axis: 'right'`. */
|
|
154
|
+
y2Axis?: ChartAxis;
|
|
155
|
+
/** Título do card. Sem título nem ações, só o gráfico e a legenda, sem a caixa. */
|
|
156
|
+
title?: string;
|
|
157
|
+
/** Texto do ícone de ajuda (Question) ao lado do título, num Tooltip. */
|
|
158
|
+
help?: string;
|
|
159
|
+
helpLabel?: string;
|
|
160
|
+
/** Botões à direita do título (IconButton tertiary xsmall no Figma). */
|
|
161
|
+
actions?: ReactNode;
|
|
162
|
+
/** Altura da área do gráfico, com os eixos. Padrão: 266px, a do Figma. */
|
|
163
|
+
height?: number;
|
|
164
|
+
id?: string;
|
|
165
|
+
className?: string;
|
|
166
|
+
}
|
|
167
|
+
declare function Chart({ type, stacked, labels, series, yAxis, y2Axis, title, help, helpLabel, actions, height, id, className, }: ChartProps): react.JSX.Element;
|
|
168
|
+
|
|
114
169
|
/** Label Position no Figma: lado da caixa em relação ao rótulo. */
|
|
115
170
|
type CheckboxPosition = 'left' | 'right';
|
|
116
171
|
/** Label Type no Figma: Default (uma linha, com reticências) e Full (quebra em várias linhas). */
|
|
@@ -216,6 +271,32 @@ interface DrawerProps {
|
|
|
216
271
|
}
|
|
217
272
|
declare function Drawer({ visible, onHide, title, subtitle, side, behavior, size, modal, onBack, backLabel, closeLabel, footer, children, id, className, }: DrawerProps): react.JSX.Element;
|
|
218
273
|
|
|
274
|
+
/** Type no Figma: Plain (rótulo curto, uma linha) e Rich (texto de até 300px, quebra linha). */
|
|
275
|
+
type TooltipType = 'plain' | 'rich';
|
|
276
|
+
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
277
|
+
interface TooltipProps {
|
|
278
|
+
/** Elemento que mostra o tooltip: ref, elemento ou seletor CSS. */
|
|
279
|
+
target: RefObject<HTMLElement | null> | HTMLElement | string;
|
|
280
|
+
/** Texto do tooltip (Label no Plain, Text no Rich). */
|
|
281
|
+
content: ReactNode;
|
|
282
|
+
type?: TooltipType;
|
|
283
|
+
/** Lado do alvo. O Prime inverte o lado se faltar espaço na tela. */
|
|
284
|
+
position?: TooltipPosition;
|
|
285
|
+
/** O que abre o tooltip; o padrão abre no hover e no foco do teclado. */
|
|
286
|
+
event?: 'hover' | 'focus' | 'both';
|
|
287
|
+
showDelay?: number;
|
|
288
|
+
hideDelay?: number;
|
|
289
|
+
disabled?: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Liga o texto ao alvo como descrição (aria-describedby). Padrão: true. Use false quando o texto
|
|
292
|
+
* já é o nome do alvo (como no IconButton), para o leitor de tela não ler duas vezes.
|
|
293
|
+
*/
|
|
294
|
+
describe?: boolean;
|
|
295
|
+
id?: string;
|
|
296
|
+
className?: string;
|
|
297
|
+
}
|
|
298
|
+
declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, describe, id, className, }: TooltipProps): react.JSX.Element;
|
|
299
|
+
|
|
219
300
|
/**
|
|
220
301
|
* Hierarchy no Figma: Primary (Filled), Secondary (Tonal), Tertiary (Outlined) e Other (Icon),
|
|
221
302
|
* que aqui é `ghost`: só o ícone, com fundo no hover.
|
|
@@ -230,6 +311,13 @@ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
230
311
|
icon: ReactNode;
|
|
231
312
|
/** Obrigatório: o botão não tem texto, então é isso que o leitor de tela anuncia. */
|
|
232
313
|
'aria-label': string;
|
|
314
|
+
/**
|
|
315
|
+
* Tooltip do botão. Padrão: o próprio `aria-label`, para quem vê saber o que o ícone faz. Um
|
|
316
|
+
* texto diferente vira também a descrição do botão; `false` tira o tooltip.
|
|
317
|
+
*/
|
|
318
|
+
tooltip?: ReactNode | false;
|
|
319
|
+
/** Lado do tooltip. Padrão: bottom. */
|
|
320
|
+
tooltipPosition?: TooltipPosition;
|
|
233
321
|
}
|
|
234
322
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
235
323
|
|
|
@@ -499,9 +587,17 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
499
587
|
segmentControl?: ReactNode;
|
|
500
588
|
/** Botões das ferramentas (Show Buttons no Figma), 8px entre eles. */
|
|
501
589
|
actions?: ReactNode;
|
|
502
|
-
/**
|
|
503
|
-
|
|
590
|
+
/**
|
|
591
|
+
* Mostra o botão de expandir, o último das ferramentas. Recebe o novo estado: true ao expandir,
|
|
592
|
+
* false ao recolher.
|
|
593
|
+
*/
|
|
594
|
+
onExpand?: (expanded: boolean) => void;
|
|
595
|
+
/** Expandido (controlado). Sem ele, o PageHeader alterna sozinho a cada clique. */
|
|
596
|
+
expanded?: boolean;
|
|
597
|
+
/** Nome do botão recolhido (ArrowsOutSimple). */
|
|
504
598
|
expandLabel?: string;
|
|
599
|
+
/** Nome do botão expandido (ArrowsInSimple). */
|
|
600
|
+
collapseLabel?: string;
|
|
505
601
|
/** Abas abaixo do título (Show Tabs no Figma). */
|
|
506
602
|
tabs?: PageHeaderTab[];
|
|
507
603
|
/** Aba ativa (controlado). Sem ela, o PageHeader controla sozinho. */
|
|
@@ -736,26 +832,5 @@ interface ToastProps {
|
|
|
736
832
|
}
|
|
737
833
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
738
834
|
|
|
739
|
-
|
|
740
|
-
type
|
|
741
|
-
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
742
|
-
interface TooltipProps {
|
|
743
|
-
/** Elemento que mostra o tooltip: ref, elemento ou seletor CSS. */
|
|
744
|
-
target: RefObject<HTMLElement | null> | HTMLElement | string;
|
|
745
|
-
/** Texto do tooltip (Label no Plain, Text no Rich). */
|
|
746
|
-
content: ReactNode;
|
|
747
|
-
type?: TooltipType;
|
|
748
|
-
/** Lado do alvo. O Prime inverte o lado se faltar espaço na tela. */
|
|
749
|
-
position?: TooltipPosition;
|
|
750
|
-
/** O que abre o tooltip; o padrão abre no hover e no foco do teclado. */
|
|
751
|
-
event?: 'hover' | 'focus' | 'both';
|
|
752
|
-
showDelay?: number;
|
|
753
|
-
hideDelay?: number;
|
|
754
|
-
disabled?: boolean;
|
|
755
|
-
id?: string;
|
|
756
|
-
className?: string;
|
|
757
|
-
}
|
|
758
|
-
declare function Tooltip({ target, content, type, position, event, showDelay, hideDelay, disabled, id, className, }: TooltipProps): react.JSX.Element;
|
|
759
|
-
|
|
760
|
-
export { Accordion, AccordionTab, 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 };
|
|
761
|
-
export type { AccordionProps, AccordionTabProps, 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 };
|
|
835
|
+
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 };
|
|
836
|
+
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 };
|