@surfnet/curve-react 0.2.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 (80) hide show
  1. package/dist/components/ui/avatar/avatar.d.ts +12 -0
  2. package/dist/components/ui/avatar/avatar.js +52 -0
  3. package/dist/components/ui/avatar/index.d.ts +1 -0
  4. package/dist/components/ui/avatar/index.js +1 -0
  5. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +10 -0
  6. package/dist/components/ui/breadcrumb/breadcrumb.js +74 -0
  7. package/dist/components/ui/breadcrumb/index.d.ts +1 -0
  8. package/dist/components/ui/breadcrumb/index.js +1 -0
  9. package/dist/components/ui/button/button.d.ts +8 -0
  10. package/dist/components/ui/button/button.js +46 -0
  11. package/dist/components/ui/button/index.d.ts +1 -0
  12. package/dist/components/ui/button/index.js +1 -0
  13. package/dist/components/ui/card/card.d.ts +11 -0
  14. package/dist/components/ui/card/card.js +56 -0
  15. package/dist/components/ui/card/index.d.ts +1 -0
  16. package/dist/components/ui/card/index.js +1 -0
  17. package/dist/components/ui/checkbox/checkbox.d.ts +3 -0
  18. package/dist/components/ui/checkbox/checkbox.js +21 -0
  19. package/dist/components/ui/checkbox/index.d.ts +1 -0
  20. package/dist/components/ui/checkbox/index.js +1 -0
  21. package/dist/components/ui/data-table/data-table.d.ts +23 -0
  22. package/dist/components/ui/data-table/data-table.js +61 -0
  23. package/dist/components/ui/data-table/index.d.ts +2 -0
  24. package/dist/components/ui/data-table/index.js +2 -0
  25. package/dist/components/ui/data-table/use-data-table.d.ts +11 -0
  26. package/dist/components/ui/data-table/use-data-table.js +33 -0
  27. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +30 -0
  28. package/dist/components/ui/dropdown-menu/dropdown-menu.js +138 -0
  29. package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
  30. package/dist/components/ui/dropdown-menu/index.js +1 -0
  31. package/dist/components/ui/field/field.d.ts +24 -0
  32. package/dist/components/ui/field/field.js +111 -0
  33. package/dist/components/ui/field/index.d.ts +1 -0
  34. package/dist/components/ui/field/index.js +1 -0
  35. package/dist/components/ui/input/index.d.ts +1 -0
  36. package/dist/components/ui/input/index.js +1 -0
  37. package/dist/components/ui/input/input.d.ts +3 -0
  38. package/dist/components/ui/input/input.js +17 -0
  39. package/dist/components/ui/input-group/index.d.ts +1 -0
  40. package/dist/components/ui/input-group/index.js +1 -0
  41. package/dist/components/ui/input-group/input-group.d.ts +18 -0
  42. package/dist/components/ui/input-group/input-group.js +80 -0
  43. package/dist/components/ui/label/index.d.ts +1 -0
  44. package/dist/components/ui/label/index.js +1 -0
  45. package/dist/components/ui/label/label.d.ts +3 -0
  46. package/dist/components/ui/label/label.js +15 -0
  47. package/dist/components/ui/select/index.d.ts +1 -0
  48. package/dist/components/ui/select/index.js +1 -0
  49. package/dist/components/ui/select/select.d.ts +16 -0
  50. package/dist/components/ui/select/select.js +99 -0
  51. package/dist/components/ui/separator/index.d.ts +1 -0
  52. package/dist/components/ui/separator/index.js +1 -0
  53. package/dist/components/ui/separator/separator.d.ts +3 -0
  54. package/dist/components/ui/separator/separator.js +16 -0
  55. package/dist/components/ui/sidebar/index.d.ts +1 -0
  56. package/dist/components/ui/sidebar/index.js +1 -0
  57. package/dist/components/ui/sidebar/sheet.d.ts +14 -0
  58. package/dist/components/ui/sidebar/sheet.js +72 -0
  59. package/dist/components/ui/sidebar/sidebar.d.ts +63 -0
  60. package/dist/components/ui/sidebar/sidebar.js +362 -0
  61. package/dist/components/ui/sidebar/skeleton.d.ts +2 -0
  62. package/dist/components/ui/sidebar/skeleton.js +12 -0
  63. package/dist/components/ui/sidebar/tooltip.d.ts +6 -0
  64. package/dist/components/ui/sidebar/tooltip.js +35 -0
  65. package/dist/components/ui/sidebar/use-mobile.d.ts +1 -0
  66. package/dist/components/ui/sidebar/use-mobile.js +14 -0
  67. package/dist/components/ui/table/index.d.ts +1 -0
  68. package/dist/components/ui/table/index.js +1 -0
  69. package/dist/components/ui/table/table.d.ts +10 -0
  70. package/dist/components/ui/table/table.js +68 -0
  71. package/dist/components/ui/textarea/index.d.ts +1 -0
  72. package/dist/components/ui/textarea/index.js +1 -0
  73. package/dist/components/ui/textarea/textarea.d.ts +3 -0
  74. package/dist/components/ui/textarea/textarea.js +13 -0
  75. package/dist/curve-react.css +3 -0
  76. package/dist/index.d.ts +17 -0
  77. package/dist/index.js +36 -0
  78. package/dist/lib/utils.d.ts +2 -0
  79. package/dist/lib/utils.js +8 -0
  80. package/package.json +66 -0
@@ -0,0 +1,72 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn as e } from "../../../lib/utils.js";
4
+ import { Button as t } from "../button/button.js";
5
+ import "../button/index.js";
6
+ import "react";
7
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
8
+ import { XIcon as i } from "@phosphor-icons/react";
9
+ import { Dialog as a } from "@base-ui/react/dialog";
10
+ //#region src/components/ui/sidebar/sheet.tsx
11
+ function o({ ...e }) {
12
+ return /* @__PURE__ */ n(a.Root, {
13
+ "data-slot": "sheet",
14
+ ...e
15
+ });
16
+ }
17
+ function s({ ...e }) {
18
+ return /* @__PURE__ */ n(a.Portal, {
19
+ "data-slot": "sheet-portal",
20
+ ...e
21
+ });
22
+ }
23
+ function c({ className: t, ...r }) {
24
+ return /* @__PURE__ */ n(a.Backdrop, {
25
+ "data-slot": "sheet-overlay",
26
+ className: e("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", t),
27
+ ...r
28
+ });
29
+ }
30
+ function l({ className: o, children: l, side: u = "right", showCloseButton: d = !0, ...f }) {
31
+ return /* @__PURE__ */ r(s, { children: [/* @__PURE__ */ n(c, {}), /* @__PURE__ */ r(a.Popup, {
32
+ "data-slot": "sheet-content",
33
+ "data-side": u,
34
+ className: e("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", o),
35
+ ...f,
36
+ children: [l, d && /* @__PURE__ */ r(a.Close, {
37
+ "data-slot": "sheet-close",
38
+ render: /* @__PURE__ */ n(t, {
39
+ variant: "ghost",
40
+ className: "absolute top-4 right-4",
41
+ size: "icon-sm"
42
+ }),
43
+ children: [/* @__PURE__ */ n(i, {}), /* @__PURE__ */ n("span", {
44
+ className: "sr-only",
45
+ children: "Close"
46
+ })]
47
+ })]
48
+ })] });
49
+ }
50
+ function u({ className: t, ...r }) {
51
+ return /* @__PURE__ */ n("div", {
52
+ "data-slot": "sheet-header",
53
+ className: e("flex flex-col gap-1.5 p-4", t),
54
+ ...r
55
+ });
56
+ }
57
+ function d({ className: t, ...r }) {
58
+ return /* @__PURE__ */ n(a.Title, {
59
+ "data-slot": "sheet-title",
60
+ className: e("font-heading font-medium text-foreground", t),
61
+ ...r
62
+ });
63
+ }
64
+ function f({ className: t, ...r }) {
65
+ return /* @__PURE__ */ n(a.Description, {
66
+ "data-slot": "sheet-description",
67
+ className: e("text-sm text-muted-foreground", t),
68
+ ...r
69
+ });
70
+ }
71
+ //#endregion
72
+ export { o as Sheet, l as SheetContent, f as SheetDescription, u as SheetHeader, d as SheetTitle };
@@ -0,0 +1,63 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { Button } from '../button';
4
+ import { Input } from '../input';
5
+ import { Separator } from '../separator';
6
+ import { TooltipContent } from './tooltip';
7
+ import * as React from 'react';
8
+ type SidebarContextProps = {
9
+ state: 'expanded' | 'collapsed';
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ openMobile: boolean;
13
+ setOpenMobile: (open: boolean) => void;
14
+ isMobile: boolean;
15
+ toggleSidebar: () => void;
16
+ };
17
+ declare function useSidebar(): SidebarContextProps;
18
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<'div'> & {
19
+ defaultOpen?: boolean;
20
+ open?: boolean;
21
+ onOpenChange?: (open: boolean) => void;
22
+ }): React.JSX.Element;
23
+ declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React.ComponentProps<'div'> & {
24
+ side?: 'left' | 'right';
25
+ variant?: 'sidebar' | 'floating' | 'inset';
26
+ collapsible?: 'offcanvas' | 'icon' | 'none';
27
+ }): React.JSX.Element;
28
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
29
+ declare function SidebarRail({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
30
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<'main'>): React.JSX.Element;
31
+ declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
32
+ declare function SidebarHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
33
+ declare function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
34
+ declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
35
+ declare function SidebarContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
36
+ declare function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
37
+ declare function SidebarGroupLabel({ className, render, ...props }: useRender.ComponentProps<'div'> & React.ComponentProps<'div'>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
38
+ declare function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<'button'> & React.ComponentProps<'button'>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
39
+ declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
40
+ declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
41
+ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
42
+ declare const sidebarMenuButtonVariants: (props?: ({
43
+ variant?: "default" | "outline" | null | undefined;
44
+ size?: "sm" | "default" | "lg" | null | undefined;
45
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
46
+ declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: useRender.ComponentProps<'button'> & React.ComponentProps<'button'> & {
47
+ isActive?: boolean;
48
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
49
+ } & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
50
+ declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<'button'> & React.ComponentProps<'button'> & {
51
+ showOnHover?: boolean;
52
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
53
+ declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
54
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<'div'> & {
55
+ showIcon?: boolean;
56
+ }): React.JSX.Element;
57
+ declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
58
+ declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
59
+ declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: useRender.ComponentProps<'a'> & React.ComponentProps<'a'> & {
60
+ size?: 'sm' | 'md';
61
+ isActive?: boolean;
62
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
63
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -0,0 +1,362 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn as e } from "../../../lib/utils.js";
4
+ import { Button as t } from "../button/button.js";
5
+ import "../button/index.js";
6
+ import { Separator as n } from "../separator/separator.js";
7
+ import "../separator/index.js";
8
+ import { Input as r } from "../input/input.js";
9
+ import "../input/index.js";
10
+ import { useIsMobile as i } from "./use-mobile.js";
11
+ import { Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l } from "./sheet.js";
12
+ import { Skeleton as u } from "./skeleton.js";
13
+ import { Tooltip as d, TooltipContent as f, TooltipTrigger as p } from "./tooltip.js";
14
+ import * as m from "react";
15
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
16
+ import { mergeProps as _ } from "@base-ui/react/merge-props";
17
+ import { useRender as v } from "@base-ui/react/use-render";
18
+ import { SidebarSimpleIcon as y } from "@phosphor-icons/react";
19
+ import { cva as b } from "class-variance-authority";
20
+ //#region src/components/ui/sidebar/sidebar.tsx
21
+ var x = "sidebar_state", S = 3600 * 24 * 7, C = "16rem", w = "18rem", T = "3rem", E = "b", D = m.createContext(null);
22
+ function O() {
23
+ let e = m.useContext(D);
24
+ if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
25
+ return e;
26
+ }
27
+ function k({ defaultOpen: t = !0, open: n, onOpenChange: r, className: a, style: o, children: s, ...c }) {
28
+ let l = i(), [u, d] = m.useState(!1), [f, p] = m.useState(t), g = n ?? f, _ = m.useCallback((e) => {
29
+ let t = typeof e == "function" ? e(g) : e;
30
+ r ? r(t) : p(t), document.cookie = `${x}=${t}; path=/; max-age=${S}`;
31
+ }, [r, g]), v = m.useCallback(() => l ? d((e) => !e) : _((e) => !e), [
32
+ l,
33
+ _,
34
+ d
35
+ ]);
36
+ m.useEffect(() => {
37
+ let e = (e) => {
38
+ e.key === E && (e.metaKey || e.ctrlKey) && (e.preventDefault(), v());
39
+ };
40
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
41
+ }, [v]);
42
+ let y = g ? "expanded" : "collapsed", b = m.useMemo(() => ({
43
+ state: y,
44
+ open: g,
45
+ setOpen: _,
46
+ isMobile: l,
47
+ openMobile: u,
48
+ setOpenMobile: d,
49
+ toggleSidebar: v
50
+ }), [
51
+ y,
52
+ g,
53
+ _,
54
+ l,
55
+ u,
56
+ d,
57
+ v
58
+ ]);
59
+ return /* @__PURE__ */ h(D.Provider, {
60
+ value: b,
61
+ children: /* @__PURE__ */ h("div", {
62
+ "data-slot": "sidebar-wrapper",
63
+ style: {
64
+ "--sidebar-width": C,
65
+ "--sidebar-width-icon": T,
66
+ ...o
67
+ },
68
+ className: e("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", a),
69
+ ...c,
70
+ children: s
71
+ })
72
+ });
73
+ }
74
+ function A({ side: t = "left", variant: n = "sidebar", collapsible: r = "offcanvas", className: i, children: u, dir: d, ...f }) {
75
+ let { isMobile: p, state: m, openMobile: _, setOpenMobile: v } = O();
76
+ return r === "none" ? /* @__PURE__ */ h("div", {
77
+ "data-slot": "sidebar",
78
+ className: e("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", i),
79
+ ...f,
80
+ children: u
81
+ }) : p ? /* @__PURE__ */ h(a, {
82
+ open: _,
83
+ onOpenChange: v,
84
+ ...f,
85
+ children: /* @__PURE__ */ g(o, {
86
+ dir: d,
87
+ "data-sidebar": "sidebar",
88
+ "data-slot": "sidebar",
89
+ "data-mobile": "true",
90
+ className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
91
+ style: { "--sidebar-width": w },
92
+ side: t,
93
+ children: [/* @__PURE__ */ g(c, {
94
+ className: "sr-only",
95
+ children: [/* @__PURE__ */ h(l, { children: "Sidebar" }), /* @__PURE__ */ h(s, { children: "Displays the mobile sidebar." })]
96
+ }), /* @__PURE__ */ h("div", {
97
+ className: "flex h-full w-full flex-col",
98
+ children: u
99
+ })]
100
+ })
101
+ }) : /* @__PURE__ */ g("div", {
102
+ className: "group peer hidden text-sidebar-foreground md:block",
103
+ "data-state": m,
104
+ "data-collapsible": m === "collapsed" ? r : "",
105
+ "data-variant": n,
106
+ "data-side": t,
107
+ "data-slot": "sidebar",
108
+ children: [/* @__PURE__ */ h("div", {
109
+ "data-slot": "sidebar-gap",
110
+ className: e("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", n === "floating" || n === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
111
+ }), /* @__PURE__ */ h("div", {
112
+ "data-slot": "sidebar-container",
113
+ "data-side": t,
114
+ className: e("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", n === "floating" || n === "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", i),
115
+ ...f,
116
+ children: /* @__PURE__ */ h("div", {
117
+ "data-sidebar": "sidebar",
118
+ "data-slot": "sidebar-inner",
119
+ className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
120
+ children: u
121
+ })
122
+ })]
123
+ });
124
+ }
125
+ function j({ className: n, onClick: r, ...i }) {
126
+ let { toggleSidebar: a } = O();
127
+ return /* @__PURE__ */ g(t, {
128
+ "data-sidebar": "trigger",
129
+ "data-slot": "sidebar-trigger",
130
+ variant: "ghost",
131
+ size: "icon-sm",
132
+ className: e(n),
133
+ onClick: (e) => {
134
+ r?.(e), a();
135
+ },
136
+ ...i,
137
+ children: [/* @__PURE__ */ h(y, {}), /* @__PURE__ */ h("span", {
138
+ className: "sr-only",
139
+ children: "Toggle Sidebar"
140
+ })]
141
+ });
142
+ }
143
+ function M({ className: t, ...n }) {
144
+ let { toggleSidebar: r } = O();
145
+ return /* @__PURE__ */ h("button", {
146
+ "data-sidebar": "rail",
147
+ "data-slot": "sidebar-rail",
148
+ "aria-label": "Toggle Sidebar",
149
+ tabIndex: -1,
150
+ onClick: r,
151
+ title: "Toggle Sidebar",
152
+ className: e("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "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", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", t),
153
+ ...n
154
+ });
155
+ }
156
+ function N({ className: t, ...n }) {
157
+ return /* @__PURE__ */ h("main", {
158
+ "data-slot": "sidebar-inset",
159
+ className: e("relative flex w-full flex-1 flex-col bg-background 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", t),
160
+ ...n
161
+ });
162
+ }
163
+ function P({ className: t, ...n }) {
164
+ return /* @__PURE__ */ h(r, {
165
+ "data-slot": "sidebar-input",
166
+ "data-sidebar": "input",
167
+ className: e("h-8 w-full bg-background shadow-none", t),
168
+ ...n
169
+ });
170
+ }
171
+ function F({ className: t, ...n }) {
172
+ return /* @__PURE__ */ h("div", {
173
+ "data-slot": "sidebar-header",
174
+ "data-sidebar": "header",
175
+ className: e("flex flex-col gap-2 p-2", t),
176
+ ...n
177
+ });
178
+ }
179
+ function I({ className: t, ...n }) {
180
+ return /* @__PURE__ */ h("div", {
181
+ "data-slot": "sidebar-footer",
182
+ "data-sidebar": "footer",
183
+ className: e("flex flex-col gap-2 p-2", t),
184
+ ...n
185
+ });
186
+ }
187
+ function L({ className: t, ...r }) {
188
+ return /* @__PURE__ */ h(n, {
189
+ "data-slot": "sidebar-separator",
190
+ "data-sidebar": "separator",
191
+ className: e("mx-2 w-auto bg-sidebar-border", t),
192
+ ...r
193
+ });
194
+ }
195
+ function R({ className: t, ...n }) {
196
+ return /* @__PURE__ */ h("div", {
197
+ "data-slot": "sidebar-content",
198
+ "data-sidebar": "content",
199
+ className: e("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", t),
200
+ ...n
201
+ });
202
+ }
203
+ function z({ className: t, ...n }) {
204
+ return /* @__PURE__ */ h("div", {
205
+ "data-slot": "sidebar-group",
206
+ "data-sidebar": "group",
207
+ className: e("relative flex w-full min-w-0 flex-col p-2", t),
208
+ ...n
209
+ });
210
+ }
211
+ function B({ className: t, render: n, ...r }) {
212
+ return v({
213
+ defaultTagName: "div",
214
+ props: _({ className: e("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", t) }, r),
215
+ render: n,
216
+ state: {
217
+ slot: "sidebar-group-label",
218
+ sidebar: "group-label"
219
+ }
220
+ });
221
+ }
222
+ function V({ className: t, render: n, ...r }) {
223
+ return v({
224
+ defaultTagName: "button",
225
+ props: _({ className: e("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", t) }, r),
226
+ render: n,
227
+ state: {
228
+ slot: "sidebar-group-action",
229
+ sidebar: "group-action"
230
+ }
231
+ });
232
+ }
233
+ function H({ className: t, ...n }) {
234
+ return /* @__PURE__ */ h("div", {
235
+ "data-slot": "sidebar-group-content",
236
+ "data-sidebar": "group-content",
237
+ className: e("w-full text-sm", t),
238
+ ...n
239
+ });
240
+ }
241
+ function U({ className: t, ...n }) {
242
+ return /* @__PURE__ */ h("ul", {
243
+ "data-slot": "sidebar-menu",
244
+ "data-sidebar": "menu",
245
+ className: e("flex w-full min-w-0 flex-col gap-1", t),
246
+ ...n
247
+ });
248
+ }
249
+ function W({ className: t, ...n }) {
250
+ return /* @__PURE__ */ h("li", {
251
+ "data-slot": "sidebar-menu-item",
252
+ "data-sidebar": "menu-item",
253
+ className: e("group/menu-item relative", t),
254
+ ...n
255
+ });
256
+ }
257
+ var G = b("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
258
+ variants: {
259
+ variant: {
260
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
261
+ outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
262
+ },
263
+ size: {
264
+ default: "h-8 text-sm",
265
+ sm: "h-7 text-xs",
266
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
267
+ }
268
+ },
269
+ defaultVariants: {
270
+ variant: "default",
271
+ size: "default"
272
+ }
273
+ });
274
+ function K({ render: t, isActive: n = !1, variant: r = "default", size: i = "default", tooltip: a, className: o, ...s }) {
275
+ let { isMobile: c, state: l } = O(), u = v({
276
+ defaultTagName: "button",
277
+ props: _({ className: e(G({
278
+ variant: r,
279
+ size: i
280
+ }), o) }, s),
281
+ render: a ? /* @__PURE__ */ h(p, { render: t }) : t,
282
+ state: {
283
+ slot: "sidebar-menu-button",
284
+ sidebar: "menu-button",
285
+ size: i,
286
+ active: n
287
+ }
288
+ });
289
+ return a ? (typeof a == "string" && (a = { children: a }), /* @__PURE__ */ g(d, { children: [u, /* @__PURE__ */ h(f, {
290
+ side: "right",
291
+ align: "center",
292
+ hidden: l !== "collapsed" || c,
293
+ ...a
294
+ })] })) : u;
295
+ }
296
+ function q({ className: t, render: n, showOnHover: r = !1, ...i }) {
297
+ return v({
298
+ defaultTagName: "button",
299
+ props: _({ className: e("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", r && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", t) }, i),
300
+ render: n,
301
+ state: {
302
+ slot: "sidebar-menu-action",
303
+ sidebar: "menu-action"
304
+ }
305
+ });
306
+ }
307
+ function J({ className: t, ...n }) {
308
+ return /* @__PURE__ */ h("div", {
309
+ "data-slot": "sidebar-menu-badge",
310
+ "data-sidebar": "menu-badge",
311
+ className: e("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", t),
312
+ ...n
313
+ });
314
+ }
315
+ function Y({ className: t, showIcon: n = !1, ...r }) {
316
+ let [i] = m.useState(() => `${Math.floor(Math.random() * 40) + 50}%`);
317
+ return /* @__PURE__ */ g("div", {
318
+ "data-slot": "sidebar-menu-skeleton",
319
+ "data-sidebar": "menu-skeleton",
320
+ className: e("flex h-8 items-center gap-2 rounded-md px-2", t),
321
+ ...r,
322
+ children: [n && /* @__PURE__ */ h(u, {
323
+ className: "size-4 rounded-md",
324
+ "data-sidebar": "menu-skeleton-icon"
325
+ }), /* @__PURE__ */ h(u, {
326
+ className: "h-4 max-w-(--skeleton-width) flex-1",
327
+ "data-sidebar": "menu-skeleton-text",
328
+ style: { "--skeleton-width": i }
329
+ })]
330
+ });
331
+ }
332
+ function X({ className: t, ...n }) {
333
+ return /* @__PURE__ */ h("ul", {
334
+ "data-slot": "sidebar-menu-sub",
335
+ "data-sidebar": "menu-sub",
336
+ className: e("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", t),
337
+ ...n
338
+ });
339
+ }
340
+ function Z({ className: t, ...n }) {
341
+ return /* @__PURE__ */ h("li", {
342
+ "data-slot": "sidebar-menu-sub-item",
343
+ "data-sidebar": "menu-sub-item",
344
+ className: e("group/menu-sub-item relative", t),
345
+ ...n
346
+ });
347
+ }
348
+ function Q({ render: t, size: n = "md", isActive: r = !1, className: i, ...a }) {
349
+ return v({
350
+ defaultTagName: "a",
351
+ props: _({ className: e("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", i) }, a),
352
+ render: t,
353
+ state: {
354
+ slot: "sidebar-menu-sub-button",
355
+ sidebar: "menu-sub-button",
356
+ size: n,
357
+ active: r
358
+ }
359
+ });
360
+ }
361
+ //#endregion
362
+ export { A as Sidebar, R as SidebarContent, I as SidebarFooter, z as SidebarGroup, V as SidebarGroupAction, H as SidebarGroupContent, B as SidebarGroupLabel, F as SidebarHeader, P as SidebarInput, N as SidebarInset, U as SidebarMenu, q as SidebarMenuAction, J as SidebarMenuBadge, K as SidebarMenuButton, W as SidebarMenuItem, Y as SidebarMenuSkeleton, X as SidebarMenuSub, Q as SidebarMenuSubButton, Z as SidebarMenuSubItem, k as SidebarProvider, M as SidebarRail, L as SidebarSeparator, j as SidebarTrigger, O as useSidebar };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,12 @@
1
+ import { cn as e } from "../../../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/components/ui/sidebar/skeleton.tsx
4
+ function n({ className: n, ...r }) {
5
+ return /* @__PURE__ */ t("div", {
6
+ "data-slot": "skeleton",
7
+ className: e("animate-pulse rounded-md bg-muted", n),
8
+ ...r
9
+ });
10
+ }
11
+ //#endregion
12
+ export { n as Skeleton };
@@ -0,0 +1,6 @@
1
+ import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
2
+ declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react").JSX.Element;
3
+ declare function Tooltip({ ...props }: TooltipPrimitive.Root.Props): import("react").JSX.Element;
4
+ declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react").JSX.Element;
5
+ declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): import("react").JSX.Element;
6
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn as e } from "../../../lib/utils.js";
4
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
+ import { Tooltip as r } from "@base-ui/react/tooltip";
6
+ //#region src/components/ui/sidebar/tooltip.tsx
7
+ function i({ ...e }) {
8
+ return /* @__PURE__ */ t(r.Root, {
9
+ "data-slot": "tooltip",
10
+ ...e
11
+ });
12
+ }
13
+ function a({ ...e }) {
14
+ return /* @__PURE__ */ t(r.Trigger, {
15
+ "data-slot": "tooltip-trigger",
16
+ ...e
17
+ });
18
+ }
19
+ function o({ className: i, side: a = "top", sideOffset: o = 4, align: s = "center", alignOffset: c = 0, children: l, ...u }) {
20
+ return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ t(r.Positioner, {
21
+ align: s,
22
+ alignOffset: c,
23
+ side: a,
24
+ sideOffset: o,
25
+ className: "isolate z-50",
26
+ children: /* @__PURE__ */ n(r.Popup, {
27
+ "data-slot": "tooltip-content",
28
+ className: e("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", i),
29
+ ...u,
30
+ children: [l, /* @__PURE__ */ t(r.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
31
+ })
32
+ }) });
33
+ }
34
+ //#endregion
35
+ export { i as Tooltip, o as TooltipContent, a as TooltipTrigger };
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,14 @@
1
+ import * as e from "react";
2
+ //#region src/components/ui/sidebar/use-mobile.ts
3
+ var t = 768;
4
+ function n() {
5
+ let [n, r] = e.useState(void 0);
6
+ return e.useEffect(() => {
7
+ let e = window.matchMedia(`(max-width: ${t - 1}px)`), n = () => {
8
+ r(window.innerWidth < t);
9
+ };
10
+ return e.addEventListener("change", n), r(window.innerWidth < t), () => e.removeEventListener("change", n);
11
+ }, []), !!n;
12
+ }
13
+ //#endregion
14
+ export { n as useIsMobile };
@@ -0,0 +1 @@
1
+ export * from './table';
@@ -0,0 +1 @@
1
+ import "./table.js";
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ declare function Table({ className, ...props }: React.ComponentProps<'table'>): React.JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): React.JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): React.JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): React.JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): React.JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): React.JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): React.JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): React.JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };