@alpic-ai/ui 0.0.0

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 (134) hide show
  1. package/dist/components/accordion-card.d.mts +41 -0
  2. package/dist/components/accordion-card.mjs +61 -0
  3. package/dist/components/accordion.d.mts +29 -0
  4. package/dist/components/accordion.mjs +48 -0
  5. package/dist/components/alert.d.mts +40 -0
  6. package/dist/components/alert.mjs +63 -0
  7. package/dist/components/attachment-tile.d.mts +26 -0
  8. package/dist/components/attachment-tile.mjs +35 -0
  9. package/dist/components/avatar.d.mts +52 -0
  10. package/dist/components/avatar.mjs +81 -0
  11. package/dist/components/badge.d.mts +20 -0
  12. package/dist/components/badge.mjs +36 -0
  13. package/dist/components/breadcrumb.d.mts +42 -0
  14. package/dist/components/breadcrumb.mjs +79 -0
  15. package/dist/components/button.d.mts +29 -0
  16. package/dist/components/button.mjs +67 -0
  17. package/dist/components/card.d.mts +37 -0
  18. package/dist/components/card.mjs +54 -0
  19. package/dist/components/checkbox.d.mts +11 -0
  20. package/dist/components/checkbox.mjs +26 -0
  21. package/dist/components/collapsible.d.mts +16 -0
  22. package/dist/components/collapsible.mjs +24 -0
  23. package/dist/components/combobox.d.mts +86 -0
  24. package/dist/components/combobox.mjs +207 -0
  25. package/dist/components/command.d.mts +38 -0
  26. package/dist/components/command.mjs +68 -0
  27. package/dist/components/copyable.d.mts +22 -0
  28. package/dist/components/copyable.mjs +33 -0
  29. package/dist/components/description-list.d.mts +22 -0
  30. package/dist/components/description-list.mjs +34 -0
  31. package/dist/components/dialog.d.mts +61 -0
  32. package/dist/components/dialog.mjs +110 -0
  33. package/dist/components/dropdown-menu.d.mts +72 -0
  34. package/dist/components/dropdown-menu.mjs +122 -0
  35. package/dist/components/input-group.d.mts +25 -0
  36. package/dist/components/input-group.mjs +43 -0
  37. package/dist/components/input.d.mts +27 -0
  38. package/dist/components/input.mjs +90 -0
  39. package/dist/components/label.d.mts +11 -0
  40. package/dist/components/label.mjs +14 -0
  41. package/dist/components/pagination.d.mts +18 -0
  42. package/dist/components/pagination.mjs +42 -0
  43. package/dist/components/popover.d.mts +22 -0
  44. package/dist/components/popover.mjs +34 -0
  45. package/dist/components/radio-group.d.mts +15 -0
  46. package/dist/components/radio-group.mjs +26 -0
  47. package/dist/components/scroll-area.d.mts +17 -0
  48. package/dist/components/scroll-area.mjs +35 -0
  49. package/dist/components/select-trigger-variants.d.mts +13 -0
  50. package/dist/components/select-trigger-variants.mjs +23 -0
  51. package/dist/components/select.d.mts +51 -0
  52. package/dist/components/select.mjs +95 -0
  53. package/dist/components/separator.d.mts +13 -0
  54. package/dist/components/separator.mjs +16 -0
  55. package/dist/components/sheet.d.mts +43 -0
  56. package/dist/components/sheet.mjs +74 -0
  57. package/dist/components/sidebar.d.mts +163 -0
  58. package/dist/components/sidebar.mjs +378 -0
  59. package/dist/components/skeleton.d.mts +16 -0
  60. package/dist/components/skeleton.mjs +21 -0
  61. package/dist/components/sonner.d.mts +29 -0
  62. package/dist/components/sonner.mjs +76 -0
  63. package/dist/components/spinner.d.mts +30 -0
  64. package/dist/components/spinner.mjs +46 -0
  65. package/dist/components/status-dot.d.mts +19 -0
  66. package/dist/components/status-dot.mjs +34 -0
  67. package/dist/components/switch.d.mts +11 -0
  68. package/dist/components/switch.mjs +18 -0
  69. package/dist/components/table.d.mts +38 -0
  70. package/dist/components/table.mjs +65 -0
  71. package/dist/components/tabs.d.mts +58 -0
  72. package/dist/components/tabs.mjs +119 -0
  73. package/dist/components/tag.d.mts +35 -0
  74. package/dist/components/tag.mjs +65 -0
  75. package/dist/components/textarea.d.mts +21 -0
  76. package/dist/components/textarea.mjs +44 -0
  77. package/dist/components/toggle-group.d.mts +28 -0
  78. package/dist/components/toggle-group.mjs +72 -0
  79. package/dist/components/tooltip-icon-button.d.mts +12 -0
  80. package/dist/components/tooltip-icon-button.mjs +27 -0
  81. package/dist/components/tooltip.d.mts +23 -0
  82. package/dist/components/tooltip.mjs +35 -0
  83. package/dist/hooks/use-copy-to-clipboard.d.mts +11 -0
  84. package/dist/hooks/use-copy-to-clipboard.mjs +24 -0
  85. package/dist/hooks/use-mobile.d.mts +4 -0
  86. package/dist/hooks/use-mobile.mjs +16 -0
  87. package/dist/lib/cn.d.mts +6 -0
  88. package/dist/lib/cn.mjs +8 -0
  89. package/package.json +88 -0
  90. package/src/components/accordion-card.tsx +103 -0
  91. package/src/components/accordion.tsx +63 -0
  92. package/src/components/alert.tsx +74 -0
  93. package/src/components/attachment-tile.tsx +68 -0
  94. package/src/components/avatar.tsx +127 -0
  95. package/src/components/badge.tsx +41 -0
  96. package/src/components/breadcrumb.tsx +98 -0
  97. package/src/components/button.tsx +106 -0
  98. package/src/components/card.tsx +62 -0
  99. package/src/components/checkbox.tsx +35 -0
  100. package/src/components/collapsible.tsx +18 -0
  101. package/src/components/combobox.tsx +393 -0
  102. package/src/components/command.tsx +112 -0
  103. package/src/components/copyable.tsx +47 -0
  104. package/src/components/description-list.tsx +36 -0
  105. package/src/components/dialog.tsx +161 -0
  106. package/src/components/dropdown-menu.tsx +234 -0
  107. package/src/components/input-group.tsx +97 -0
  108. package/src/components/input.tsx +145 -0
  109. package/src/components/label.tsx +20 -0
  110. package/src/components/pagination.tsx +53 -0
  111. package/src/components/popover.tsx +49 -0
  112. package/src/components/radio-group.tsx +33 -0
  113. package/src/components/scroll-area.tsx +48 -0
  114. package/src/components/select-trigger-variants.ts +28 -0
  115. package/src/components/select.tsx +186 -0
  116. package/src/components/separator.tsx +30 -0
  117. package/src/components/sheet.tsx +112 -0
  118. package/src/components/sidebar.tsx +682 -0
  119. package/src/components/skeleton.tsx +24 -0
  120. package/src/components/sonner.tsx +91 -0
  121. package/src/components/spinner.tsx +62 -0
  122. package/src/components/status-dot.tsx +33 -0
  123. package/src/components/switch.tsx +33 -0
  124. package/src/components/table.tsx +89 -0
  125. package/src/components/tabs.tsx +226 -0
  126. package/src/components/tag.tsx +82 -0
  127. package/src/components/textarea.tsx +70 -0
  128. package/src/components/toggle-group.tsx +96 -0
  129. package/src/components/tooltip-icon-button.tsx +33 -0
  130. package/src/components/tooltip.tsx +54 -0
  131. package/src/hooks/use-copy-to-clipboard.ts +27 -0
  132. package/src/hooks/use-mobile.ts +17 -0
  133. package/src/lib/cn.ts +6 -0
  134. package/src/styles/tokens.css +352 -0
@@ -0,0 +1,163 @@
1
+ import { Button } from "./button.mjs";
2
+ import { TooltipContent } from "./tooltip.mjs";
3
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
+ import { VariantProps } from "class-variance-authority";
5
+ import * as React from "react";
6
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
7
+
8
+ //#region src/components/sidebar.d.ts
9
+ type SidebarContextProps = {
10
+ state: "expanded" | "collapsed";
11
+ open: boolean;
12
+ setOpen: (open: boolean) => void;
13
+ openMobile: boolean;
14
+ setOpenMobile: (open: boolean) => void;
15
+ isMobile: boolean;
16
+ toggleSidebar: () => void;
17
+ };
18
+ declare function useSidebar(): SidebarContextProps;
19
+ declare function SidebarProvider({
20
+ defaultOpen,
21
+ open: openProp,
22
+ onOpenChange: setOpenProp,
23
+ className,
24
+ style,
25
+ children,
26
+ ...props
27
+ }: React.ComponentProps<"div"> & {
28
+ defaultOpen?: boolean;
29
+ open?: boolean;
30
+ onOpenChange?: (open: boolean) => void;
31
+ }): _$react_jsx_runtime0.JSX.Element;
32
+ declare function Sidebar({
33
+ side,
34
+ variant,
35
+ collapsible,
36
+ className,
37
+ children,
38
+ ...props
39
+ }: React.ComponentProps<"div"> & {
40
+ side?: "left" | "right";
41
+ variant?: "sidebar" | "floating" | "inset";
42
+ collapsible?: "offcanvas" | "icon" | "none";
43
+ }): _$react_jsx_runtime0.JSX.Element;
44
+ declare function SidebarTrigger({
45
+ className,
46
+ onClick,
47
+ ...props
48
+ }: React.ComponentProps<typeof Button>): _$react_jsx_runtime0.JSX.Element;
49
+ declare function SidebarRail({
50
+ className,
51
+ ...props
52
+ }: React.ComponentProps<"button">): _$react_jsx_runtime0.JSX.Element;
53
+ declare function SidebarInset({
54
+ className,
55
+ ...props
56
+ }: React.ComponentProps<"main">): _$react_jsx_runtime0.JSX.Element;
57
+ interface SidebarHeaderProps extends React.ComponentProps<"div"> {
58
+ icon?: React.ReactNode;
59
+ title?: string;
60
+ }
61
+ declare function SidebarHeader({
62
+ className,
63
+ icon,
64
+ title,
65
+ children,
66
+ ...props
67
+ }: SidebarHeaderProps): _$react_jsx_runtime0.JSX.Element;
68
+ declare function SidebarFooter({
69
+ className,
70
+ ...props
71
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
72
+ declare function SidebarSeparator({
73
+ className
74
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
75
+ declare function SidebarContent({
76
+ className,
77
+ ...props
78
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
79
+ declare function SidebarGroup({
80
+ className,
81
+ ...props
82
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
83
+ declare function SidebarGroupLabel({
84
+ className,
85
+ asChild,
86
+ ...props
87
+ }: React.ComponentProps<"div"> & {
88
+ asChild?: boolean;
89
+ }): _$react_jsx_runtime0.JSX.Element;
90
+ declare function SidebarGroupAction({
91
+ className,
92
+ asChild,
93
+ ...props
94
+ }: React.ComponentProps<"button"> & {
95
+ asChild?: boolean;
96
+ }): _$react_jsx_runtime0.JSX.Element;
97
+ declare function SidebarGroupContent({
98
+ className,
99
+ ...props
100
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
101
+ declare function SidebarMenu({
102
+ className,
103
+ ...props
104
+ }: React.ComponentProps<"ul">): _$react_jsx_runtime0.JSX.Element;
105
+ declare function SidebarMenuItem({
106
+ className,
107
+ ...props
108
+ }: React.ComponentProps<"li">): _$react_jsx_runtime0.JSX.Element;
109
+ declare const sidebarMenuButtonVariants: (props?: ({
110
+ variant?: "default" | "outline" | null | undefined;
111
+ size?: "sm" | "lg" | "default" | null | undefined;
112
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
113
+ declare function SidebarMenuButton({
114
+ asChild,
115
+ isActive,
116
+ variant,
117
+ size,
118
+ tooltip,
119
+ className,
120
+ ...props
121
+ }: React.ComponentProps<"button"> & {
122
+ asChild?: boolean;
123
+ isActive?: boolean;
124
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
125
+ } & VariantProps<typeof sidebarMenuButtonVariants>): _$react_jsx_runtime0.JSX.Element;
126
+ declare function SidebarMenuAction({
127
+ className,
128
+ asChild,
129
+ showOnHover,
130
+ ...props
131
+ }: React.ComponentProps<"button"> & {
132
+ asChild?: boolean;
133
+ showOnHover?: boolean;
134
+ }): _$react_jsx_runtime0.JSX.Element;
135
+ declare function SidebarMenuBadge({
136
+ className,
137
+ ...props
138
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
139
+ declare function SidebarMenuSkeleton({
140
+ className,
141
+ ...props
142
+ }: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
143
+ declare function SidebarMenuSub({
144
+ className,
145
+ ...props
146
+ }: React.ComponentProps<"ul">): _$react_jsx_runtime0.JSX.Element;
147
+ declare function SidebarMenuSubItem({
148
+ className,
149
+ ...props
150
+ }: React.ComponentProps<"li">): _$react_jsx_runtime0.JSX.Element;
151
+ declare function SidebarMenuSubButton({
152
+ asChild,
153
+ size,
154
+ isActive,
155
+ className,
156
+ ...props
157
+ }: React.ComponentProps<"a"> & {
158
+ asChild?: boolean;
159
+ size?: "sm" | "md";
160
+ isActive?: boolean;
161
+ }): _$react_jsx_runtime0.JSX.Element;
162
+ //#endregion
163
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, sidebarMenuButtonVariants, useSidebar };
@@ -0,0 +1,378 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { Button } from "./button.mjs";
4
+ import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
5
+ import { Separator } from "./separator.mjs";
6
+ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.mjs";
7
+ import { useIsMobile } from "../hooks/use-mobile.mjs";
8
+ import { Skeleton } from "./skeleton.mjs";
9
+ import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { cva } from "class-variance-authority";
12
+ import * as React from "react";
13
+ import { Slot } from "@radix-ui/react-slot";
14
+ //#region src/components/sidebar.tsx
15
+ const SIDEBAR_COOKIE_NAME = "sidebar_state";
16
+ const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
17
+ const SIDEBAR_WIDTH = "15rem";
18
+ const SIDEBAR_WIDTH_MOBILE = "16rem";
19
+ const SIDEBAR_WIDTH_ICON = "3.5rem";
20
+ const SIDEBAR_KEYBOARD_SHORTCUT = "b";
21
+ const SidebarContext = React.createContext(null);
22
+ function useSidebar() {
23
+ const context = React.useContext(SidebarContext);
24
+ if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
25
+ return context;
26
+ }
27
+ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
28
+ const isMobile = useIsMobile();
29
+ const [openMobile, setOpenMobile] = React.useState(false);
30
+ const [_open, _setOpen] = React.useState(defaultOpen);
31
+ const open = openProp ?? _open;
32
+ const setOpen = React.useCallback((value) => {
33
+ const openState = typeof value === "function" ? value(open) : value;
34
+ if (setOpenProp) setOpenProp(openState);
35
+ else _setOpen(openState);
36
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
37
+ }, [setOpenProp, open]);
38
+ const toggleSidebar = React.useCallback(() => {
39
+ return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
40
+ }, [isMobile, setOpen]);
41
+ React.useEffect(() => {
42
+ const handleKeyDown = (event) => {
43
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
44
+ event.preventDefault();
45
+ toggleSidebar();
46
+ }
47
+ };
48
+ window.addEventListener("keydown", handleKeyDown);
49
+ return () => window.removeEventListener("keydown", handleKeyDown);
50
+ }, [toggleSidebar]);
51
+ const state = open ? "expanded" : "collapsed";
52
+ const contextValue = React.useMemo(() => ({
53
+ state,
54
+ open,
55
+ setOpen,
56
+ isMobile,
57
+ openMobile,
58
+ setOpenMobile,
59
+ toggleSidebar
60
+ }), [
61
+ state,
62
+ open,
63
+ setOpen,
64
+ isMobile,
65
+ openMobile,
66
+ toggleSidebar
67
+ ]);
68
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, {
69
+ value: contextValue,
70
+ children: /* @__PURE__ */ jsx("div", {
71
+ "data-slot": "sidebar-wrapper",
72
+ style: {
73
+ "--sidebar-width": SIDEBAR_WIDTH,
74
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
75
+ ...style
76
+ },
77
+ className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
78
+ ...props,
79
+ children
80
+ })
81
+ });
82
+ }
83
+ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
84
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
85
+ if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
86
+ "data-slot": "sidebar",
87
+ className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
88
+ ...props,
89
+ children
90
+ });
91
+ if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
92
+ open: openMobile,
93
+ onOpenChange: setOpenMobile,
94
+ ...props,
95
+ children: /* @__PURE__ */ jsxs(SheetContent, {
96
+ "data-sidebar": "sidebar",
97
+ "data-slot": "sidebar",
98
+ "data-mobile": "true",
99
+ className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
100
+ style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
101
+ side,
102
+ children: [/* @__PURE__ */ jsxs(SheetHeader, {
103
+ className: "sr-only",
104
+ children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
105
+ }), /* @__PURE__ */ jsx("div", {
106
+ className: "flex h-full w-full flex-col",
107
+ children
108
+ })]
109
+ })
110
+ });
111
+ return /* @__PURE__ */ jsxs("div", {
112
+ className: "group peer text-sidebar-foreground hidden md:block",
113
+ "data-state": state,
114
+ "data-collapsible": state === "collapsed" ? collapsible : "",
115
+ "data-variant": variant,
116
+ "data-side": side,
117
+ "data-slot": "sidebar",
118
+ children: [/* @__PURE__ */ jsx("div", {
119
+ "data-slot": "sidebar-gap",
120
+ className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-out", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
121
+ }), /* @__PURE__ */ jsx("div", {
122
+ "data-slot": "sidebar-container",
123
+ className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-out md:flex", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
124
+ ...props,
125
+ children: /* @__PURE__ */ jsx("div", {
126
+ "data-sidebar": "sidebar",
127
+ "data-slot": "sidebar-inner",
128
+ className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
129
+ children
130
+ })
131
+ })]
132
+ });
133
+ }
134
+ function SidebarTrigger({ className, onClick, ...props }) {
135
+ const { state, isMobile, openMobile, toggleSidebar } = useSidebar();
136
+ const isOpen = isMobile ? openMobile : state === "expanded";
137
+ return /* @__PURE__ */ jsxs(Button, {
138
+ "data-sidebar": "trigger",
139
+ "data-slot": "sidebar-trigger",
140
+ variant: "tertiary",
141
+ size: "icon",
142
+ className: cn(className),
143
+ onClick: (event) => {
144
+ onClick?.(event);
145
+ toggleSidebar();
146
+ },
147
+ ...props,
148
+ children: [isOpen ? /* @__PURE__ */ jsx(PanelLeftClose, { className: "size-4.5" }) : /* @__PURE__ */ jsx(PanelLeftOpen, { className: "size-4.5" }), /* @__PURE__ */ jsx("span", {
149
+ className: "sr-only",
150
+ children: "Toggle Sidebar"
151
+ })]
152
+ });
153
+ }
154
+ function SidebarRail({ className, ...props }) {
155
+ const { toggleSidebar } = useSidebar();
156
+ return /* @__PURE__ */ jsx("button", {
157
+ "data-sidebar": "rail",
158
+ "data-slot": "sidebar-rail",
159
+ "aria-label": "Toggle Sidebar",
160
+ tabIndex: -1,
161
+ onClick: toggleSidebar,
162
+ title: "Toggle Sidebar",
163
+ className: cn("[@media(hover:hover)]:hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "[@media(hover:hover)]:hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
164
+ ...props
165
+ });
166
+ }
167
+ function SidebarInset({ className, ...props }) {
168
+ return /* @__PURE__ */ jsx("main", {
169
+ "data-slot": "sidebar-inset",
170
+ className: cn("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
171
+ ...props
172
+ });
173
+ }
174
+ function SidebarHeader({ className, icon, title, children, ...props }) {
175
+ if (!icon) return /* @__PURE__ */ jsx("div", {
176
+ "data-slot": "sidebar-header",
177
+ "data-sidebar": "header",
178
+ className: cn("flex flex-col gap-2 p-2", className),
179
+ ...props,
180
+ children
181
+ });
182
+ return /* @__PURE__ */ jsxs("div", {
183
+ "data-slot": "sidebar-header",
184
+ "data-sidebar": "header",
185
+ className: cn("flex flex-col gap-2 p-2 group-data-[collapsible=icon]:items-center", className),
186
+ ...props,
187
+ children: [/* @__PURE__ */ jsxs("div", {
188
+ className: "flex h-8 items-center gap-2 px-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0",
189
+ children: [
190
+ /* @__PURE__ */ jsxs("div", {
191
+ className: "relative shrink-0",
192
+ children: [/* @__PURE__ */ jsx("span", {
193
+ className: "transition-opacity group-data-[collapsible=icon]:group-hover:opacity-0",
194
+ children: icon
195
+ }), /* @__PURE__ */ jsx("div", {
196
+ className: "absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-data-[collapsible=icon]:group-hover:opacity-100",
197
+ children: /* @__PURE__ */ jsx(SidebarTrigger, { className: "!size-4 !p-0" })
198
+ })]
199
+ }),
200
+ title && /* @__PURE__ */ jsx("span", {
201
+ className: "text-foreground text-md min-w-0 truncate font-medium group-data-[collapsible=icon]:hidden",
202
+ children: title
203
+ }),
204
+ /* @__PURE__ */ jsx(SidebarTrigger, { className: "ml-auto shrink-0 group-data-[collapsible=icon]:hidden" })
205
+ ]
206
+ }), children]
207
+ });
208
+ }
209
+ function SidebarFooter({ className, ...props }) {
210
+ return /* @__PURE__ */ jsx("div", {
211
+ "data-slot": "sidebar-footer",
212
+ "data-sidebar": "footer",
213
+ className: cn("flex flex-col gap-2 p-2", className),
214
+ ...props
215
+ });
216
+ }
217
+ function SidebarSeparator({ className }) {
218
+ return /* @__PURE__ */ jsx("div", {
219
+ className: cn("mx-3", className),
220
+ children: /* @__PURE__ */ jsx(Separator, { orientation: "horizontal" })
221
+ });
222
+ }
223
+ function SidebarContent({ className, ...props }) {
224
+ return /* @__PURE__ */ jsx("div", {
225
+ "data-slot": "sidebar-content",
226
+ "data-sidebar": "content",
227
+ className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden", className),
228
+ ...props
229
+ });
230
+ }
231
+ function SidebarGroup({ className, ...props }) {
232
+ return /* @__PURE__ */ jsx("div", {
233
+ "data-slot": "sidebar-group",
234
+ "data-sidebar": "group",
235
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
236
+ ...props
237
+ });
238
+ }
239
+ function SidebarGroupLabel({ className, asChild = false, ...props }) {
240
+ return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
241
+ "data-slot": "sidebar-group-label",
242
+ "data-sidebar": "group-label",
243
+ className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 type-text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-out focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className),
244
+ ...props
245
+ });
246
+ }
247
+ function SidebarGroupAction({ className, asChild = false, ...props }) {
248
+ return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
249
+ "data-slot": "sidebar-group-action",
250
+ "data-sidebar": "group-action",
251
+ className: cn("text-sidebar-foreground ring-sidebar-ring [@media(hover:hover)]:hover:bg-sidebar-accent [@media(hover:hover)]:hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className),
252
+ ...props
253
+ });
254
+ }
255
+ function SidebarGroupContent({ className, ...props }) {
256
+ return /* @__PURE__ */ jsx("div", {
257
+ "data-slot": "sidebar-group-content",
258
+ "data-sidebar": "group-content",
259
+ className: cn("w-full type-text-sm", className),
260
+ ...props
261
+ });
262
+ }
263
+ function SidebarMenu({ className, ...props }) {
264
+ return /* @__PURE__ */ jsx("ul", {
265
+ "data-slot": "sidebar-menu",
266
+ "data-sidebar": "menu",
267
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
268
+ ...props
269
+ });
270
+ }
271
+ function SidebarMenuItem({ className, ...props }) {
272
+ return /* @__PURE__ */ jsx("li", {
273
+ "data-slot": "sidebar-menu-item",
274
+ "data-sidebar": "menu-item",
275
+ className: cn("group/menu-item relative", className),
276
+ ...props
277
+ });
278
+ }
279
+ const sidebarMenuButtonVariants = cva(["peer/menu-button flex w-full items-center gap-1.5 overflow-hidden rounded-md p-2 text-left outline-hidden ring-sidebar-ring transition-[width,height,padding] focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-background data-[active=true]:font-medium data-[active=true]:text-sidebar-primary data-[state=open]:[@media(hover:hover)]:hover:bg-sidebar-accent data-[state=open]:[@media(hover:hover)]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "[@media(hover:hover)]:hover:bg-sidebar-accent [@media(hover:hover)]:hover:text-sidebar-accent-foreground"].join(" "), {
280
+ variants: {
281
+ variant: {
282
+ default: "",
283
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] [@media(hover:hover)]:hover:bg-sidebar-accent [@media(hover:hover)]:hover:text-sidebar-accent-foreground [@media(hover:hover)]:hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
284
+ },
285
+ size: {
286
+ default: "h-8 type-text-sm",
287
+ sm: "h-7 type-text-xs",
288
+ lg: "h-12 type-text-sm group-data-[collapsible=icon]:p-0!"
289
+ }
290
+ },
291
+ defaultVariants: {
292
+ variant: "default",
293
+ size: "default"
294
+ }
295
+ });
296
+ function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
297
+ const Comp = asChild ? Slot : "button";
298
+ const { isMobile, state } = useSidebar();
299
+ const button = /* @__PURE__ */ jsx(Comp, {
300
+ "data-slot": "sidebar-menu-button",
301
+ "data-sidebar": "menu-button",
302
+ "data-size": size,
303
+ "data-active": isActive,
304
+ className: cn(sidebarMenuButtonVariants({
305
+ variant,
306
+ size
307
+ }), className),
308
+ ...props
309
+ });
310
+ if (!tooltip) return button;
311
+ if (typeof tooltip === "string") tooltip = { children: tooltip };
312
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
313
+ asChild: true,
314
+ children: button
315
+ }), /* @__PURE__ */ jsx(TooltipContent, {
316
+ side: "right",
317
+ align: "center",
318
+ hidden: state !== "collapsed" || isMobile,
319
+ ...tooltip
320
+ })] });
321
+ }
322
+ function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
323
+ return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
324
+ "data-slot": "sidebar-menu-action",
325
+ "data-sidebar": "menu-action",
326
+ className: cn("text-sidebar-foreground ring-sidebar-ring [@media(hover:hover)]:hover:bg-sidebar-accent [@media(hover:hover)]:hover:text-sidebar-accent-foreground [@media(hover:hover)]:peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 [@media(hover:hover)]:group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", className),
327
+ ...props
328
+ });
329
+ }
330
+ function SidebarMenuBadge({ className, ...props }) {
331
+ return /* @__PURE__ */ jsx("div", {
332
+ "data-slot": "sidebar-menu-badge",
333
+ "data-sidebar": "menu-badge",
334
+ className: cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 type-text-xs font-medium tabular-nums select-none", "[@media(hover:hover)]:peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className),
335
+ ...props
336
+ });
337
+ }
338
+ function SidebarMenuSkeleton({ className, ...props }) {
339
+ const [width] = React.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
340
+ return /* @__PURE__ */ jsx("div", {
341
+ "data-slot": "sidebar-menu-skeleton",
342
+ "data-sidebar": "menu-skeleton",
343
+ className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
344
+ ...props,
345
+ children: /* @__PURE__ */ jsx(Skeleton, {
346
+ className: "h-4 flex-1",
347
+ style: { maxWidth: width }
348
+ })
349
+ });
350
+ }
351
+ function SidebarMenuSub({ className, ...props }) {
352
+ return /* @__PURE__ */ jsx("ul", {
353
+ "data-slot": "sidebar-menu-sub",
354
+ "data-sidebar": "menu-sub",
355
+ className: cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className),
356
+ ...props
357
+ });
358
+ }
359
+ function SidebarMenuSubItem({ className, ...props }) {
360
+ return /* @__PURE__ */ jsx("li", {
361
+ "data-slot": "sidebar-menu-sub-item",
362
+ "data-sidebar": "menu-sub-item",
363
+ className: cn("group/menu-sub-item relative", className),
364
+ ...props
365
+ });
366
+ }
367
+ function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
368
+ return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
369
+ "data-slot": "sidebar-menu-sub-button",
370
+ "data-sidebar": "menu-sub-button",
371
+ "data-size": size,
372
+ "data-active": isActive,
373
+ className: cn("text-sidebar-foreground ring-sidebar-ring [@media(hover:hover)]:hover:bg-sidebar-accent [@media(hover:hover)]:hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-background data-[active=true]:text-sidebar-primary", size === "sm" && "type-text-xs", size === "md" && "type-text-sm", "group-data-[collapsible=icon]:hidden", className),
374
+ ...props
375
+ });
376
+ }
377
+ //#endregion
378
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, sidebarMenuButtonVariants, useSidebar };
@@ -0,0 +1,16 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
4
+
5
+ //#region src/components/skeleton.d.ts
6
+ declare const skeletonVariants: (props?: ({
7
+ shape?: "rectangle" | "circle" | null | undefined;
8
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ interface SkeletonProps extends React.ComponentProps<"div">, VariantProps<typeof skeletonVariants> {}
10
+ declare function Skeleton({
11
+ className,
12
+ shape,
13
+ ...props
14
+ }: SkeletonProps): _$react_jsx_runtime0.JSX.Element;
15
+ //#endregion
16
+ export { Skeleton, skeletonVariants };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { cn } from "../lib/cn.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ //#region src/components/skeleton.tsx
6
+ const skeletonVariants = cva("bg-accent motion-safe:animate-pulse", {
7
+ variants: { shape: {
8
+ rectangle: "rounded-md",
9
+ circle: "rounded-full"
10
+ } },
11
+ defaultVariants: { shape: "rectangle" }
12
+ });
13
+ function Skeleton({ className, shape, ...props }) {
14
+ return /* @__PURE__ */ jsx("div", {
15
+ "data-slot": "skeleton",
16
+ className: cn(skeletonVariants({ shape }), className),
17
+ ...props
18
+ });
19
+ }
20
+ //#endregion
21
+ export { Skeleton, skeletonVariants };
@@ -0,0 +1,29 @@
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Toaster as Toaster$1, toast } from "sonner";
4
+
5
+ //#region src/components/sonner.d.ts
6
+ type ToasterProps = React.ComponentProps<typeof Toaster$1>;
7
+ declare function Toaster(props: ToasterProps): _$react_jsx_runtime0.JSX.Element;
8
+ interface ActionToastProps {
9
+ toastId: string | number;
10
+ title: string;
11
+ description: string;
12
+ onDismiss?: () => void;
13
+ confirm: {
14
+ label: string;
15
+ icon?: React.ReactNode;
16
+ onClick: () => void;
17
+ loading?: boolean;
18
+ disabled?: boolean;
19
+ };
20
+ }
21
+ declare function ActionToast({
22
+ toastId,
23
+ title,
24
+ description,
25
+ onDismiss,
26
+ confirm
27
+ }: ActionToastProps): _$react_jsx_runtime0.JSX.Element;
28
+ //#endregion
29
+ export { ActionToast, type ActionToastProps, Toaster, type ToasterProps, toast };