laif-ds 0.1.71 → 0.1.72

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.
Files changed (32) hide show
  1. package/dist/_virtual/index.js +3 -5
  2. package/dist/_virtual/index2.js +2 -5
  3. package/dist/_virtual/index3.js +2 -5
  4. package/dist/_virtual/index4.js +7 -2
  5. package/dist/_virtual/index5.js +5 -2
  6. package/dist/_virtual/isoWeek.js +8 -0
  7. package/dist/_virtual/isoWeek2.js +5 -0
  8. package/dist/_virtual/it.js +3 -0
  9. package/dist/_virtual/it2.js +5 -0
  10. package/dist/_virtual/lodash.js +6 -0
  11. package/dist/_virtual/lodash2.js +5 -0
  12. package/dist/components/ui/tooltip.js +61 -30
  13. package/dist/components/ui/weekly-calendar/appointment-card.js +97 -0
  14. package/dist/components/ui/weekly-calendar/calendar-context.js +35 -0
  15. package/dist/components/ui/weekly-calendar/calendar-header.js +73 -0
  16. package/dist/components/ui/weekly-calendar/current-timeline.js +26 -0
  17. package/dist/components/ui/weekly-calendar/day-column.js +108 -0
  18. package/dist/components/ui/weekly-calendar/time-column.js +34 -0
  19. package/dist/components/ui/weekly-calendar/weekly-calendar.js +120 -0
  20. package/dist/index.d.ts +48 -1
  21. package/dist/index.js +110 -104
  22. package/dist/lib/utils.js +27 -5
  23. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
  24. package/dist/node_modules/dayjs/locale/it.js +22 -0
  25. package/dist/node_modules/dayjs/plugin/isoWeek.js +34 -0
  26. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  27. package/dist/node_modules/lodash/lodash.js +3678 -0
  28. package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
  29. package/dist/node_modules/unified/lib/index.js +1 -1
  30. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  31. package/dist/styles.v3.css +1 -1
  32. package/package.json +1 -1
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import { jsx as f, jsxs as y } from "react/jsx-runtime";
3
+ import d from "react";
4
+ import a from "../../../_virtual/dayjs.min.js";
5
+ import N from "../../../_virtual/isoWeek.js";
6
+ import { CalendarProvider as h } from "./calendar-context.js";
7
+ import { CalendarHeader as B } from "./calendar-header.js";
8
+ import { TimeColumn as C } from "./time-column.js";
9
+ import { DayColumn as V } from "./day-column.js";
10
+ import { CurrentTimeLine as z } from "./current-timeline.js";
11
+ a.extend(N);
12
+ const L = [
13
+ { key: "monday", label: "Lunedì", dayjs: 1 },
14
+ { key: "tuesday", label: "Martedì", dayjs: 2 },
15
+ { key: "wednesday", label: "Mercoledì", dayjs: 3 },
16
+ { key: "thursday", label: "Giovedì", dayjs: 4 },
17
+ { key: "friday", label: "Venerdì", dayjs: 5 },
18
+ { key: "saturday", label: "Sabato", dayjs: 6 },
19
+ { key: "sunday", label: "Domenica", dayjs: 0 }
20
+ ];
21
+ function Q({
22
+ appointments: l = [],
23
+ onWeekChange: r,
24
+ initialWeekOffset: D = 0,
25
+ showNavigation: M = !0,
26
+ customActions: w,
27
+ enableGrouping: i = !1,
28
+ groupLabel: O,
29
+ calendarStartHour: W = 8,
30
+ calendarEndHour: p = 20,
31
+ todayString: b = "Oggi"
32
+ }) {
33
+ const [o, m] = d.useState(D), x = d.useMemo(
34
+ () => a().startOf("isoWeek").add(o, "week").format("YYYY-MM-DD"),
35
+ [o]
36
+ ), j = d.useMemo(
37
+ () => a().startOf("isoWeek").add(o, "week").endOf("isoWeek").format("YYYY-MM-DD"),
38
+ [o]
39
+ ), k = d.useMemo(() => {
40
+ const e = [], t = a().startOf("isoWeek").add(o, "week");
41
+ for (let s = 0; s < 7; s++)
42
+ e.push(t.add(s, "day"));
43
+ return e;
44
+ }, [o]), v = o === 0, n = d.useMemo(() => {
45
+ const e = {};
46
+ return l.forEach((t) => {
47
+ const s = t.date;
48
+ e[s] || (e[s] = []), e[s].push(t);
49
+ }), e;
50
+ }, [l]), E = d.useMemo(() => {
51
+ const e = {};
52
+ return Object.keys(n).forEach((t) => {
53
+ const s = n[t];
54
+ if (!i)
55
+ e[t] = { default: s };
56
+ else {
57
+ const c = {};
58
+ s.forEach((Y) => {
59
+ const u = Y.groupBy || "Senza categoria";
60
+ c[u] || (c[u] = []), c[u].push(Y);
61
+ }), e[t] = c;
62
+ }
63
+ }), e;
64
+ }, [n, i]), S = d.useCallback(() => {
65
+ const e = o - 1;
66
+ if (m(e), r) {
67
+ const t = a().startOf("isoWeek").add(e, "week").format("YYYY-MM-DD"), s = a().startOf("isoWeek").add(e, "week").endOf("isoWeek").format("YYYY-MM-DD");
68
+ r(e, t, s);
69
+ }
70
+ }, [o, r]), T = d.useCallback(() => {
71
+ const e = o + 1;
72
+ if (m(e), r) {
73
+ const t = a().startOf("isoWeek").add(e, "week").format("YYYY-MM-DD"), s = a().startOf("isoWeek").add(e, "week").endOf("isoWeek").format("YYYY-MM-DD");
74
+ r(e, t, s);
75
+ }
76
+ }, [o, r]), A = d.useCallback(() => {
77
+ if (m(0), r) {
78
+ const t = a().startOf("isoWeek").format("YYYY-MM-DD"), s = a().endOf("isoWeek").format("YYYY-MM-DD");
79
+ r(0, t, s);
80
+ }
81
+ }, [r]);
82
+ return /* @__PURE__ */ f(h, { value: {
83
+ calendarStartHour: W,
84
+ calendarEndHour: p,
85
+ currentWeekOffset: o,
86
+ weekStart: x,
87
+ weekEnd: j,
88
+ weekDates: k,
89
+ isCurrentWeek: v,
90
+ goToPreviousWeek: S,
91
+ goToNextWeek: T,
92
+ goToCurrentWeek: A,
93
+ appointments: l,
94
+ appointmentsByDay: n,
95
+ groupedAppointmentsByDay: E,
96
+ enableGrouping: i,
97
+ groupLabel: O,
98
+ showNavigation: M,
99
+ customActions: w,
100
+ onWeekChange: r,
101
+ todayString: b
102
+ }, children: /* @__PURE__ */ y("div", { className: "flex h-full flex-col", children: [
103
+ /* @__PURE__ */ f(B, {}),
104
+ /* @__PURE__ */ y("div", { className: "border-d-border relative flex flex-1 border-t border-l", children: [
105
+ /* @__PURE__ */ f(C, {}),
106
+ /* @__PURE__ */ f(z, {}),
107
+ /* @__PURE__ */ f("div", { className: "flex flex-1 overflow-x-auto", children: k.map((e, t) => /* @__PURE__ */ f(
108
+ V,
109
+ {
110
+ date: e,
111
+ weekdayInfo: L[t]
112
+ },
113
+ e.format("YYYY-MM-DD")
114
+ )) })
115
+ ] })
116
+ ] }) });
117
+ }
118
+ export {
119
+ Q as WeeklyCalendar
120
+ };
package/dist/index.d.ts CHANGED
@@ -264,6 +264,23 @@ export declare const buttonVariants: (props?: ({
264
264
 
265
265
  export declare function Calendar({ className, classNames, showOutsideDays, ...props }: React_2.ComponentProps<typeof DayPicker>): JSX.Element;
266
266
 
267
+ export declare interface CalendarAppointment {
268
+ id: number;
269
+ title: string;
270
+ description?: string;
271
+ date: string;
272
+ startTime: string;
273
+ endTime?: string;
274
+ color?: string;
275
+ attributes?: {
276
+ key: string;
277
+ value: default_3.ReactNode;
278
+ showPreview?: boolean;
279
+ }[];
280
+ className?: string;
281
+ groupBy?: string;
282
+ }
283
+
267
284
  export declare function Card({ className, size, ...props }: CardProps): JSX.Element;
268
285
 
269
286
  export declare function CardContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
@@ -845,6 +862,10 @@ declare type GanttProps = {
845
862
  treeTitle?: string;
846
863
  };
847
864
 
865
+ export declare const hexContrast: (hex: string) => string;
866
+
867
+ export declare const hexToRgba: (hex: string, alpha: number) => string;
868
+
848
869
  export declare function HoverCard({ ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Root>): JSX.Element;
849
870
 
850
871
  export declare function HoverCardContent({ className, align, sideOffset, ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Content>): JSX.Element;
@@ -1519,6 +1540,8 @@ declare interface SourcePart {
1519
1540
  type: "source";
1520
1541
  }
1521
1542
 
1543
+ export declare const stringToHexColor: (str: string) => string;
1544
+
1522
1545
  export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
1523
1546
 
1524
1547
  export declare function Table({ className, ...props }: React_2.ComponentProps<"table">): JSX.Element;
@@ -1606,12 +1629,19 @@ declare interface ToolResult {
1606
1629
 
1607
1630
  export declare function Tooltip({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Root>): JSX.Element;
1608
1631
 
1609
- export declare function TooltipContent({ className, sideOffset, children, ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Content>): JSX.Element;
1632
+ export declare function TooltipContent({ className, sideOffset, variant, children, ...props }: TooltipContentProps): JSX.Element;
1633
+
1634
+ declare interface TooltipContentProps extends React_2.ComponentProps<typeof TooltipPrimitive.Content>, VariantProps<typeof tooltipVariants> {
1635
+ }
1610
1636
 
1611
1637
  export declare function TooltipProvider({ delayDuration, ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Provider>): JSX.Element;
1612
1638
 
1613
1639
  export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Trigger>): JSX.Element;
1614
1640
 
1641
+ declare const tooltipVariants: (props?: ({
1642
+ variant?: "primary" | "card" | null | undefined;
1643
+ } & ClassProp) | undefined) => string;
1644
+
1615
1645
  declare type TransformedDataType<T> = {
1616
1646
  [P in keyof T as Exclude<P, "children">]: T[P];
1617
1647
  };
@@ -1690,4 +1720,21 @@ export declare function useIsMobile(): boolean;
1690
1720
 
1691
1721
  export declare function useSidebar(): SidebarContextProps;
1692
1722
 
1723
+ export declare function WeeklyCalendar({ appointments, onWeekChange, initialWeekOffset, showNavigation, customActions, enableGrouping, groupLabel, calendarStartHour, calendarEndHour, todayString, }: WeeklyCalendarProps): JSX.Element;
1724
+
1725
+ export declare interface WeeklyCalendarProps {
1726
+ appointments: CalendarAppointment[];
1727
+ onWeekChange?: (weekOffset: number, weekStart: string, weekEnd: string) => void;
1728
+ initialWeekOffset?: number;
1729
+ className?: string;
1730
+ showNavigation?: boolean;
1731
+ showWeekIndicator?: boolean;
1732
+ customActions?: default_3.ReactNode;
1733
+ enableGrouping?: boolean;
1734
+ groupLabel?: string;
1735
+ calendarStartHour?: number;
1736
+ calendarEndHour?: number;
1737
+ todayString?: string;
1738
+ }
1739
+
1693
1740
  export { }
package/dist/index.js CHANGED
@@ -3,72 +3,72 @@ import { default as o } from "./components/ui/gantt/components/Gantt/Gantt.js";
3
3
  import { AspectRatio as a } from "./components/ui/aspect-ratio.js";
4
4
  import { Avatar as i, AvatarFallback as p, AvatarImage as m } from "./components/ui/avatar.js";
5
5
  import { Badge as u, badgeVariants as x } from "./components/ui/badge.js";
6
- import { Button as g, buttonVariants as b } from "./components/ui/button.js";
6
+ import { Button as g, buttonVariants as C } from "./components/ui/button.js";
7
7
  import { Checkbox as f } from "./components/ui/checkbox.js";
8
8
  import { Collapsible as S, CollapsibleContent as M, CollapsibleTrigger as c } from "./components/ui/collapsible.js";
9
9
  import { CopyButton as D } from "./components/ui/copy-button.js";
10
10
  import { Icon as A } from "./components/ui/icon.js";
11
- import { Input as h } from "./components/ui/input.js";
11
+ import { Input as P } from "./components/ui/input.js";
12
12
  import { InputOTP as F, InputOTPGroup as w, InputOTPSlot as G } from "./components/ui/input-otp.js";
13
13
  import { Label as B } from "./components/ui/label.js";
14
14
  import { Progress as H } from "./components/ui/progress.js";
15
- import { RadioGroup as N, RadioGroupItem as y } from "./components/ui/radio-group.js";
15
+ import { RadioGroup as y, RadioGroupItem as N } from "./components/ui/radio-group.js";
16
16
  import { Separator as V } from "./components/ui/separator.js";
17
17
  import { Skeleton as O } from "./components/ui/skeleton.js";
18
- import { Switch as q } from "./components/ui/switch.js";
19
- import { Textarea as K } from "./components/ui/textarea.js";
20
- import { Toggle as U, toggleVariants as W } from "./components/ui/toggle.js";
18
+ import { Switch as j } from "./components/ui/switch.js";
19
+ import { Textarea as J } from "./components/ui/textarea.js";
20
+ import { Toggle as Q, toggleVariants as U } from "./components/ui/toggle.js";
21
21
  import { Tooltip as Y, TooltipContent as Z, TooltipProvider as _, TooltipTrigger as $ } from "./components/ui/tooltip.js";
22
22
  import { TypingIndicator as re } from "./components/ui/typing-indicator.js";
23
23
  import { Toaster as te } from "./components/ui/toaster.js";
24
24
  import { Accordion as ne, AccordionContent as ie, AccordionItem as pe, AccordionTrigger as me } from "./components/ui/accordion.js";
25
25
  import { Alert as ue, AlertDescription as xe, AlertTitle as de } from "./components/ui/alert.js";
26
- import { AlertDialog as be, AlertDialogAction as Ce, AlertDialogCancel as fe, AlertDialogContent as se, AlertDialogDescription as Se, AlertDialogFooter as Me, AlertDialogHeader as ce, AlertDialogTitle as Te, AlertDialogTrigger as De } from "./components/ui/alert-dialog.js";
26
+ import { AlertDialog as Ce, AlertDialogAction as be, AlertDialogCancel as fe, AlertDialogContent as se, AlertDialogDescription as Se, AlertDialogFooter as Me, AlertDialogHeader as ce, AlertDialogTitle as Te, AlertDialogTrigger as De } from "./components/ui/alert-dialog.js";
27
27
  import { AsyncSelect as Ae } from "./components/ui/async-select.js";
28
- import { Calendar as he } from "./components/ui/calendar.js";
28
+ import { Calendar as Pe } from "./components/ui/calendar.js";
29
29
  import { Card as Fe, CardContent as we, CardDescription as Ge, CardFooter as Le, CardHeader as Be, CardTitle as Re } from "./components/ui/card.js";
30
30
  import { Typo as ke } from "./components/ui/typo.js";
31
- import { Command as ye, CommandDialog as ze, CommandEmpty as Ve, CommandGroup as Ee, CommandInput as Oe, CommandItem as je, CommandList as qe, CommandSeparator as Je, CommandShortcut as Ke } from "./components/ui/command.js";
32
- import { ContextMenu as Ue, ContextMenuCheckboxItem as We, ContextMenuContent as Xe, ContextMenuGroup as Ye, ContextMenuItem as Ze, ContextMenuLabel as _e, ContextMenuPortal as $e, ContextMenuRadioGroup as er, ContextMenuRadioItem as rr, ContextMenuSeparator as or, ContextMenuShortcut as tr, ContextMenuSub as ar, ContextMenuSubContent as nr, ContextMenuSubTrigger as ir, ContextMenuTrigger as pr } from "./components/ui/context-menu.js";
31
+ import { Command as Ne, CommandDialog as ze, CommandEmpty as Ve, CommandGroup as Ee, CommandInput as Oe, CommandItem as We, CommandList as je, CommandSeparator as qe, CommandShortcut as Je } from "./components/ui/command.js";
32
+ import { ContextMenu as Qe, ContextMenuCheckboxItem as Ue, ContextMenuContent as Xe, ContextMenuGroup as Ye, ContextMenuItem as Ze, ContextMenuLabel as _e, ContextMenuPortal as $e, ContextMenuRadioGroup as er, ContextMenuRadioItem as rr, ContextMenuSeparator as or, ContextMenuShortcut as tr, ContextMenuSub as ar, ContextMenuSubContent as nr, ContextMenuSubTrigger as ir, ContextMenuTrigger as pr } from "./components/ui/context-menu.js";
33
33
  import { DatePicker as lr } from "./components/ui/date-picker.js";
34
34
  import { InputSelector as xr } from "./components/ui/input-selector.js";
35
- import { Dialog as gr, DialogContent as br, DialogDescription as Cr, DialogFooter as fr, DialogHeader as sr, DialogTitle as Sr, DialogTrigger as Mr } from "./components/ui/dialog.js";
36
- import { Drawer as Tr, DrawerContent as Dr, DrawerDescription as Ir, DrawerFooter as Ar, DrawerHeader as Pr, DrawerTitle as hr, DrawerTrigger as vr } from "./components/ui/drawer.js";
37
- import { Form as wr, FormControl as Gr, FormDescription as Lr, FormField as Br, FormItem as Rr, FormLabel as Hr, FormMessage as kr, useFormField as Nr } from "./components/ui/form.js";
35
+ import { Dialog as gr, DialogContent as Cr, DialogDescription as br, DialogFooter as fr, DialogHeader as sr, DialogTitle as Sr, DialogTrigger as Mr } from "./components/ui/dialog.js";
36
+ import { Drawer as Tr, DrawerContent as Dr, DrawerDescription as Ir, DrawerFooter as Ar, DrawerHeader as hr, DrawerTitle as Pr, DrawerTrigger as vr } from "./components/ui/drawer.js";
37
+ import { Form as wr, FormControl as Gr, FormDescription as Lr, FormField as Br, FormItem as Rr, FormLabel as Hr, FormMessage as kr, useFormField as yr } from "./components/ui/form.js";
38
38
  import { HoverCard as zr, HoverCardContent as Vr, HoverCardTrigger as Er } from "./components/ui/hover-card.js";
39
- import { Menubar as jr, MenubarCheckboxItem as qr, MenubarContent as Jr, MenubarGroup as Kr, MenubarItem as Qr, MenubarLabel as Ur, MenubarMenu as Wr, MenubarPortal as Xr, MenubarRadioGroup as Yr, MenubarRadioItem as Zr, MenubarSeparator as _r, MenubarShortcut as $r, MenubarSub as eo, MenubarSubContent as ro, MenubarSubTrigger as oo, MenubarTrigger as to } from "./components/ui/menubar.js";
39
+ import { Menubar as Wr, MenubarCheckboxItem as jr, MenubarContent as qr, MenubarGroup as Jr, MenubarItem as Kr, MenubarLabel as Qr, MenubarMenu as Ur, MenubarPortal as Xr, MenubarRadioGroup as Yr, MenubarRadioItem as Zr, MenubarSeparator as _r, MenubarShortcut as $r, MenubarSub as eo, MenubarSubContent as ro, MenubarSubTrigger as oo, MenubarTrigger as to } from "./components/ui/menubar.js";
40
40
  import { MultipleSelector as no } from "./components/ui/multiple-selector.js";
41
- import { Pagination as po, PaginationContent as mo, PaginationEllipsis as lo, PaginationItem as uo, PaginationLink as xo, PaginationNext as go, PaginationPrevious as bo } from "./components/ui/pagination.js";
41
+ import { Pagination as po, PaginationContent as mo, PaginationEllipsis as lo, PaginationItem as uo, PaginationLink as xo, PaginationNext as go, PaginationPrevious as Co } from "./components/ui/pagination.js";
42
42
  import { Popover as fo, PopoverContent as so, PopoverTrigger as So } from "./components/ui/popover.js";
43
43
  import { PromptSuggestions as co } from "./components/ui/prompt-suggestions.js";
44
44
  import { ResizableHandle as Do, ResizablePanel as Io, ResizablePanelGroup as Ao } from "./components/ui/resizable.js";
45
- import { ScrollArea as ho, ScrollBar as vo } from "./components/ui/scroll-area.js";
46
- import { Select as wo, SelectContent as Go, SelectGroup as Lo, SelectItem as Bo, SelectLabel as Ro, SelectSeparator as Ho, SelectTrigger as ko, SelectValue as No } from "./components/ui/select.js";
47
- import { Sheet as zo, SheetContent as Vo, SheetDescription as Eo, SheetFooter as Oo, SheetHeader as jo, SheetTitle as qo, SheetTrigger as Jo } from "./components/ui/sheet.js";
48
- import { Table as Qo, TableBody as Uo, TableCaption as Wo, TableCell as Xo, TableFooter as Yo, TableHead as Zo, TableHeader as _o, TableRow as $o } from "./components/ui/table.js";
45
+ import { ScrollArea as Po, ScrollBar as vo } from "./components/ui/scroll-area.js";
46
+ import { Select as wo, SelectContent as Go, SelectGroup as Lo, SelectItem as Bo, SelectLabel as Ro, SelectSeparator as Ho, SelectTrigger as ko, SelectValue as yo } from "./components/ui/select.js";
47
+ import { Sheet as zo, SheetContent as Vo, SheetDescription as Eo, SheetFooter as Oo, SheetHeader as Wo, SheetTitle as jo, SheetTrigger as qo } from "./components/ui/sheet.js";
48
+ import { Table as Ko, TableBody as Qo, TableCaption as Uo, TableCell as Xo, TableFooter as Yo, TableHead as Zo, TableHeader as _o, TableRow as $o } from "./components/ui/table.js";
49
49
  import { Tabs as rt, TabsContent as ot, TabsList as tt, TabsTrigger as at } from "./components/ui/tabs.js";
50
50
  import { ToggleGroup as it, ToggleGroupItem as pt } from "./components/ui/toggle-group.js";
51
- import { Breadcrumb as lt, BreadcrumbEllipsis as ut, BreadcrumbItem as xt, BreadcrumbLink as dt, BreadcrumbList as gt, BreadcrumbPage as bt, BreadcrumbSeparator as Ct } from "./components/ui/breadcrumb.js";
51
+ import { Breadcrumb as lt, BreadcrumbEllipsis as ut, BreadcrumbItem as xt, BreadcrumbLink as dt, BreadcrumbList as gt, BreadcrumbPage as Ct, BreadcrumbSeparator as bt } from "./components/ui/breadcrumb.js";
52
52
  import { Slider as st } from "./components/ui/slider.js";
53
53
  import { CircularProgress as Mt } from "./components/ui/charts/circular.js";
54
54
  import { ThemeSwitcher as Tt } from "./components/ui/theme-switcher.js";
55
- import { DropdownMenu as It, DropdownMenuContent as At, DropdownMenuItem as Pt, DropdownMenuLabel as ht, DropdownMenuSeparator as vt, DropdownMenuTrigger as Ft } from "./components/ui/dropdown-menu.js";
55
+ import { DropdownMenu as It, DropdownMenuContent as At, DropdownMenuItem as ht, DropdownMenuLabel as Pt, DropdownMenuSeparator as vt, DropdownMenuTrigger as Ft } from "./components/ui/dropdown-menu.js";
56
56
  import { AudioVisualizer as Gt } from "./components/ui/audio-visualizer.js";
57
- import { Carousel as Bt, CarouselContent as Rt, CarouselItem as Ht, CarouselNext as kt, CarouselPrevious as Nt } from "./components/ui/carousel.js";
58
- import { ChartContainer as zt, ChartLegend as Vt, ChartLegendContent as Et, ChartStyle as Ot, ChartTooltip as jt, ChartTooltipContent as qt } from "./components/ui/chart.js";
59
- import { Chat as Kt, ChatContainer as Qt, ChatForm as Ut, ChatMessages as Wt } from "./components/ui/chat.js";
57
+ import { Carousel as Bt, CarouselContent as Rt, CarouselItem as Ht, CarouselNext as kt, CarouselPrevious as yt } from "./components/ui/carousel.js";
58
+ import { ChartContainer as zt, ChartLegend as Vt, ChartLegendContent as Et, ChartStyle as Ot, ChartTooltip as Wt, ChartTooltipContent as jt } from "./components/ui/chart.js";
59
+ import { Chat as Jt, ChatContainer as Kt, ChatForm as Qt, ChatMessages as Ut } from "./components/ui/chat.js";
60
60
  import { ChatMessage as Yt } from "./components/ui/chat-message.js";
61
61
  import { FilePreview as _t } from "./components/ui/file-preview.js";
62
62
  import { InterruptPrompt as ea } from "./components/ui/interrupt-prompt.js";
63
63
  import { MarkdownRenderer as oa } from "./components/ui/markdown-renderer.js";
64
64
  import { MessageInput as aa } from "./components/ui/message-input.js";
65
65
  import { MessageList as ia } from "./components/ui/message-list.js";
66
- import { NavigationMenu as ma, NavigationMenuContent as la, NavigationMenuIndicator as ua, NavigationMenuItem as xa, NavigationMenuLink as da, NavigationMenuList as ga, NavigationMenuTrigger as ba, NavigationMenuViewport as Ca } from "./components/ui/navigation-menu.js";
67
- import { Sidebar as sa, SidebarContent as Sa, SidebarFooter as Ma, SidebarGroup as ca, SidebarGroupAction as Ta, SidebarGroupContent as Da, SidebarGroupLabel as Ia, SidebarHeader as Aa, SidebarInput as Pa, SidebarInset as ha, SidebarMenu as va, SidebarMenuAction as Fa, SidebarMenuBadge as wa, SidebarMenuButton as Ga, SidebarMenuItem as La, SidebarMenuSkeleton as Ba, SidebarMenuSub as Ra, SidebarMenuSubButton as Ha, SidebarMenuSubItem as ka, SidebarProvider as Na, SidebarRail as ya, SidebarSeparator as za, SidebarTrigger as Va, useSidebar as Ea } from "./components/ui/sidebar.js";
68
- import { DataTable as ja } from "./components/ui/data-table.js";
69
- import { ELogicalFilterOperator as Ja } from "./components/ui/data-table.service.js";
70
- import { GanttDimensions as Qa } from "./components/ui/gantt/enums/GanttDimensions.js";
71
- import { GanttConsts as Wa } from "./components/ui/gantt/constants/GanttConsts.js";
66
+ import { NavigationMenu as ma, NavigationMenuContent as la, NavigationMenuIndicator as ua, NavigationMenuItem as xa, NavigationMenuLink as da, NavigationMenuList as ga, NavigationMenuTrigger as Ca, NavigationMenuViewport as ba } from "./components/ui/navigation-menu.js";
67
+ import { Sidebar as sa, SidebarContent as Sa, SidebarFooter as Ma, SidebarGroup as ca, SidebarGroupAction as Ta, SidebarGroupContent as Da, SidebarGroupLabel as Ia, SidebarHeader as Aa, SidebarInput as ha, SidebarInset as Pa, SidebarMenu as va, SidebarMenuAction as Fa, SidebarMenuBadge as wa, SidebarMenuButton as Ga, SidebarMenuItem as La, SidebarMenuSkeleton as Ba, SidebarMenuSub as Ra, SidebarMenuSubButton as Ha, SidebarMenuSubItem as ka, SidebarProvider as ya, SidebarRail as Na, SidebarSeparator as za, SidebarTrigger as Va, useSidebar as Ea } from "./components/ui/sidebar.js";
68
+ import { DataTable as Wa } from "./components/ui/data-table.js";
69
+ import { ELogicalFilterOperator as qa } from "./components/ui/data-table.service.js";
70
+ import { GanttDimensions as Ka } from "./components/ui/gantt/enums/GanttDimensions.js";
71
+ import { GanttConsts as Ua } from "./components/ui/gantt/constants/GanttConsts.js";
72
72
  import { DragStepSizes as Ya } from "./components/ui/gantt/enums/DragStepSizes.js";
73
73
  import { DataRepeatTypes as _a } from "./components/ui/gantt/enums/DataRepeatTimes.js";
74
74
  import { AppSidebar as en } from "./components/ui/app-sidebar.js";
@@ -77,13 +77,15 @@ import { AppSelect as nn } from "./components/ui/app-select.js";
77
77
  import { AppMultipleSelectDropdown as mn } from "./components/ui/app-multiple-select-dropdown.js";
78
78
  import { DataCrossTable as un } from "./components/ui/tables/data-cross-table/data-cross-table.js";
79
79
  import { DataCrossTableButtonsGroup as dn } from "./components/ui/tables/data-cross-table/data-cross-table-buttons.js";
80
- import { DataCrossTableProvider as bn } from "./components/ui/tables/data-cross-table/data-cross-table-context.js";
81
- import { useAudioRecording as fn } from "./hooks/use-audio-recording.js";
82
- import { useAutoScroll as Sn } from "./hooks/use-auto-scroll.js";
83
- import { useAutosizeTextArea as cn } from "./hooks/use-autosize-textarea.js";
84
- import { useCopyToClipboard as Dn } from "./hooks/use-copy-to-clipboard.js";
85
- import { useDebounce as An } from "./hooks/use-debounce.js";
86
- import { useIsMobile as hn } from "./hooks/use-mobile.js";
80
+ import { DataCrossTableProvider as Cn } from "./components/ui/tables/data-cross-table/data-cross-table-context.js";
81
+ import { WeeklyCalendar as fn } from "./components/ui/weekly-calendar/weekly-calendar.js";
82
+ import { hexContrast as Sn, hexToRgba as Mn, stringToHexColor as cn } from "./lib/utils.js";
83
+ import { useAudioRecording as Dn } from "./hooks/use-audio-recording.js";
84
+ import { useAutoScroll as An } from "./hooks/use-auto-scroll.js";
85
+ import { useAutosizeTextArea as Pn } from "./hooks/use-autosize-textarea.js";
86
+ import { useCopyToClipboard as Fn } from "./hooks/use-copy-to-clipboard.js";
87
+ import { useDebounce as Gn } from "./hooks/use-debounce.js";
88
+ import { useIsMobile as Bn } from "./hooks/use-mobile.js";
87
89
  export {
88
90
  ne as Accordion,
89
91
  ie as AccordionContent,
@@ -91,8 +93,8 @@ export {
91
93
  me as AccordionTrigger,
92
94
  ue as Alert,
93
95
  xe as AlertDescription,
94
- be as AlertDialog,
95
- Ce as AlertDialogAction,
96
+ Ce as AlertDialog,
97
+ be as AlertDialogAction,
96
98
  fe as AlertDialogCancel,
97
99
  se as AlertDialogContent,
98
100
  Se as AlertDialogDescription,
@@ -116,10 +118,10 @@ export {
116
118
  xt as BreadcrumbItem,
117
119
  dt as BreadcrumbLink,
118
120
  gt as BreadcrumbList,
119
- bt as BreadcrumbPage,
120
- Ct as BreadcrumbSeparator,
121
+ Ct as BreadcrumbPage,
122
+ bt as BreadcrumbSeparator,
121
123
  g as Button,
122
- he as Calendar,
124
+ Pe as Calendar,
123
125
  Fe as Card,
124
126
  we as CardContent,
125
127
  Ge as CardDescription,
@@ -130,35 +132,35 @@ export {
130
132
  Rt as CarouselContent,
131
133
  Ht as CarouselItem,
132
134
  kt as CarouselNext,
133
- Nt as CarouselPrevious,
135
+ yt as CarouselPrevious,
134
136
  zt as ChartContainer,
135
137
  Vt as ChartLegend,
136
138
  Et as ChartLegendContent,
137
139
  Ot as ChartStyle,
138
- jt as ChartTooltip,
139
- qt as ChartTooltipContent,
140
- Kt as Chat,
141
- Qt as ChatContainer,
142
- Ut as ChatForm,
140
+ Wt as ChartTooltip,
141
+ jt as ChartTooltipContent,
142
+ Jt as Chat,
143
+ Kt as ChatContainer,
144
+ Qt as ChatForm,
143
145
  Yt as ChatMessage,
144
- Wt as ChatMessages,
146
+ Ut as ChatMessages,
145
147
  f as Checkbox,
146
148
  Mt as CircularProgress,
147
149
  S as Collapsible,
148
150
  M as CollapsibleContent,
149
151
  c as CollapsibleTrigger,
150
- ye as Command,
152
+ Ne as Command,
151
153
  ze as CommandDialog,
152
154
  Ve as CommandEmpty,
153
155
  Ee as CommandGroup,
154
156
  Oe as CommandInput,
155
- je as CommandItem,
156
- qe as CommandList,
157
- Je as CommandSeparator,
158
- Ke as CommandShortcut,
157
+ We as CommandItem,
158
+ je as CommandList,
159
+ qe as CommandSeparator,
160
+ Je as CommandShortcut,
159
161
  on as Confirmer,
160
- Ue as ContextMenu,
161
- We as ContextMenuCheckboxItem,
162
+ Qe as ContextMenu,
163
+ Ue as ContextMenuCheckboxItem,
162
164
  Xe as ContextMenuContent,
163
165
  Ye as ContextMenuGroup,
164
166
  Ze as ContextMenuItem,
@@ -175,13 +177,13 @@ export {
175
177
  D as CopyButton,
176
178
  un as DataCrossTable,
177
179
  dn as DataCrossTableButtonsGroup,
178
- bn as DataCrossTableProvider,
180
+ Cn as DataCrossTableProvider,
179
181
  _a as DataRepeatTypes,
180
- ja as DataTable,
182
+ Wa as DataTable,
181
183
  lr as DatePicker,
182
184
  gr as Dialog,
183
- br as DialogContent,
184
- Cr as DialogDescription,
185
+ Cr as DialogContent,
186
+ br as DialogDescription,
185
187
  fr as DialogFooter,
186
188
  sr as DialogHeader,
187
189
  Sr as DialogTitle,
@@ -191,16 +193,16 @@ export {
191
193
  Dr as DrawerContent,
192
194
  Ir as DrawerDescription,
193
195
  Ar as DrawerFooter,
194
- Pr as DrawerHeader,
195
- hr as DrawerTitle,
196
+ hr as DrawerHeader,
197
+ Pr as DrawerTitle,
196
198
  vr as DrawerTrigger,
197
199
  It as DropdownMenu,
198
200
  At as DropdownMenuContent,
199
- Pt as DropdownMenuItem,
200
- ht as DropdownMenuLabel,
201
+ ht as DropdownMenuItem,
202
+ Pt as DropdownMenuLabel,
201
203
  vt as DropdownMenuSeparator,
202
204
  Ft as DropdownMenuTrigger,
203
- Ja as ELogicalFilterOperator,
205
+ qa as ELogicalFilterOperator,
204
206
  _t as FilePreview,
205
207
  wr as Form,
206
208
  Gr as FormControl,
@@ -210,13 +212,13 @@ export {
210
212
  Hr as FormLabel,
211
213
  kr as FormMessage,
212
214
  o as Gantt,
213
- Wa as GanttConsts,
214
- Qa as GanttDimensions,
215
+ Ua as GanttConsts,
216
+ Ka as GanttDimensions,
215
217
  zr as HoverCard,
216
218
  Vr as HoverCardContent,
217
219
  Er as HoverCardTrigger,
218
220
  A as Icon,
219
- h as Input,
221
+ P as Input,
220
222
  F as InputOTP,
221
223
  w as InputOTPGroup,
222
224
  G as InputOTPSlot,
@@ -224,13 +226,13 @@ export {
224
226
  ea as InterruptPrompt,
225
227
  B as Label,
226
228
  oa as MarkdownRenderer,
227
- jr as Menubar,
228
- qr as MenubarCheckboxItem,
229
- Jr as MenubarContent,
230
- Kr as MenubarGroup,
231
- Qr as MenubarItem,
232
- Ur as MenubarLabel,
233
- Wr as MenubarMenu,
229
+ Wr as Menubar,
230
+ jr as MenubarCheckboxItem,
231
+ qr as MenubarContent,
232
+ Jr as MenubarGroup,
233
+ Kr as MenubarItem,
234
+ Qr as MenubarLabel,
235
+ Ur as MenubarMenu,
234
236
  Xr as MenubarPortal,
235
237
  Yr as MenubarRadioGroup,
236
238
  Zr as MenubarRadioItem,
@@ -249,26 +251,26 @@ export {
249
251
  xa as NavigationMenuItem,
250
252
  da as NavigationMenuLink,
251
253
  ga as NavigationMenuList,
252
- ba as NavigationMenuTrigger,
253
- Ca as NavigationMenuViewport,
254
+ Ca as NavigationMenuTrigger,
255
+ ba as NavigationMenuViewport,
254
256
  po as Pagination,
255
257
  mo as PaginationContent,
256
258
  lo as PaginationEllipsis,
257
259
  uo as PaginationItem,
258
260
  xo as PaginationLink,
259
261
  go as PaginationNext,
260
- bo as PaginationPrevious,
262
+ Co as PaginationPrevious,
261
263
  fo as Popover,
262
264
  so as PopoverContent,
263
265
  So as PopoverTrigger,
264
266
  H as Progress,
265
267
  co as PromptSuggestions,
266
- N as RadioGroup,
267
- y as RadioGroupItem,
268
+ y as RadioGroup,
269
+ N as RadioGroupItem,
268
270
  Do as ResizableHandle,
269
271
  Io as ResizablePanel,
270
272
  Ao as ResizablePanelGroup,
271
- ho as ScrollArea,
273
+ Po as ScrollArea,
272
274
  vo as ScrollBar,
273
275
  wo as Select,
274
276
  Go as SelectContent,
@@ -277,15 +279,15 @@ export {
277
279
  Ro as SelectLabel,
278
280
  Ho as SelectSeparator,
279
281
  ko as SelectTrigger,
280
- No as SelectValue,
282
+ yo as SelectValue,
281
283
  V as Separator,
282
284
  zo as Sheet,
283
285
  Vo as SheetContent,
284
286
  Eo as SheetDescription,
285
287
  Oo as SheetFooter,
286
- jo as SheetHeader,
287
- qo as SheetTitle,
288
- Jo as SheetTrigger,
288
+ Wo as SheetHeader,
289
+ jo as SheetTitle,
290
+ qo as SheetTrigger,
289
291
  sa as Sidebar,
290
292
  Sa as SidebarContent,
291
293
  Ma as SidebarFooter,
@@ -294,8 +296,8 @@ export {
294
296
  Da as SidebarGroupContent,
295
297
  Ia as SidebarGroupLabel,
296
298
  Aa as SidebarHeader,
297
- Pa as SidebarInput,
298
- ha as SidebarInset,
299
+ ha as SidebarInput,
300
+ Pa as SidebarInset,
299
301
  va as SidebarMenu,
300
302
  Fa as SidebarMenuAction,
301
303
  wa as SidebarMenuBadge,
@@ -305,16 +307,16 @@ export {
305
307
  Ra as SidebarMenuSub,
306
308
  Ha as SidebarMenuSubButton,
307
309
  ka as SidebarMenuSubItem,
308
- Na as SidebarProvider,
309
- ya as SidebarRail,
310
+ ya as SidebarProvider,
311
+ Na as SidebarRail,
310
312
  za as SidebarSeparator,
311
313
  Va as SidebarTrigger,
312
314
  O as Skeleton,
313
315
  st as Slider,
314
- q as Switch,
315
- Qo as Table,
316
- Uo as TableBody,
317
- Wo as TableCaption,
316
+ j as Switch,
317
+ Ko as Table,
318
+ Qo as TableBody,
319
+ Uo as TableCaption,
318
320
  Xo as TableCell,
319
321
  Yo as TableFooter,
320
322
  Zo as TableHead,
@@ -324,10 +326,10 @@ export {
324
326
  ot as TabsContent,
325
327
  tt as TabsList,
326
328
  at as TabsTrigger,
327
- K as Textarea,
329
+ J as Textarea,
328
330
  Tt as ThemeSwitcher,
329
331
  te as Toaster,
330
- U as Toggle,
332
+ Q as Toggle,
331
333
  it as ToggleGroup,
332
334
  pt as ToggleGroupItem,
333
335
  Y as Tooltip,
@@ -336,16 +338,20 @@ export {
336
338
  $ as TooltipTrigger,
337
339
  re as TypingIndicator,
338
340
  ke as Typo,
341
+ fn as WeeklyCalendar,
339
342
  x as badgeVariants,
340
- b as buttonVariants,
343
+ C as buttonVariants,
341
344
  tn as confirm,
342
- W as toggleVariants,
343
- fn as useAudioRecording,
344
- Sn as useAutoScroll,
345
- cn as useAutosizeTextArea,
346
- Dn as useCopyToClipboard,
347
- An as useDebounce,
348
- Nr as useFormField,
349
- hn as useIsMobile,
345
+ Sn as hexContrast,
346
+ Mn as hexToRgba,
347
+ cn as stringToHexColor,
348
+ U as toggleVariants,
349
+ Dn as useAudioRecording,
350
+ An as useAutoScroll,
351
+ Pn as useAutosizeTextArea,
352
+ Fn as useCopyToClipboard,
353
+ Gn as useDebounce,
354
+ yr as useFormField,
355
+ Bn as useIsMobile,
350
356
  Ea as useSidebar
351
357
  };
package/dist/lib/utils.js CHANGED
@@ -1,9 +1,31 @@
1
1
  "use client";
2
- import { clsx as t } from "../node_modules/clsx/dist/clsx.js";
3
- import { twMerge as e } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
4
- function c(...r) {
5
- return e(t(r));
2
+ import { clsx as l } from "../node_modules/clsx/dist/clsx.js";
3
+ import { twMerge as m } from "../node_modules/tailwind-merge/dist/bundle-mjs.js";
4
+ function p(...e) {
5
+ return m(l(e));
6
6
  }
7
+ const x = (e) => {
8
+ if (!e) return "#777777";
9
+ let t = 0;
10
+ for (let s = 0; s < e.length; s += 1)
11
+ t = e.charCodeAt(s) + ((t << 5) - t), t &= t;
12
+ let n = t >> 16 & 255, o = t >> 8 & 255, r = t & 255;
13
+ const a = 60, i = 200;
14
+ n = Math.min(i, Math.max(a, n)), o = Math.min(i, Math.max(a, o)), r = Math.min(i, Math.max(a, r));
15
+ const c = (s) => s.toString(16).padStart(2, "0");
16
+ return `#${c(n)}${c(o)}${c(r)}`;
17
+ }, u = (e, t) => {
18
+ let n = e.replace("#", "");
19
+ n.length === 3 && (n = n.split("").map((c) => c + c).join(""));
20
+ const o = parseInt(n, 16), r = o >> 16 & 255, a = o >> 8 & 255, i = o & 255;
21
+ return `rgba(${r}, ${a}, ${i}, ${t})`;
22
+ }, b = (e) => {
23
+ const t = parseInt(e.replace("#", ""), 16), n = t >> 16 & 255, o = t >> 8 & 255, r = t & 255;
24
+ return (0.299 * n + 0.587 * o + 0.114 * r) / 255 > 0.5 ? "#000000" : "#FFFFFF";
25
+ };
7
26
  export {
8
- c as cn
27
+ p as cn,
28
+ b as hexContrast,
29
+ u as hexToRgba,
30
+ x as stringToHexColor
9
31
  };