@ravenopsnet/ui 0.0.1 → 0.0.2

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 (118) hide show
  1. package/README.md +1 -1
  2. package/dist/components/theme-provider.d.ts +15 -0
  3. package/dist/components/ui/accordion.d.ts +6 -0
  4. package/dist/components/ui/alert-dialog.d.ts +18 -0
  5. package/dist/components/ui/alert-dialog.js +95 -0
  6. package/dist/components/ui/alert.d.ts +10 -0
  7. package/dist/components/ui/alert.js +43 -0
  8. package/dist/components/ui/aspect-ratio.d.ts +4 -0
  9. package/dist/components/ui/aspect-ratio.js +13 -0
  10. package/dist/components/ui/avatar.d.ts +11 -0
  11. package/dist/components/ui/avatar.js +50 -0
  12. package/dist/components/ui/badge.d.ts +7 -0
  13. package/dist/components/ui/badge.js +29 -0
  14. package/dist/components/ui/breadcrumb.d.ts +10 -0
  15. package/dist/components/ui/breadcrumb.js +72 -0
  16. package/dist/components/ui/button-group.d.ts +10 -0
  17. package/dist/components/ui/button-group.js +41 -0
  18. package/dist/components/ui/button.d.ts +8 -0
  19. package/dist/components/ui/button.js +44 -0
  20. package/dist/components/ui/calendar.d.ts +10 -0
  21. package/dist/components/ui/calendar.js +96 -0
  22. package/dist/components/ui/card.d.ts +11 -0
  23. package/dist/components/ui/card.js +56 -0
  24. package/dist/components/ui/carousel.d.ts +28 -0
  25. package/dist/components/ui/carousel.js +111 -0
  26. package/dist/components/ui/chart.d.ts +44 -0
  27. package/dist/components/ui/chart.js +130 -0
  28. package/dist/components/ui/checkbox.d.ts +3 -0
  29. package/dist/components/ui/checkbox.js +20 -0
  30. package/dist/components/ui/collapsible.d.ts +5 -0
  31. package/dist/components/ui/collapsible.js +23 -0
  32. package/dist/components/ui/combobox.d.ts +24 -0
  33. package/dist/components/ui/combobox.js +161 -0
  34. package/dist/components/ui/command.d.ts +19 -0
  35. package/dist/components/ui/context-menu.d.ts +29 -0
  36. package/dist/components/ui/context-menu.js +133 -0
  37. package/dist/components/ui/dialog.d.ts +17 -0
  38. package/dist/components/ui/dialog.js +91 -0
  39. package/dist/components/ui/direction.d.ts +1 -0
  40. package/dist/components/ui/direction.js +2 -0
  41. package/dist/components/ui/drawer.d.ts +13 -0
  42. package/dist/components/ui/drawer.js +78 -0
  43. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  44. package/dist/components/ui/dropdown-menu.js +136 -0
  45. package/dist/components/ui/empty.d.ts +11 -0
  46. package/dist/components/ui/empty.js +59 -0
  47. package/dist/components/ui/field.d.ts +24 -0
  48. package/dist/components/ui/field.js +107 -0
  49. package/dist/components/ui/hover-card.d.ts +5 -0
  50. package/dist/components/ui/hover-card.js +36 -0
  51. package/dist/components/ui/input-group.d.ts +18 -0
  52. package/dist/components/ui/input-group.js +78 -0
  53. package/dist/components/ui/input-otp.d.ts +11 -0
  54. package/dist/components/ui/input-otp.js +46 -0
  55. package/dist/components/ui/input.d.ts +3 -0
  56. package/dist/components/ui/input.js +15 -0
  57. package/dist/components/ui/item.d.ts +22 -0
  58. package/dist/components/ui/item.js +121 -0
  59. package/dist/components/ui/kbd.d.ts +3 -0
  60. package/dist/components/ui/kbd.js +19 -0
  61. package/dist/components/ui/label.d.ts +3 -0
  62. package/dist/components/ui/label.js +14 -0
  63. package/dist/components/ui/menubar.d.ts +29 -0
  64. package/dist/components/ui/menubar.js +136 -0
  65. package/dist/components/ui/native-select.d.ts +8 -0
  66. package/dist/components/ui/native-select.js +38 -0
  67. package/dist/components/ui/navigation-menu.d.ts +11 -0
  68. package/dist/components/ui/navigation-menu.js +82 -0
  69. package/dist/components/ui/pagination.d.ts +17 -0
  70. package/dist/components/ui/pagination.js +86 -0
  71. package/dist/components/ui/popover.d.ts +9 -0
  72. package/dist/components/ui/popover.js +54 -0
  73. package/dist/components/ui/progress.d.ts +7 -0
  74. package/dist/components/ui/radio-group.d.ts +5 -0
  75. package/dist/components/ui/radio-group.js +26 -0
  76. package/dist/components/ui/resizable.d.ts +7 -0
  77. package/dist/components/ui/resizable.js +28 -0
  78. package/dist/components/ui/scroll-area.d.ts +4 -0
  79. package/dist/components/ui/scroll-area.js +35 -0
  80. package/dist/components/ui/select.d.ts +15 -0
  81. package/dist/components/ui/select.js +98 -0
  82. package/dist/components/ui/separator.d.ts +3 -0
  83. package/dist/components/ui/separator.js +14 -0
  84. package/dist/components/ui/sheet.d.ts +14 -0
  85. package/dist/components/ui/sheet.js +89 -0
  86. package/dist/components/ui/sidebar.d.ts +63 -0
  87. package/dist/components/ui/sidebar.js +358 -0
  88. package/dist/components/ui/skeleton.d.ts +2 -0
  89. package/dist/components/ui/skeleton.js +12 -0
  90. package/dist/components/ui/slider.d.ts +3 -0
  91. package/dist/components/ui/slider.js +33 -0
  92. package/dist/components/ui/sonner.d.ts +3 -0
  93. package/dist/components/ui/sonner.js +30 -0
  94. package/dist/components/ui/spinner.d.ts +2 -0
  95. package/dist/components/ui/spinner.js +14 -0
  96. package/dist/components/ui/switch.d.ts +5 -0
  97. package/dist/components/ui/switch.js +18 -0
  98. package/dist/components/ui/table.d.ts +10 -0
  99. package/dist/components/ui/table.js +67 -0
  100. package/dist/components/ui/tabs.d.ts +10 -0
  101. package/dist/components/ui/tabs.js +44 -0
  102. package/dist/components/ui/textarea.d.ts +3 -0
  103. package/dist/components/ui/textarea.js +13 -0
  104. package/dist/components/ui/toggle-group.d.ts +11 -0
  105. package/dist/components/ui/toggle-group.js +52 -0
  106. package/dist/components/ui/toggle.d.ts +8 -0
  107. package/dist/components/ui/toggle.js +36 -0
  108. package/dist/components/ui/tooltip.d.ts +6 -0
  109. package/dist/components/ui/tooltip.js +40 -0
  110. package/dist/hooks/use-mobile.d.ts +1 -0
  111. package/dist/hooks/use-mobile.js +14 -0
  112. package/dist/index.css +1 -1
  113. package/dist/index.d.ts +52 -1
  114. package/dist/index.js +54 -40132
  115. package/dist/lib/utils.d.ts +2 -0
  116. package/dist/lib/utils.js +8 -0
  117. package/package.json +1 -1
  118. package/dist/vite.svg +0 -1
@@ -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/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,3 @@
1
+ import { Slider as SliderPrimitive } from '@base-ui/react/slider';
2
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: SliderPrimitive.Root.Props): import("react").JSX.Element;
3
+ export { Slider };
@@ -0,0 +1,33 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { Slider as r } from "@base-ui/react/slider";
4
+ //#region src/components/ui/slider.tsx
5
+ function i({ className: i, defaultValue: a, value: o, min: s = 0, max: c = 100, ...l }) {
6
+ let u = Array.isArray(o) ? o : Array.isArray(a) ? a : [s, c];
7
+ return /* @__PURE__ */ t(r.Root, {
8
+ className: e("data-horizontal:w-full data-vertical:h-full", i),
9
+ "data-slot": "slider",
10
+ defaultValue: a,
11
+ value: o,
12
+ min: s,
13
+ max: c,
14
+ thumbAlignment: "edge",
15
+ ...l,
16
+ children: /* @__PURE__ */ n(r.Control, {
17
+ className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
18
+ children: [/* @__PURE__ */ t(r.Track, {
19
+ "data-slot": "slider-track",
20
+ className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
21
+ children: /* @__PURE__ */ t(r.Indicator, {
22
+ "data-slot": "slider-range",
23
+ className: "bg-primary select-none data-horizontal:h-full data-vertical:w-full"
24
+ })
25
+ }), Array.from({ length: u.length }, (e, n) => /* @__PURE__ */ t(r.Thumb, {
26
+ "data-slot": "slider-thumb",
27
+ className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
28
+ }, n))]
29
+ })
30
+ });
31
+ }
32
+ //#endregion
33
+ export { i as Slider };
@@ -0,0 +1,3 @@
1
+ import { ToasterProps } from 'sonner';
2
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
3
+ export { Toaster };
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { CircleCheckIcon as t, InfoIcon as n, Loader2Icon as r, OctagonXIcon as i, TriangleAlertIcon as a } from "lucide-react";
4
+ import { useTheme as o } from "next-themes";
5
+ import { Toaster as s } from "sonner";
6
+ //#region src/components/ui/sonner.tsx
7
+ var c = ({ ...c }) => {
8
+ let { theme: l = "system" } = o();
9
+ return /* @__PURE__ */ e(s, {
10
+ theme: l,
11
+ className: "toaster group",
12
+ icons: {
13
+ success: /* @__PURE__ */ e(t, { className: "size-4" }),
14
+ info: /* @__PURE__ */ e(n, { className: "size-4" }),
15
+ warning: /* @__PURE__ */ e(a, { className: "size-4" }),
16
+ error: /* @__PURE__ */ e(i, { className: "size-4" }),
17
+ loading: /* @__PURE__ */ e(r, { className: "size-4 animate-spin" })
18
+ },
19
+ style: {
20
+ "--normal-bg": "var(--popover)",
21
+ "--normal-text": "var(--popover-foreground)",
22
+ "--normal-border": "var(--border)",
23
+ "--border-radius": "var(--radius)"
24
+ },
25
+ toastOptions: { classNames: { toast: "cn-toast" } },
26
+ ...c
27
+ });
28
+ };
29
+ //#endregion
30
+ export { c as Toaster };
@@ -0,0 +1,2 @@
1
+ declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): import("react").JSX.Element;
2
+ export { Spinner };
@@ -0,0 +1,14 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Loader2Icon as n } from "lucide-react";
4
+ //#region src/components/ui/spinner.tsx
5
+ function r({ className: r, ...i }) {
6
+ return /* @__PURE__ */ t(n, {
7
+ role: "status",
8
+ "aria-label": "Loading",
9
+ className: e("size-4 animate-spin", r),
10
+ ...i
11
+ });
12
+ }
13
+ //#endregion
14
+ export { r as Spinner };
@@ -0,0 +1,5 @@
1
+ import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
2
+ declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
3
+ size?: "sm" | "default";
4
+ }): import("react").JSX.Element;
5
+ export { Switch };
@@ -0,0 +1,18 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Switch as n } from "@base-ui/react/switch";
4
+ //#region src/components/ui/switch.tsx
5
+ function r({ className: r, size: i = "default", ...a }) {
6
+ return /* @__PURE__ */ t(n.Root, {
7
+ "data-slot": "switch",
8
+ "data-size": i,
9
+ className: e("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", r),
10
+ ...a,
11
+ children: /* @__PURE__ */ t(n.Thumb, {
12
+ "data-slot": "switch-thumb",
13
+ className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] rtl:group-data-[size=default]/switch:data-checked:-translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] rtl:group-data-[size=sm]/switch:data-checked:-translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:-translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:-translate-x-0 dark:data-unchecked:bg-foreground"
14
+ })
15
+ });
16
+ }
17
+ //#endregion
18
+ export { r as Switch };
@@ -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, };
@@ -0,0 +1,67 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import "react";
4
+ import { jsx as t } from "react/jsx-runtime";
5
+ //#region src/components/ui/table.tsx
6
+ function n({ className: n, ...r }) {
7
+ return /* @__PURE__ */ t("div", {
8
+ "data-slot": "table-container",
9
+ className: "relative w-full overflow-x-auto",
10
+ children: /* @__PURE__ */ t("table", {
11
+ "data-slot": "table",
12
+ className: e("w-full caption-bottom text-sm", n),
13
+ ...r
14
+ })
15
+ });
16
+ }
17
+ function r({ className: n, ...r }) {
18
+ return /* @__PURE__ */ t("thead", {
19
+ "data-slot": "table-header",
20
+ className: e("[&_tr]:border-b", n),
21
+ ...r
22
+ });
23
+ }
24
+ function i({ className: n, ...r }) {
25
+ return /* @__PURE__ */ t("tbody", {
26
+ "data-slot": "table-body",
27
+ className: e("[&_tr:last-child]:border-0", n),
28
+ ...r
29
+ });
30
+ }
31
+ function a({ className: n, ...r }) {
32
+ return /* @__PURE__ */ t("tfoot", {
33
+ "data-slot": "table-footer",
34
+ className: e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", n),
35
+ ...r
36
+ });
37
+ }
38
+ function o({ className: n, ...r }) {
39
+ return /* @__PURE__ */ t("tr", {
40
+ "data-slot": "table-row",
41
+ className: e("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", n),
42
+ ...r
43
+ });
44
+ }
45
+ function s({ className: n, ...r }) {
46
+ return /* @__PURE__ */ t("th", {
47
+ "data-slot": "table-head",
48
+ className: e("h-10 px-2 text-start align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pe-0", n),
49
+ ...r
50
+ });
51
+ }
52
+ function c({ className: n, ...r }) {
53
+ return /* @__PURE__ */ t("td", {
54
+ "data-slot": "table-cell",
55
+ className: e("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0", n),
56
+ ...r
57
+ });
58
+ }
59
+ function l({ className: n, ...r }) {
60
+ return /* @__PURE__ */ t("caption", {
61
+ "data-slot": "table-caption",
62
+ className: e("mt-4 text-sm text-muted-foreground", n),
63
+ ...r
64
+ });
65
+ }
66
+ //#endregion
67
+ export { n as Table, i as TableBody, l as TableCaption, c as TableCell, a as TableFooter, s as TableHead, r as TableHeader, o as TableRow };
@@ -0,0 +1,10 @@
1
+ import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): import("react").JSX.Element;
4
+ declare const tabsListVariants: (props?: ({
5
+ variant?: "default" | "line" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): import("react").JSX.Element;
8
+ declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react").JSX.Element;
9
+ declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react").JSX.Element;
10
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -0,0 +1,44 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { cva as t } from "class-variance-authority";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { Tabs as r } from "@base-ui/react/tabs";
5
+ //#region src/components/ui/tabs.tsx
6
+ function i({ className: t, orientation: i = "horizontal", ...a }) {
7
+ return /* @__PURE__ */ n(r.Root, {
8
+ "data-slot": "tabs",
9
+ "data-orientation": i,
10
+ className: e("group/tabs flex gap-2 data-horizontal:flex-col", t),
11
+ ...a
12
+ });
13
+ }
14
+ var a = t("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
15
+ variants: { variant: {
16
+ default: "bg-muted",
17
+ line: "gap-1 bg-transparent"
18
+ } },
19
+ defaultVariants: { variant: "default" }
20
+ });
21
+ function o({ className: t, variant: i = "default", ...o }) {
22
+ return /* @__PURE__ */ n(r.List, {
23
+ "data-slot": "tabs-list",
24
+ "data-variant": i,
25
+ className: e(a({ variant: i }), t),
26
+ ...o
27
+ });
28
+ }
29
+ function s({ className: t, ...i }) {
30
+ return /* @__PURE__ */ n(r.Tab, {
31
+ "data-slot": "tabs-trigger",
32
+ className: e("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", t),
33
+ ...i
34
+ });
35
+ }
36
+ function c({ className: t, ...i }) {
37
+ return /* @__PURE__ */ n(r.Panel, {
38
+ "data-slot": "tabs-content",
39
+ className: e("flex-1 text-sm outline-none", t),
40
+ ...i
41
+ });
42
+ }
43
+ //#endregion
44
+ export { i as Tabs, c as TabsContent, o as TabsList, s as TabsTrigger, a as tabsListVariants };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
3
+ export { Textarea };
@@ -0,0 +1,13 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import "react";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/components/ui/textarea.tsx
5
+ function n({ className: n, ...r }) {
6
+ return /* @__PURE__ */ t("textarea", {
7
+ "data-slot": "textarea",
8
+ className: e("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", n),
9
+ ...r
10
+ });
11
+ }
12
+ //#endregion
13
+ export { n as Textarea };
@@ -0,0 +1,11 @@
1
+ import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
2
+ import { ToggleGroup as ToggleGroupPrimitive } from '@base-ui/react/toggle-group';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { toggleVariants } from './toggle';
5
+ import * as React from "react";
6
+ declare function ToggleGroup({ className, variant, size, spacing, orientation, children, ...props }: ToggleGroupPrimitive.Props & VariantProps<typeof toggleVariants> & {
7
+ spacing?: number;
8
+ orientation?: "horizontal" | "vertical";
9
+ }): React.JSX.Element;
10
+ declare function ToggleGroupItem({ className, children, variant, size, ...props }: TogglePrimitive.Props & VariantProps<typeof toggleVariants>): React.JSX.Element;
11
+ export { ToggleGroup, ToggleGroupItem };
@@ -0,0 +1,52 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { toggleVariants as t } from "./toggle.js";
3
+ import * as n from "react";
4
+ import "class-variance-authority";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ import { Toggle as i } from "@base-ui/react/toggle";
7
+ import { ToggleGroup as a } from "@base-ui/react/toggle-group";
8
+ //#region src/components/ui/toggle-group.tsx
9
+ var o = n.createContext({
10
+ size: "default",
11
+ variant: "default",
12
+ spacing: 2,
13
+ orientation: "horizontal"
14
+ });
15
+ function s({ className: t, variant: n, size: i, spacing: s = 2, orientation: c = "horizontal", children: l, ...u }) {
16
+ return /* @__PURE__ */ r(a, {
17
+ "data-slot": "toggle-group",
18
+ "data-variant": n,
19
+ "data-size": i,
20
+ "data-spacing": s,
21
+ "data-orientation": c,
22
+ style: { "--gap": s },
23
+ className: e("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", t),
24
+ ...u,
25
+ children: /* @__PURE__ */ r(o.Provider, {
26
+ value: {
27
+ variant: n,
28
+ size: i,
29
+ spacing: s,
30
+ orientation: c
31
+ },
32
+ children: l
33
+ })
34
+ });
35
+ }
36
+ function c({ className: a, children: s, variant: c = "default", size: l = "default", ...u }) {
37
+ let d = n.useContext(o);
38
+ return /* @__PURE__ */ r(i, {
39
+ "data-slot": "toggle-group-item",
40
+ "data-variant": d.variant || c,
41
+ "data-size": d.size || l,
42
+ "data-spacing": d.spacing,
43
+ className: e("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", t({
44
+ variant: d.variant || c,
45
+ size: d.size || l
46
+ }), a),
47
+ ...u,
48
+ children: s
49
+ });
50
+ }
51
+ //#endregion
52
+ export { s as ToggleGroup, c as ToggleGroupItem };
@@ -0,0 +1,8 @@
1
+ import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const toggleVariants: (props?: ({
4
+ variant?: "default" | "outline" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function Toggle({ className, variant, size, ...props }: TogglePrimitive.Props & VariantProps<typeof toggleVariants>): import("react").JSX.Element;
8
+ export { Toggle, toggleVariants };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { cva as t } from "class-variance-authority";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { Toggle as r } from "@base-ui/react/toggle";
6
+ //#region src/components/ui/toggle.tsx
7
+ var i = t("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-transparent",
11
+ outline: "border border-input bg-transparent hover:bg-muted"
12
+ },
13
+ size: {
14
+ default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
15
+ sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",
16
+ lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ size: "default"
22
+ }
23
+ });
24
+ function a({ className: t, variant: a = "default", size: o = "default", ...s }) {
25
+ return /* @__PURE__ */ n(r, {
26
+ "data-slot": "toggle",
27
+ className: e(i({
28
+ variant: a,
29
+ size: o,
30
+ className: t
31
+ })),
32
+ ...s
33
+ });
34
+ }
35
+ //#endregion
36
+ export { a as Toggle, i as toggleVariants };
@@ -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,40 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { Tooltip as r } from "@base-ui/react/tooltip";
4
+ //#region src/components/ui/tooltip.tsx
5
+ function i({ delay: e = 0, ...n }) {
6
+ return /* @__PURE__ */ t(r.Provider, {
7
+ "data-slot": "tooltip-provider",
8
+ delay: e,
9
+ ...n
10
+ });
11
+ }
12
+ function a({ ...e }) {
13
+ return /* @__PURE__ */ t(r.Root, {
14
+ "data-slot": "tooltip",
15
+ ...e
16
+ });
17
+ }
18
+ function o({ ...e }) {
19
+ return /* @__PURE__ */ t(r.Trigger, {
20
+ "data-slot": "tooltip-trigger",
21
+ ...e
22
+ });
23
+ }
24
+ function s({ className: i, side: a = "top", sideOffset: o = 4, align: s = "center", alignOffset: c = 0, children: l, ...u }) {
25
+ return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ t(r.Positioner, {
26
+ align: s,
27
+ alignOffset: c,
28
+ side: a,
29
+ sideOffset: o,
30
+ className: "isolate z-50",
31
+ children: /* @__PURE__ */ n(r.Popup, {
32
+ "data-slot": "tooltip-content",
33
+ 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]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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),
34
+ ...u,
35
+ 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]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-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" })]
36
+ })
37
+ }) });
38
+ }
39
+ //#endregion
40
+ export { a as Tooltip, s as TooltipContent, i as TooltipProvider, o as TooltipTrigger };
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,14 @@
1
+ import * as e from "react";
2
+ //#region src/hooks/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 };