@vector-business-services/cristal-ds-web 0.20.0 → 0.21.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 +443 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +202 -78
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +94 -2
- package/dist/index.d.ts +94 -2
- package/dist/index.js +443 -136
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -348,6 +348,98 @@ declare const DatePicker: <TMode extends CalendarSelectionMode = "single">(props
|
|
|
348
348
|
ref?: Ref<DatePickerHandle>;
|
|
349
349
|
}) => ReactElement;
|
|
350
350
|
|
|
351
|
+
/** Um período: [início, fim], com as duas datas no mesmo dia quando é um dia só. */
|
|
352
|
+
type DateRange = [Date, Date];
|
|
353
|
+
/** Item da lista de períodos do Data Picker (.Period no Figma). */
|
|
354
|
+
interface DateRangePeriod {
|
|
355
|
+
/** Texto do item e do botão ("Este mês"). */
|
|
356
|
+
label: string;
|
|
357
|
+
/** O período, a partir do dia de hoje. */
|
|
358
|
+
range: (hoje: Date) => DateRange;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Os períodos do Figma (DatePicker: .Period, de 6 a 9 itens). O `DateRangeButton` mostra os seis
|
|
362
|
+
* primeiros; os outros entram pela prop `periods`.
|
|
363
|
+
*/
|
|
364
|
+
declare const DATE_PERIODS: {
|
|
365
|
+
today: {
|
|
366
|
+
label: string;
|
|
367
|
+
range: (hoje: Date) => [Date, Date];
|
|
368
|
+
};
|
|
369
|
+
yesterday: {
|
|
370
|
+
label: string;
|
|
371
|
+
range: (hoje: Date) => [Date, Date];
|
|
372
|
+
};
|
|
373
|
+
last7Days: {
|
|
374
|
+
label: string;
|
|
375
|
+
range: (hoje: Date) => [Date, Date];
|
|
376
|
+
};
|
|
377
|
+
last14Days: {
|
|
378
|
+
label: string;
|
|
379
|
+
range: (hoje: Date) => [Date, Date];
|
|
380
|
+
};
|
|
381
|
+
last30Days: {
|
|
382
|
+
label: string;
|
|
383
|
+
range: (hoje: Date) => [Date, Date];
|
|
384
|
+
};
|
|
385
|
+
thisMonth: {
|
|
386
|
+
label: string;
|
|
387
|
+
range: (hoje: Date) => [Date, Date];
|
|
388
|
+
};
|
|
389
|
+
lastWeek: {
|
|
390
|
+
label: string;
|
|
391
|
+
range: (hoje: Date) => [Date, Date];
|
|
392
|
+
};
|
|
393
|
+
lastMonth: {
|
|
394
|
+
label: string;
|
|
395
|
+
range: (hoje: Date) => [Date, Date];
|
|
396
|
+
};
|
|
397
|
+
thisYear: {
|
|
398
|
+
label: string;
|
|
399
|
+
range: (hoje: Date) => [Date, Date];
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
interface DateRangeButtonChangeEvent {
|
|
404
|
+
/** O período escolhido: [início, fim]. */
|
|
405
|
+
value: DateRange;
|
|
406
|
+
/** O item da lista de períodos, se veio dele (ou se as datas são as dele). */
|
|
407
|
+
period: DateRangePeriod | null;
|
|
408
|
+
}
|
|
409
|
+
interface DateRangeButtonProps {
|
|
410
|
+
/** O período mostrado no botão (controlado). */
|
|
411
|
+
value?: DateRange | null;
|
|
412
|
+
/** O Selecionar do painel (ou, sem o rodapé, o período completo). */
|
|
413
|
+
onChange?: (event: DateRangeButtonChangeEvent) => void;
|
|
414
|
+
/** Rótulo acima do botão (Label no Figma). Sem rótulo, o nome é o texto do botão. */
|
|
415
|
+
label?: string;
|
|
416
|
+
required?: boolean;
|
|
417
|
+
/** Texto do botão sem período. Padrão: "Selecione o período". */
|
|
418
|
+
placeholder?: string;
|
|
419
|
+
/**
|
|
420
|
+
* A lista de períodos do painel (.Period no Figma). Padrão: os seis do Figma (Hoje a Este mês);
|
|
421
|
+
* os outros estão em `DATE_PERIODS`. Com `[]`, o painel fica sem a lista.
|
|
422
|
+
*/
|
|
423
|
+
periods?: DateRangePeriod[];
|
|
424
|
+
/** Rodapé com Fechar e Selecionar. Sem ele, o período vale assim que fica completo. Padrão: true. */
|
|
425
|
+
footer?: boolean;
|
|
426
|
+
/** Meses lado a lado no calendário. Padrão: 2. */
|
|
427
|
+
numberOfMonths?: number;
|
|
428
|
+
minDate?: Date;
|
|
429
|
+
maxDate?: Date;
|
|
430
|
+
disabledDates?: Date[];
|
|
431
|
+
/** Dias de folga (Day Off no Figma): aparecem riscados. */
|
|
432
|
+
offDays?: Date[];
|
|
433
|
+
/** O dia de hoje para os períodos (Hoje, Este mês...). Padrão: a data atual. */
|
|
434
|
+
today?: Date;
|
|
435
|
+
disabled?: boolean;
|
|
436
|
+
/** Vai no <button>. */
|
|
437
|
+
id?: string;
|
|
438
|
+
className?: string;
|
|
439
|
+
style?: CSSProperties;
|
|
440
|
+
}
|
|
441
|
+
declare const DateRangeButton: react.ForwardRefExoticComponent<DateRangeButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
442
|
+
|
|
351
443
|
/** Horizontal Divider e Vertical Divider no Figma. */
|
|
352
444
|
type DividerOrientation = 'horizontal' | 'vertical';
|
|
353
445
|
/** Style no Figma: Solid (Default no vertical) e Dashed. */
|
|
@@ -1080,5 +1172,5 @@ interface ToastProps {
|
|
|
1080
1172
|
}
|
|
1081
1173
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
1082
1174
|
|
|
1083
|
-
export { Accordion, AccordionTab, AutoComplete, Badge, Button, Calendar, Card, Chart, Checkbox, Chip, Column, ContextMenu, DatePicker, 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 };
|
|
1084
|
-
export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CalendarHandle, CalendarProps, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, ColumnProps, ContextMenuHandle, ContextMenuItem, ContextMenuProps, DatePickerHandle, DatePickerProps, DatePickerSize, DatePickerVariant, 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 };
|
|
1175
|
+
export { Accordion, AccordionTab, AutoComplete, Badge, Button, Calendar, Card, Chart, Checkbox, Chip, Column, ContextMenu, DATE_PERIODS, DatePicker, DateRangeButton, 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 };
|
|
1176
|
+
export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CalendarHandle, CalendarProps, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, ColumnProps, ContextMenuHandle, ContextMenuItem, ContextMenuProps, DatePickerHandle, DatePickerProps, DatePickerSize, DatePickerVariant, DateRange, DateRangeButtonChangeEvent, DateRangeButtonProps, DateRangePeriod, 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
|
@@ -348,6 +348,98 @@ declare const DatePicker: <TMode extends CalendarSelectionMode = "single">(props
|
|
|
348
348
|
ref?: Ref<DatePickerHandle>;
|
|
349
349
|
}) => ReactElement;
|
|
350
350
|
|
|
351
|
+
/** Um período: [início, fim], com as duas datas no mesmo dia quando é um dia só. */
|
|
352
|
+
type DateRange = [Date, Date];
|
|
353
|
+
/** Item da lista de períodos do Data Picker (.Period no Figma). */
|
|
354
|
+
interface DateRangePeriod {
|
|
355
|
+
/** Texto do item e do botão ("Este mês"). */
|
|
356
|
+
label: string;
|
|
357
|
+
/** O período, a partir do dia de hoje. */
|
|
358
|
+
range: (hoje: Date) => DateRange;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Os períodos do Figma (DatePicker: .Period, de 6 a 9 itens). O `DateRangeButton` mostra os seis
|
|
362
|
+
* primeiros; os outros entram pela prop `periods`.
|
|
363
|
+
*/
|
|
364
|
+
declare const DATE_PERIODS: {
|
|
365
|
+
today: {
|
|
366
|
+
label: string;
|
|
367
|
+
range: (hoje: Date) => [Date, Date];
|
|
368
|
+
};
|
|
369
|
+
yesterday: {
|
|
370
|
+
label: string;
|
|
371
|
+
range: (hoje: Date) => [Date, Date];
|
|
372
|
+
};
|
|
373
|
+
last7Days: {
|
|
374
|
+
label: string;
|
|
375
|
+
range: (hoje: Date) => [Date, Date];
|
|
376
|
+
};
|
|
377
|
+
last14Days: {
|
|
378
|
+
label: string;
|
|
379
|
+
range: (hoje: Date) => [Date, Date];
|
|
380
|
+
};
|
|
381
|
+
last30Days: {
|
|
382
|
+
label: string;
|
|
383
|
+
range: (hoje: Date) => [Date, Date];
|
|
384
|
+
};
|
|
385
|
+
thisMonth: {
|
|
386
|
+
label: string;
|
|
387
|
+
range: (hoje: Date) => [Date, Date];
|
|
388
|
+
};
|
|
389
|
+
lastWeek: {
|
|
390
|
+
label: string;
|
|
391
|
+
range: (hoje: Date) => [Date, Date];
|
|
392
|
+
};
|
|
393
|
+
lastMonth: {
|
|
394
|
+
label: string;
|
|
395
|
+
range: (hoje: Date) => [Date, Date];
|
|
396
|
+
};
|
|
397
|
+
thisYear: {
|
|
398
|
+
label: string;
|
|
399
|
+
range: (hoje: Date) => [Date, Date];
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
interface DateRangeButtonChangeEvent {
|
|
404
|
+
/** O período escolhido: [início, fim]. */
|
|
405
|
+
value: DateRange;
|
|
406
|
+
/** O item da lista de períodos, se veio dele (ou se as datas são as dele). */
|
|
407
|
+
period: DateRangePeriod | null;
|
|
408
|
+
}
|
|
409
|
+
interface DateRangeButtonProps {
|
|
410
|
+
/** O período mostrado no botão (controlado). */
|
|
411
|
+
value?: DateRange | null;
|
|
412
|
+
/** O Selecionar do painel (ou, sem o rodapé, o período completo). */
|
|
413
|
+
onChange?: (event: DateRangeButtonChangeEvent) => void;
|
|
414
|
+
/** Rótulo acima do botão (Label no Figma). Sem rótulo, o nome é o texto do botão. */
|
|
415
|
+
label?: string;
|
|
416
|
+
required?: boolean;
|
|
417
|
+
/** Texto do botão sem período. Padrão: "Selecione o período". */
|
|
418
|
+
placeholder?: string;
|
|
419
|
+
/**
|
|
420
|
+
* A lista de períodos do painel (.Period no Figma). Padrão: os seis do Figma (Hoje a Este mês);
|
|
421
|
+
* os outros estão em `DATE_PERIODS`. Com `[]`, o painel fica sem a lista.
|
|
422
|
+
*/
|
|
423
|
+
periods?: DateRangePeriod[];
|
|
424
|
+
/** Rodapé com Fechar e Selecionar. Sem ele, o período vale assim que fica completo. Padrão: true. */
|
|
425
|
+
footer?: boolean;
|
|
426
|
+
/** Meses lado a lado no calendário. Padrão: 2. */
|
|
427
|
+
numberOfMonths?: number;
|
|
428
|
+
minDate?: Date;
|
|
429
|
+
maxDate?: Date;
|
|
430
|
+
disabledDates?: Date[];
|
|
431
|
+
/** Dias de folga (Day Off no Figma): aparecem riscados. */
|
|
432
|
+
offDays?: Date[];
|
|
433
|
+
/** O dia de hoje para os períodos (Hoje, Este mês...). Padrão: a data atual. */
|
|
434
|
+
today?: Date;
|
|
435
|
+
disabled?: boolean;
|
|
436
|
+
/** Vai no <button>. */
|
|
437
|
+
id?: string;
|
|
438
|
+
className?: string;
|
|
439
|
+
style?: CSSProperties;
|
|
440
|
+
}
|
|
441
|
+
declare const DateRangeButton: react.ForwardRefExoticComponent<DateRangeButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
442
|
+
|
|
351
443
|
/** Horizontal Divider e Vertical Divider no Figma. */
|
|
352
444
|
type DividerOrientation = 'horizontal' | 'vertical';
|
|
353
445
|
/** Style no Figma: Solid (Default no vertical) e Dashed. */
|
|
@@ -1080,5 +1172,5 @@ interface ToastProps {
|
|
|
1080
1172
|
}
|
|
1081
1173
|
declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<ToastHandle>>;
|
|
1082
1174
|
|
|
1083
|
-
export { Accordion, AccordionTab, AutoComplete, Badge, Button, Calendar, Card, Chart, Checkbox, Chip, Column, ContextMenu, DatePicker, 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 };
|
|
1084
|
-
export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CalendarHandle, CalendarProps, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, ColumnProps, ContextMenuHandle, ContextMenuItem, ContextMenuProps, DatePickerHandle, DatePickerProps, DatePickerSize, DatePickerVariant, 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 };
|
|
1175
|
+
export { Accordion, AccordionTab, AutoComplete, Badge, Button, Calendar, Card, Chart, Checkbox, Chip, Column, ContextMenu, DATE_PERIODS, DatePicker, DateRangeButton, 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 };
|
|
1176
|
+
export type { AccordionProps, AccordionTabProps, AutoCompleteProps, AutoCompleteSize, AutoCompleteVariant, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CalendarHandle, CalendarProps, CardPadding, CardProps, ChartAxis, ChartColor, ChartProps, ChartSeries, CheckboxLabelSize, CheckboxPosition, CheckboxProps, ChipProps, ChipSize, ChipVariant, ColumnProps, ContextMenuHandle, ContextMenuItem, ContextMenuProps, DatePickerHandle, DatePickerProps, DatePickerSize, DatePickerVariant, DateRange, DateRangeButtonChangeEvent, DateRangeButtonProps, DateRangePeriod, 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 };
|