@mlw-packages/react-components 1.10.20 → 1.10.21
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 +6 -3
- package/dist/index.d.mts +30 -8
- package/dist/index.d.ts +30 -8
- package/dist/index.js +446 -222
- package/dist/index.mjs +447 -223
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -558,9 +558,6 @@ body {
|
|
|
558
558
|
.top-1\/2 {
|
|
559
559
|
top: 50%;
|
|
560
560
|
}
|
|
561
|
-
.top-12 {
|
|
562
|
-
top: 3rem;
|
|
563
|
-
}
|
|
564
561
|
.top-14 {
|
|
565
562
|
top: 3.5rem;
|
|
566
563
|
}
|
|
@@ -1050,6 +1047,9 @@ body {
|
|
|
1050
1047
|
.h-2\.5 {
|
|
1051
1048
|
height: 0.625rem;
|
|
1052
1049
|
}
|
|
1050
|
+
.h-2\/3 {
|
|
1051
|
+
height: 66.666667%;
|
|
1052
|
+
}
|
|
1053
1053
|
.h-20 {
|
|
1054
1054
|
height: 5rem;
|
|
1055
1055
|
}
|
|
@@ -5602,6 +5602,9 @@ body {
|
|
|
5602
5602
|
.hover\:text-primary:hover {
|
|
5603
5603
|
color: hsl(var(--primary));
|
|
5604
5604
|
}
|
|
5605
|
+
.hover\:text-primary\/80:hover {
|
|
5606
|
+
color: hsl(var(--primary) / 0.8);
|
|
5607
|
+
}
|
|
5605
5608
|
.hover\:text-primary\/90:hover {
|
|
5606
5609
|
color: hsl(var(--primary) / 0.9);
|
|
5607
5610
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -63,13 +63,21 @@ type ThemeProviderState = {
|
|
|
63
63
|
declare function ThemeProviderBase({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
64
64
|
declare const useTheme: () => ThemeProviderState;
|
|
65
65
|
|
|
66
|
+
type AnimationOrigin = "center" | "top-left" | "top-right" | "cursor";
|
|
66
67
|
type ModeToggleBaseProps = {
|
|
67
68
|
themes?: Theme[];
|
|
68
69
|
className?: string;
|
|
69
70
|
directToggle?: boolean;
|
|
70
71
|
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost";
|
|
72
|
+
showLabel?: boolean;
|
|
73
|
+
tooltip?: boolean | string;
|
|
74
|
+
animationOrigin?: AnimationOrigin;
|
|
75
|
+
transitionDuration?: number;
|
|
76
|
+
storageKey?: string;
|
|
77
|
+
defaultTheme?: Theme;
|
|
78
|
+
onThemeChange?: (theme: Theme) => void;
|
|
71
79
|
};
|
|
72
|
-
declare function ModeToggleBase({ themes, className, directToggle, variant, }: ModeToggleBaseProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
declare function ModeToggleBase({ themes, className, directToggle, variant, showLabel, tooltip, animationOrigin, transitionDuration, storageKey, defaultTheme, onThemeChange, }: ModeToggleBaseProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
73
81
|
|
|
74
82
|
declare const AvatarBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
75
83
|
declare const AvatarImageBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
@@ -930,6 +938,7 @@ interface AgendaViewProps$1 {
|
|
|
930
938
|
showUndatedEvents?: boolean;
|
|
931
939
|
/** When true, hides event times */
|
|
932
940
|
noTime?: boolean;
|
|
941
|
+
onEventCreate?: (startTime: Date) => void;
|
|
933
942
|
}
|
|
934
943
|
declare function Agenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, }: AgendaViewProps$1): react_jsx_runtime.JSX.Element;
|
|
935
944
|
|
|
@@ -988,8 +997,9 @@ interface DayViewProps$1 {
|
|
|
988
997
|
showUndatedEvents?: boolean;
|
|
989
998
|
/** When true, hides event times */
|
|
990
999
|
noTime?: boolean;
|
|
1000
|
+
onEventCreate?: (startTime: Date) => void;
|
|
991
1001
|
}
|
|
992
|
-
declare function DayViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, }: DayViewProps$1): react_jsx_runtime.JSX.Element;
|
|
1002
|
+
declare function DayViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, onEventCreate, }: DayViewProps$1): react_jsx_runtime.JSX.Element;
|
|
993
1003
|
|
|
994
1004
|
interface DroppableCellProps$1 {
|
|
995
1005
|
id: string;
|
|
@@ -1015,13 +1025,14 @@ interface EventCalendarProps$1 {
|
|
|
1015
1025
|
onlyWeek?: boolean;
|
|
1016
1026
|
onlyAgenda?: boolean;
|
|
1017
1027
|
onlyYear?: boolean;
|
|
1028
|
+
allowCellClick?: boolean;
|
|
1018
1029
|
}
|
|
1019
1030
|
interface ModalLikeProps {
|
|
1020
1031
|
event?: CalendarEventAgenda;
|
|
1021
1032
|
onClose?: () => void;
|
|
1022
1033
|
[key: string]: unknown;
|
|
1023
1034
|
}
|
|
1024
|
-
declare function EventAgenda({ events, onEventUpdate, className, initialView, initialDate, onClick, showYearView, noTime, onlyDay, onlyMonth, onlyWeek, onlyAgenda, onlyYear, }: EventCalendarProps$1): react_jsx_runtime.JSX.Element;
|
|
1035
|
+
declare function EventAgenda({ events, onEventUpdate, className, initialView, initialDate, onClick, showYearView, noTime, onlyDay, onlyMonth, onlyWeek, onlyAgenda, onlyYear, allowCellClick, }: EventCalendarProps$1): react_jsx_runtime.JSX.Element;
|
|
1025
1036
|
|
|
1026
1037
|
interface EventItemProps$1 {
|
|
1027
1038
|
event: CalendarEventAgenda;
|
|
@@ -1080,8 +1091,9 @@ interface MonthViewProps$1 {
|
|
|
1080
1091
|
onEventSelect: (event: CalendarEventAgenda, e?: React__default.MouseEvent) => void;
|
|
1081
1092
|
showUndatedEvents?: boolean;
|
|
1082
1093
|
noTime?: boolean;
|
|
1094
|
+
onEventCreate?: (startTime: Date) => void;
|
|
1083
1095
|
}
|
|
1084
|
-
declare function MonthViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, }: MonthViewProps$1): react_jsx_runtime.JSX.Element;
|
|
1096
|
+
declare function MonthViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, onEventCreate, }: MonthViewProps$1): react_jsx_runtime.JSX.Element;
|
|
1085
1097
|
|
|
1086
1098
|
declare function startOfLocalDay(d: Date): Date;
|
|
1087
1099
|
declare function getAutoColorAgenda(id: string): EventColorAgenda;
|
|
@@ -2595,6 +2607,8 @@ interface CommandPaletteProps {
|
|
|
2595
2607
|
alt?: boolean;
|
|
2596
2608
|
};
|
|
2597
2609
|
maxRecentItems?: number;
|
|
2610
|
+
multiSelect?: boolean;
|
|
2611
|
+
onSelectMultiple?: (items: CommandItem[]) => void;
|
|
2598
2612
|
multiSearch?: boolean;
|
|
2599
2613
|
debounceDelay?: number;
|
|
2600
2614
|
footer?: React$1.ReactNode;
|
|
@@ -2628,14 +2642,18 @@ declare function GroupLabel({ group }: {
|
|
|
2628
2642
|
interface CommandItemRowProps {
|
|
2629
2643
|
item: CommandItem;
|
|
2630
2644
|
isActive: boolean;
|
|
2631
|
-
|
|
2645
|
+
isSelected?: boolean;
|
|
2646
|
+
multiSelect?: boolean;
|
|
2647
|
+
onSelect: (e?: React.MouseEvent | React.KeyboardEvent) => void;
|
|
2648
|
+
onToggleSelection?: (e: React.MouseEvent) => void;
|
|
2632
2649
|
onHover: () => void;
|
|
2650
|
+
searchQuery?: string;
|
|
2633
2651
|
}
|
|
2634
|
-
declare function CommandItemRow({ item, isActive, onSelect, onHover, }: CommandItemRowProps): react_jsx_runtime.JSX.Element;
|
|
2652
|
+
declare function CommandItemRow({ item, isActive, isSelected, onSelect, onHover, searchQuery, }: CommandItemRowProps): react_jsx_runtime.JSX.Element;
|
|
2635
2653
|
|
|
2636
2654
|
declare function CommandPalette(props: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
2637
2655
|
|
|
2638
|
-
declare function useCommandPalette({ items, groups, open, onOpenChange, recentItems, onRecentItemsChange, maxRecentItems, multiSearch, }: Partial<CommandPaletteProps>): {
|
|
2656
|
+
declare function useCommandPalette({ items, groups, open, onOpenChange, recentItems, onRecentItemsChange, maxRecentItems, multiSearch, multiSelect, onSelectMultiple, }: Partial<CommandPaletteProps>): {
|
|
2639
2657
|
query: string;
|
|
2640
2658
|
setQuery: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
2641
2659
|
activeIndex: number;
|
|
@@ -2655,7 +2673,11 @@ declare function useCommandPalette({ items, groups, open, onOpenChange, recentIt
|
|
|
2655
2673
|
flatItems: CommandItem[];
|
|
2656
2674
|
totalItems: number;
|
|
2657
2675
|
totalPages: number;
|
|
2658
|
-
handleSelect: (item?: CommandItem) => void;
|
|
2676
|
+
handleSelect: (item?: CommandItem, event?: React$1.MouseEvent | React$1.KeyboardEvent | KeyboardEvent | MouseEvent) => void;
|
|
2677
|
+
selectedItemIds: Set<string>;
|
|
2678
|
+
toggleSelection: (id: string) => void;
|
|
2679
|
+
selectedItems: CommandItem[];
|
|
2680
|
+
executeBulkAction: () => void;
|
|
2659
2681
|
isEmpty: boolean;
|
|
2660
2682
|
showList: boolean;
|
|
2661
2683
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -63,13 +63,21 @@ type ThemeProviderState = {
|
|
|
63
63
|
declare function ThemeProviderBase({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
64
64
|
declare const useTheme: () => ThemeProviderState;
|
|
65
65
|
|
|
66
|
+
type AnimationOrigin = "center" | "top-left" | "top-right" | "cursor";
|
|
66
67
|
type ModeToggleBaseProps = {
|
|
67
68
|
themes?: Theme[];
|
|
68
69
|
className?: string;
|
|
69
70
|
directToggle?: boolean;
|
|
70
71
|
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost";
|
|
72
|
+
showLabel?: boolean;
|
|
73
|
+
tooltip?: boolean | string;
|
|
74
|
+
animationOrigin?: AnimationOrigin;
|
|
75
|
+
transitionDuration?: number;
|
|
76
|
+
storageKey?: string;
|
|
77
|
+
defaultTheme?: Theme;
|
|
78
|
+
onThemeChange?: (theme: Theme) => void;
|
|
71
79
|
};
|
|
72
|
-
declare function ModeToggleBase({ themes, className, directToggle, variant, }: ModeToggleBaseProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
declare function ModeToggleBase({ themes, className, directToggle, variant, showLabel, tooltip, animationOrigin, transitionDuration, storageKey, defaultTheme, onThemeChange, }: ModeToggleBaseProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
73
81
|
|
|
74
82
|
declare const AvatarBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
75
83
|
declare const AvatarImageBase: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
@@ -930,6 +938,7 @@ interface AgendaViewProps$1 {
|
|
|
930
938
|
showUndatedEvents?: boolean;
|
|
931
939
|
/** When true, hides event times */
|
|
932
940
|
noTime?: boolean;
|
|
941
|
+
onEventCreate?: (startTime: Date) => void;
|
|
933
942
|
}
|
|
934
943
|
declare function Agenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, }: AgendaViewProps$1): react_jsx_runtime.JSX.Element;
|
|
935
944
|
|
|
@@ -988,8 +997,9 @@ interface DayViewProps$1 {
|
|
|
988
997
|
showUndatedEvents?: boolean;
|
|
989
998
|
/** When true, hides event times */
|
|
990
999
|
noTime?: boolean;
|
|
1000
|
+
onEventCreate?: (startTime: Date) => void;
|
|
991
1001
|
}
|
|
992
|
-
declare function DayViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, }: DayViewProps$1): react_jsx_runtime.JSX.Element;
|
|
1002
|
+
declare function DayViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, onEventCreate, }: DayViewProps$1): react_jsx_runtime.JSX.Element;
|
|
993
1003
|
|
|
994
1004
|
interface DroppableCellProps$1 {
|
|
995
1005
|
id: string;
|
|
@@ -1015,13 +1025,14 @@ interface EventCalendarProps$1 {
|
|
|
1015
1025
|
onlyWeek?: boolean;
|
|
1016
1026
|
onlyAgenda?: boolean;
|
|
1017
1027
|
onlyYear?: boolean;
|
|
1028
|
+
allowCellClick?: boolean;
|
|
1018
1029
|
}
|
|
1019
1030
|
interface ModalLikeProps {
|
|
1020
1031
|
event?: CalendarEventAgenda;
|
|
1021
1032
|
onClose?: () => void;
|
|
1022
1033
|
[key: string]: unknown;
|
|
1023
1034
|
}
|
|
1024
|
-
declare function EventAgenda({ events, onEventUpdate, className, initialView, initialDate, onClick, showYearView, noTime, onlyDay, onlyMonth, onlyWeek, onlyAgenda, onlyYear, }: EventCalendarProps$1): react_jsx_runtime.JSX.Element;
|
|
1035
|
+
declare function EventAgenda({ events, onEventUpdate, className, initialView, initialDate, onClick, showYearView, noTime, onlyDay, onlyMonth, onlyWeek, onlyAgenda, onlyYear, allowCellClick, }: EventCalendarProps$1): react_jsx_runtime.JSX.Element;
|
|
1025
1036
|
|
|
1026
1037
|
interface EventItemProps$1 {
|
|
1027
1038
|
event: CalendarEventAgenda;
|
|
@@ -1080,8 +1091,9 @@ interface MonthViewProps$1 {
|
|
|
1080
1091
|
onEventSelect: (event: CalendarEventAgenda, e?: React__default.MouseEvent) => void;
|
|
1081
1092
|
showUndatedEvents?: boolean;
|
|
1082
1093
|
noTime?: boolean;
|
|
1094
|
+
onEventCreate?: (startTime: Date) => void;
|
|
1083
1095
|
}
|
|
1084
|
-
declare function MonthViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, }: MonthViewProps$1): react_jsx_runtime.JSX.Element;
|
|
1096
|
+
declare function MonthViewAgenda({ currentDate, events, onEventSelect, showUndatedEvents, noTime, onEventCreate, }: MonthViewProps$1): react_jsx_runtime.JSX.Element;
|
|
1085
1097
|
|
|
1086
1098
|
declare function startOfLocalDay(d: Date): Date;
|
|
1087
1099
|
declare function getAutoColorAgenda(id: string): EventColorAgenda;
|
|
@@ -2595,6 +2607,8 @@ interface CommandPaletteProps {
|
|
|
2595
2607
|
alt?: boolean;
|
|
2596
2608
|
};
|
|
2597
2609
|
maxRecentItems?: number;
|
|
2610
|
+
multiSelect?: boolean;
|
|
2611
|
+
onSelectMultiple?: (items: CommandItem[]) => void;
|
|
2598
2612
|
multiSearch?: boolean;
|
|
2599
2613
|
debounceDelay?: number;
|
|
2600
2614
|
footer?: React$1.ReactNode;
|
|
@@ -2628,14 +2642,18 @@ declare function GroupLabel({ group }: {
|
|
|
2628
2642
|
interface CommandItemRowProps {
|
|
2629
2643
|
item: CommandItem;
|
|
2630
2644
|
isActive: boolean;
|
|
2631
|
-
|
|
2645
|
+
isSelected?: boolean;
|
|
2646
|
+
multiSelect?: boolean;
|
|
2647
|
+
onSelect: (e?: React.MouseEvent | React.KeyboardEvent) => void;
|
|
2648
|
+
onToggleSelection?: (e: React.MouseEvent) => void;
|
|
2632
2649
|
onHover: () => void;
|
|
2650
|
+
searchQuery?: string;
|
|
2633
2651
|
}
|
|
2634
|
-
declare function CommandItemRow({ item, isActive, onSelect, onHover, }: CommandItemRowProps): react_jsx_runtime.JSX.Element;
|
|
2652
|
+
declare function CommandItemRow({ item, isActive, isSelected, onSelect, onHover, searchQuery, }: CommandItemRowProps): react_jsx_runtime.JSX.Element;
|
|
2635
2653
|
|
|
2636
2654
|
declare function CommandPalette(props: CommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
2637
2655
|
|
|
2638
|
-
declare function useCommandPalette({ items, groups, open, onOpenChange, recentItems, onRecentItemsChange, maxRecentItems, multiSearch, }: Partial<CommandPaletteProps>): {
|
|
2656
|
+
declare function useCommandPalette({ items, groups, open, onOpenChange, recentItems, onRecentItemsChange, maxRecentItems, multiSearch, multiSelect, onSelectMultiple, }: Partial<CommandPaletteProps>): {
|
|
2639
2657
|
query: string;
|
|
2640
2658
|
setQuery: React$1.Dispatch<React$1.SetStateAction<string>>;
|
|
2641
2659
|
activeIndex: number;
|
|
@@ -2655,7 +2673,11 @@ declare function useCommandPalette({ items, groups, open, onOpenChange, recentIt
|
|
|
2655
2673
|
flatItems: CommandItem[];
|
|
2656
2674
|
totalItems: number;
|
|
2657
2675
|
totalPages: number;
|
|
2658
|
-
handleSelect: (item?: CommandItem) => void;
|
|
2676
|
+
handleSelect: (item?: CommandItem, event?: React$1.MouseEvent | React$1.KeyboardEvent | KeyboardEvent | MouseEvent) => void;
|
|
2677
|
+
selectedItemIds: Set<string>;
|
|
2678
|
+
toggleSelection: (id: string) => void;
|
|
2679
|
+
selectedItems: CommandItem[];
|
|
2680
|
+
executeBulkAction: () => void;
|
|
2659
2681
|
isEmpty: boolean;
|
|
2660
2682
|
showList: boolean;
|
|
2661
2683
|
};
|