@mlw-packages/react-components 1.5.4 → 1.5.6

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.d.ts CHANGED
@@ -685,6 +685,142 @@ interface DestructiveDialogProps {
685
685
  }
686
686
  declare const DestructiveDialog: React$1.FC<DestructiveDialogProps>;
687
687
 
688
+ interface LineChartData {
689
+ name: string;
690
+ [key: string]: string | number;
691
+ }
692
+ interface CustomLineChartProps {
693
+ data?: LineChartData[];
694
+ className?: string;
695
+ height?: number;
696
+ width?: number | string;
697
+ colors?: string[];
698
+ gridColor?: string;
699
+ showGrid?: boolean;
700
+ showTooltip?: boolean;
701
+ showLegend?: boolean;
702
+ title?: string;
703
+ titlePosition?: "left" | "center" | "right";
704
+ strokeWidth?: number;
705
+ showDots?: boolean;
706
+ showLabels?: boolean;
707
+ }
708
+ declare const CustomLineChart: React__default.FC<CustomLineChartProps>;
709
+
710
+ interface PieChartData {
711
+ name: string;
712
+ value: number;
713
+ [key: string]: string | number;
714
+ }
715
+ interface CustomPieChartProps {
716
+ data?: PieChartData[];
717
+ className?: string;
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;
733
+ }
734
+ interface XAxisConfig$1 {
735
+ dataKey: string;
736
+ label?: string;
737
+ formatter?: (value: string | number) => string;
738
+ autoLabel?: boolean;
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;
767
+ }
768
+ declare const BarChart: React__default.FC<BarChartProps>;
769
+
770
+ interface ChartData {
771
+ [key: string]: string | number | boolean | null | undefined;
772
+ }
773
+ interface XAxisConfig {
774
+ dataKey: string;
775
+ label?: string;
776
+ formatter?: (value: string | number) => string;
777
+ autoLabel?: boolean;
778
+ }
779
+ type SeriesProp = {
780
+ bar?: string[];
781
+ line?: string[];
782
+ area?: string[];
783
+ };
784
+ interface ChartProps {
785
+ data: ChartData[];
786
+ series?: SeriesProp;
787
+ className?: string;
788
+ height?: number;
789
+ width?: number | string;
790
+ colors?: string[];
791
+ gridColor?: string;
792
+ showGrid?: boolean;
793
+ showTooltip?: boolean;
794
+ showLegend?: boolean;
795
+ title?: string;
796
+ titlePosition?: "left" | "center" | "right";
797
+ showLabels?: boolean;
798
+ labelMap?: Record<string, string>;
799
+ xAxis: XAxisConfig | string;
800
+ enableHighlights?: boolean;
801
+ enableShowOnly?: boolean;
802
+ enablePeriodsDropdown?: boolean;
803
+ enableDraggableTooltips?: boolean;
804
+ }
805
+ declare const Chart: React__default.FC<ChartProps>;
806
+
688
807
  declare function useIsMobile(): boolean;
689
808
 
690
- 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, 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, 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, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, ModeToggleBase, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, 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, 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, TooltipTriggerBase, UseSideBarBase, badgeVariants, buttonVariantsBase, toast, useIsMobile, useTheme };
809
+ interface Position {
810
+ top: number;
811
+ left: number;
812
+ }
813
+ interface UseDragOptions {
814
+ onDragStart?: (id: string) => void;
815
+ onDragEnd?: (id: string) => void;
816
+ onDrag?: (id: string, position: Position) => void;
817
+ }
818
+ declare const useDrag: (options?: UseDragOptions) => {
819
+ handleMouseDown: (id: string, e: React.MouseEvent) => void;
820
+ getPosition: (id: string) => Position;
821
+ setPosition: (id: string, position: Position) => void;
822
+ isElementDragging: (id: string) => boolean;
823
+ isDragging: boolean;
824
+ };
825
+
826
+ export { AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, BadgeBase, BarChart, 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, Chart, CheckboxBase, 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, 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, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, CustomLineChart as LineChart, ModeToggleBase, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, CustomPieChart as PieChart, 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, 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, TooltipTriggerBase, UseSideBarBase, badgeVariants, buttonVariantsBase, toast, useDrag, useIsMobile, useTheme };