@mlw-packages/react-components 1.10.19 → 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 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
  }
@@ -1206,9 +1206,6 @@ body {
1206
1206
  .max-h-\[300px\] {
1207
1207
  max-height: 300px;
1208
1208
  }
1209
- .max-h-\[460px\] {
1210
- max-height: 460px;
1211
- }
1212
1209
  .max-h-\[95vh\] {
1213
1210
  max-height: 95vh;
1214
1211
  }
@@ -1218,6 +1215,9 @@ body {
1218
1215
  .max-h-\[calc\(100vh-200px\)\] {
1219
1216
  max-height: calc(100vh - 200px);
1220
1217
  }
1218
+ .max-h-\[calc\(85dvh-80px\)\] {
1219
+ max-height: calc(85dvh - 80px);
1220
+ }
1221
1221
  .max-h-\[var\(--radix-context-menu-content-available-height\)\] {
1222
1222
  max-height: var(--radix-context-menu-content-available-height);
1223
1223
  }
@@ -2210,6 +2210,10 @@ body {
2210
2210
  border-top-left-radius: 1rem;
2211
2211
  border-top-right-radius: 1rem;
2212
2212
  }
2213
+ .rounded-t-\[10px\] {
2214
+ border-top-left-radius: 10px;
2215
+ border-top-right-radius: 10px;
2216
+ }
2213
2217
  .rounded-t-lg {
2214
2218
  border-top-left-radius: var(--radius);
2215
2219
  border-top-right-radius: var(--radius);
@@ -2871,6 +2875,9 @@ body {
2871
2875
  .bg-muted-foreground\/20 {
2872
2876
  background-color: hsl(var(--muted-foreground) / 0.2);
2873
2877
  }
2878
+ .bg-muted-foreground\/30 {
2879
+ background-color: hsl(var(--muted-foreground) / 0.3);
2880
+ }
2874
2881
  .bg-muted\/10 {
2875
2882
  background-color: hsl(var(--muted) / 0.1);
2876
2883
  }
@@ -3127,6 +3134,9 @@ body {
3127
3134
  .bg-gradient-to-r {
3128
3135
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
3129
3136
  }
3137
+ .bg-gradient-to-t {
3138
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
3139
+ }
3130
3140
  .from-amber-400 {
3131
3141
  --tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);
3132
3142
  --tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);
@@ -3152,6 +3162,11 @@ body {
3152
3162
  --tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);
3153
3163
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
3154
3164
  }
3165
+ .from-card {
3166
+ --tw-gradient-from: hsl(var(--card)) var(--tw-gradient-from-position);
3167
+ --tw-gradient-to: hsl(var(--card) / 0) var(--tw-gradient-to-position);
3168
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
3169
+ }
3155
3170
  .from-cyan-400 {
3156
3171
  --tw-gradient-from: #22d3ee var(--tw-gradient-from-position);
3157
3172
  --tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);
@@ -3433,6 +3448,9 @@ body {
3433
3448
  .to-teal-500 {
3434
3449
  --tw-gradient-to: #14b8a6 var(--tw-gradient-to-position);
3435
3450
  }
3451
+ .to-transparent {
3452
+ --tw-gradient-to: transparent var(--tw-gradient-to-position);
3453
+ }
3436
3454
  .to-violet-600 {
3437
3455
  --tw-gradient-to: #7c3aed var(--tw-gradient-to-position);
3438
3456
  }
@@ -3758,8 +3776,8 @@ body {
3758
3776
  .pt-2 {
3759
3777
  padding-top: 0.5rem;
3760
3778
  }
3761
- .pt-2\.5 {
3762
- padding-top: 0.625rem;
3779
+ .pt-3 {
3780
+ padding-top: 0.75rem;
3763
3781
  }
3764
3782
  .pt-4 {
3765
3783
  padding-top: 1rem;
@@ -4839,6 +4857,12 @@ body {
4839
4857
  .ease-out {
4840
4858
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
4841
4859
  }
4860
+ .\!running {
4861
+ animation-play-state: running !important;
4862
+ }
4863
+ .running {
4864
+ animation-play-state: running;
4865
+ }
4842
4866
  .\[-ms-overflow-style\:none\] {
4843
4867
  -ms-overflow-style: none;
4844
4868
  }
@@ -5578,6 +5602,9 @@ body {
5578
5602
  .hover\:text-primary:hover {
5579
5603
  color: hsl(var(--primary));
5580
5604
  }
5605
+ .hover\:text-primary\/80:hover {
5606
+ color: hsl(var(--primary) / 0.8);
5607
+ }
5581
5608
  .hover\:text-primary\/90:hover {
5582
5609
  color: hsl(var(--primary) / 0.9);
5583
5610
  }
@@ -8027,6 +8054,9 @@ body {
8027
8054
  .\[\&\:\:-webkit-scrollbar-thumb\]\:bg-muted-foreground\/30::-webkit-scrollbar-thumb {
8028
8055
  background-color: hsl(var(--muted-foreground) / 0.3);
8029
8056
  }
8057
+ .\[\&\:\:-webkit-scrollbar-thumb\]\:bg-primary\/20::-webkit-scrollbar-thumb {
8058
+ background-color: hsl(var(--primary) / 0.2);
8059
+ }
8030
8060
  .hover\:\[\&\:\:-webkit-scrollbar-thumb\]\:bg-muted-foreground\/40::-webkit-scrollbar-thumb:hover {
8031
8061
  background-color: hsl(var(--muted-foreground) / 0.4);
8032
8062
  }
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
- onSelect: () => void;
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
- onSelect: () => void;
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
  };