@mlw-packages/react-components 1.5.6 → 1.5.7
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.css +382 -56
- package/dist/index.d.mts +172 -111
- package/dist/index.d.ts +172 -111
- package/dist/index.js +1901 -3134
- package/dist/index.mjs +1935 -3196
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -347,6 +347,16 @@ declare const LabelBase: React$1.ForwardRefExoticComponent<Omit<React$1.Detailed
|
|
|
347
347
|
testid?: string;
|
|
348
348
|
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
349
349
|
|
|
350
|
+
declare const loadingVariants: (props?: ({
|
|
351
|
+
size?: "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
352
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
353
|
+
interface LoadingBaseProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof loadingVariants> {
|
|
354
|
+
message?: string;
|
|
355
|
+
overlay?: boolean;
|
|
356
|
+
variant?: "spinner" | "dots";
|
|
357
|
+
}
|
|
358
|
+
declare const LoadingBase: React$1.ForwardRefExoticComponent<LoadingBaseProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
359
|
+
|
|
350
360
|
declare function NavigationMenuBase({ className, children, viewport, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
351
361
|
viewport?: boolean;
|
|
352
362
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -565,30 +575,40 @@ interface DateTimePickerProps {
|
|
|
565
575
|
date: Date | undefined;
|
|
566
576
|
onChange: (date: Date | undefined) => void;
|
|
567
577
|
hideSeconds?: boolean;
|
|
578
|
+
hideHour?: boolean;
|
|
579
|
+
hideMinute?: boolean;
|
|
568
580
|
fromDate?: Date;
|
|
569
581
|
toDate?: Date;
|
|
570
582
|
disabled?: boolean;
|
|
571
|
-
|
|
583
|
+
className?: string;
|
|
572
584
|
}
|
|
573
|
-
declare function DateTimePicker({ label, date, onChange, hideSeconds, fromDate, toDate, disabled,
|
|
585
|
+
declare function DateTimePicker({ label, date, onChange, hideSeconds, hideHour, hideMinute, fromDate, toDate, disabled, className, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
574
586
|
|
|
575
587
|
interface TimePickerProps {
|
|
576
588
|
date: Date | undefined;
|
|
577
589
|
setDate: (date: Date | undefined) => void;
|
|
578
590
|
hideSeconds?: boolean;
|
|
591
|
+
enableButton?: boolean;
|
|
579
592
|
}
|
|
580
|
-
declare function TimePicker({ date, setDate, hideSeconds }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
593
|
+
declare function TimePicker({ date, setDate, hideSeconds, enableButton, }: TimePickerProps): react_jsx_runtime.JSX.Element;
|
|
581
594
|
|
|
582
595
|
type TimePickerType = "minutes" | "seconds" | "hours" | "12hours";
|
|
583
596
|
type Period = "AM" | "PM";
|
|
584
597
|
|
|
585
|
-
interface TimePickerInputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
598
|
+
interface TimePickerInputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
586
599
|
picker: TimePickerType;
|
|
587
600
|
date: Date | undefined;
|
|
588
601
|
setDate: (date: Date | undefined) => void;
|
|
589
602
|
period?: Period;
|
|
590
603
|
onRightFocus?: () => void;
|
|
591
604
|
onLeftFocus?: () => void;
|
|
605
|
+
showArrows?: boolean;
|
|
606
|
+
label?: string;
|
|
607
|
+
error?: boolean;
|
|
608
|
+
inputSize?: "sm" | "md" | "lg";
|
|
609
|
+
enableButton?: boolean;
|
|
610
|
+
buttonText?: string;
|
|
611
|
+
buttonIcon?: React__default.ReactNode;
|
|
592
612
|
}
|
|
593
613
|
declare const TimePickerInput: React__default.ForwardRefExoticComponent<TimePickerInputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
594
614
|
|
|
@@ -685,124 +705,165 @@ interface DestructiveDialogProps {
|
|
|
685
705
|
}
|
|
686
706
|
declare const DestructiveDialog: React$1.FC<DestructiveDialogProps>;
|
|
687
707
|
|
|
688
|
-
interface
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
708
|
+
interface Props$4 {
|
|
709
|
+
processedData: Array<{
|
|
710
|
+
name: string;
|
|
711
|
+
}>;
|
|
712
|
+
onOpenPeriod: (periodName: string) => void;
|
|
713
|
+
rightOffset?: number;
|
|
714
|
+
topOffset?: number;
|
|
715
|
+
activePeriod?: string;
|
|
716
|
+
activePeriods?: string[];
|
|
717
|
+
}
|
|
718
|
+
declare function PeriodsDropdown({ processedData, onOpenPeriod, rightOffset, topOffset, activePeriod, activePeriods, }: Props$4): react_jsx_runtime.JSX.Element;
|
|
719
|
+
|
|
720
|
+
interface Props$3 {
|
|
721
|
+
showOnlyHighlighted: boolean;
|
|
722
|
+
setShowOnlyHighlighted: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
723
|
+
highlightedSeriesSize: number;
|
|
724
|
+
clearHighlights: () => void;
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* ShowOnly
|
|
728
|
+
* - Botão principal alterna entre mostrar somente os itens destacados ou mostrar todos
|
|
729
|
+
* - Botão secundário limpa os destaques quando houver algum
|
|
730
|
+
* - Acessibilidade: aria-pressed, aria-labels e estados desabilitados
|
|
731
|
+
*/
|
|
732
|
+
declare const ShowOnly: React__default.FC<Props$3>;
|
|
733
|
+
|
|
734
|
+
interface MapperEntry {
|
|
735
|
+
label?: string;
|
|
736
|
+
formatter?: (value: string | number) => string | number;
|
|
737
|
+
color?: string;
|
|
738
|
+
type?: string;
|
|
739
|
+
visible?: boolean;
|
|
740
|
+
}
|
|
741
|
+
interface Props$2 {
|
|
742
|
+
allKeys: string[];
|
|
743
|
+
mapperConfig: Record<string, MapperEntry>;
|
|
744
|
+
finalColors: Record<string, string>;
|
|
745
|
+
highlightedSeries: Set<string>;
|
|
746
|
+
toggleHighlight: (key: string) => void;
|
|
747
|
+
containerWidth?: number;
|
|
748
|
+
}
|
|
749
|
+
declare const Highlights: React__default.FC<Props$2>;
|
|
750
|
+
|
|
751
|
+
interface CloseAllButtonProps {
|
|
752
|
+
count: number;
|
|
753
|
+
onCloseAll: () => void;
|
|
754
|
+
position?: "top-left" | "top-right" | "top-center";
|
|
755
|
+
variant?: "floating" | "inline";
|
|
756
|
+
}
|
|
757
|
+
declare const CloseAllButton: React__default.FC<CloseAllButtonProps>;
|
|
758
|
+
|
|
759
|
+
interface TooltipData {
|
|
711
760
|
name: string;
|
|
712
|
-
value: number;
|
|
713
761
|
[key: string]: string | number;
|
|
714
762
|
}
|
|
715
|
-
interface
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
height?: number;
|
|
719
|
-
width?: number | string;
|
|
720
|
-
colors?: string[];
|
|
721
|
-
showTooltip?: boolean;
|
|
722
|
-
showLegend?: boolean;
|
|
723
|
-
showLabels?: boolean;
|
|
724
|
-
innerRadius?: number;
|
|
725
|
-
outerRadius?: number;
|
|
726
|
-
centerX?: string | number;
|
|
727
|
-
centerY?: string | number;
|
|
728
|
-
}
|
|
729
|
-
declare const CustomPieChart: React__default.FC<CustomPieChartProps>;
|
|
730
|
-
|
|
731
|
-
interface BarChartData {
|
|
732
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
763
|
+
interface Position$1 {
|
|
764
|
+
top: number;
|
|
765
|
+
left: number;
|
|
733
766
|
}
|
|
734
|
-
interface
|
|
767
|
+
interface DraggableTooltipProps {
|
|
768
|
+
id: string;
|
|
769
|
+
data: TooltipData;
|
|
770
|
+
position: Position$1;
|
|
771
|
+
isDragging?: boolean;
|
|
772
|
+
title?: string;
|
|
773
|
+
dataKeys: string[];
|
|
774
|
+
finalColors: Record<string, string>;
|
|
775
|
+
onMouseDown?: (id: string, e: React__default.MouseEvent) => void;
|
|
776
|
+
onClose: (id: string) => void;
|
|
777
|
+
periodLabel?: string;
|
|
778
|
+
dataLabel?: string;
|
|
779
|
+
showCloseAllButton?: boolean;
|
|
780
|
+
globalTooltipCount?: number;
|
|
781
|
+
onCloseAll?: () => void;
|
|
782
|
+
closeAllButtonPosition?: "top-left" | "top-right" | "top-center";
|
|
783
|
+
closeAllButtonVariant?: "floating" | "inline";
|
|
784
|
+
onPositionChange?: (id: string, position: Position$1) => void;
|
|
785
|
+
highlightedSeries?: Set<string>;
|
|
786
|
+
toggleHighlight?: (key: string) => void;
|
|
787
|
+
showOnlyHighlighted?: boolean;
|
|
788
|
+
}
|
|
789
|
+
declare const DraggableTooltip: React__default.NamedExoticComponent<DraggableTooltipProps>;
|
|
790
|
+
|
|
791
|
+
type TooltipPayloadItem$1 = {
|
|
735
792
|
dataKey: string;
|
|
793
|
+
value: number;
|
|
794
|
+
name: string;
|
|
795
|
+
color?: string;
|
|
796
|
+
};
|
|
797
|
+
interface Props$1 {
|
|
798
|
+
active?: boolean;
|
|
799
|
+
payload?: TooltipPayloadItem$1[];
|
|
736
800
|
label?: string;
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
interface DataMapper {
|
|
741
|
-
[dataKey: string]: {
|
|
742
|
-
label?: string;
|
|
743
|
-
formatter?: (value: string | number) => string | number;
|
|
744
|
-
color?: string;
|
|
745
|
-
type?: "number" | "string" | "auto";
|
|
746
|
-
visible?: boolean;
|
|
747
|
-
};
|
|
748
|
-
}
|
|
749
|
-
interface BarChartProps {
|
|
750
|
-
data: BarChartData[];
|
|
751
|
-
className?: string;
|
|
752
|
-
height?: number;
|
|
753
|
-
width?: number | string;
|
|
754
|
-
colors?: string[];
|
|
755
|
-
gridColor?: string;
|
|
756
|
-
showGrid?: boolean;
|
|
757
|
-
showTooltip?: boolean;
|
|
758
|
-
showLegend?: boolean;
|
|
759
|
-
title?: string;
|
|
760
|
-
titlePosition?: "left" | "center" | "right";
|
|
761
|
-
showLabels?: boolean;
|
|
762
|
-
labelMap?: Record<string, string>;
|
|
763
|
-
xAxis?: XAxisConfig$1 | string;
|
|
764
|
-
mapper?: DataMapper | string[];
|
|
765
|
-
yAxis?: DataMapper | string[];
|
|
766
|
-
autoDetect?: boolean;
|
|
801
|
+
finalColors?: Record<string, string>;
|
|
802
|
+
periodLabel?: string;
|
|
803
|
+
totalLabel?: string;
|
|
767
804
|
}
|
|
768
|
-
declare const
|
|
805
|
+
declare const RechartTooltipWithTotal: React__default.FC<Props$1>;
|
|
769
806
|
|
|
770
|
-
|
|
771
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
772
|
-
}
|
|
773
|
-
interface XAxisConfig {
|
|
807
|
+
type TooltipPayloadItem = {
|
|
774
808
|
dataKey: string;
|
|
809
|
+
value: number;
|
|
810
|
+
name: string;
|
|
811
|
+
color?: string;
|
|
812
|
+
};
|
|
813
|
+
interface Props {
|
|
814
|
+
active?: boolean;
|
|
815
|
+
payload?: TooltipPayloadItem[];
|
|
775
816
|
label?: string;
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
817
|
+
finalColors?: Record<string, string>;
|
|
818
|
+
periodLabel?: string;
|
|
819
|
+
}
|
|
820
|
+
declare const TooltipSimple: React__default.FC<Props>;
|
|
821
|
+
|
|
822
|
+
declare const formatFieldName: (fieldName: string) => string;
|
|
823
|
+
declare const detectDataFields: (data: Record<string, unknown>[], xAxisKey: string) => string[];
|
|
824
|
+
declare const detectXAxis: (data: Record<string, unknown>[]) => string;
|
|
825
|
+
declare const generateAdditionalColors: (baseColors: string[], count: number) => string[];
|
|
826
|
+
declare const niceCeil: (value: number) => number;
|
|
827
|
+
declare const compactTick: (value: number) => string;
|
|
828
|
+
type Padding = number | Partial<{
|
|
829
|
+
left: number;
|
|
830
|
+
right: number;
|
|
831
|
+
top: number;
|
|
832
|
+
bottom: number;
|
|
833
|
+
}>;
|
|
834
|
+
type Margins = Partial<{
|
|
835
|
+
top: number;
|
|
836
|
+
right: number;
|
|
837
|
+
left: number;
|
|
838
|
+
bottom: number;
|
|
839
|
+
}>;
|
|
840
|
+
declare const resolveContainerPaddingLeft: (padding?: Padding, containerPaddingLeft?: number, defaultLeft?: number) => number;
|
|
841
|
+
declare const resolveChartMargins: (margins?: Margins, chartMargins?: Margins, showLabels?: boolean) => {
|
|
842
|
+
top: number;
|
|
843
|
+
right: number;
|
|
844
|
+
left: number;
|
|
845
|
+
bottom: number;
|
|
783
846
|
};
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
847
|
+
|
|
848
|
+
type Variant = "filled" | "outline" | "soft";
|
|
849
|
+
type LabelRendererProps = {
|
|
850
|
+
x?: number | string;
|
|
851
|
+
y?: number | string;
|
|
852
|
+
value?: number | string;
|
|
853
|
+
index?: number;
|
|
854
|
+
payload?: unknown;
|
|
789
855
|
width?: number | string;
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
enableShowOnly?: boolean;
|
|
802
|
-
enablePeriodsDropdown?: boolean;
|
|
803
|
-
enableDraggableTooltips?: boolean;
|
|
804
|
-
}
|
|
805
|
-
declare const Chart: React__default.FC<ChartProps>;
|
|
856
|
+
height?: number | string;
|
|
857
|
+
viewBox?: {
|
|
858
|
+
x?: number;
|
|
859
|
+
y?: number;
|
|
860
|
+
width?: number;
|
|
861
|
+
height?: number;
|
|
862
|
+
} | Record<string, unknown> | undefined;
|
|
863
|
+
cx?: number | string;
|
|
864
|
+
cy?: number | string;
|
|
865
|
+
};
|
|
866
|
+
declare const renderPillLabel: (color: string, variant: Variant) => (props: LabelRendererProps) => react_jsx_runtime.JSX.Element;
|
|
806
867
|
|
|
807
868
|
declare function useIsMobile(): boolean;
|
|
808
869
|
|
|
@@ -823,4 +884,4 @@ declare const useDrag: (options?: UseDragOptions) => {
|
|
|
823
884
|
isDragging: boolean;
|
|
824
885
|
};
|
|
825
886
|
|
|
826
|
-
export { AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BadgeBase,
|
|
887
|
+
export { AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BadgeBase, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, type CalendarProps, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPrevious, CheckboxBase, CloseAllButton, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, DateTimePicker, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LoadingBase, type Margins, ModeToggleBase, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, type Padding, PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, ScrollAreaBase, ScrollBarBase, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UseSideBarBase, badgeVariants, buttonVariantsBase, compactTick, detectDataFields, detectXAxis, formatFieldName, generateAdditionalColors, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, toast, useDrag, useIsMobile, useTheme };
|