@recanica/ui 0.0.0-stage → 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 (147) hide show
  1. package/LICENSE +9 -0
  2. package/dist/components/accordion.d.ts +7 -0
  3. package/dist/components/accordion.js +65 -0
  4. package/dist/components/alert-dialog.d.ts +18 -0
  5. package/dist/components/alert-dialog.js +178 -0
  6. package/dist/components/alert.d.ts +9 -0
  7. package/dist/components/alert.js +66 -0
  8. package/dist/components/app-shell.d.ts +15 -0
  9. package/dist/components/app-shell.js +27 -0
  10. package/dist/components/aspect-ratio.d.ts +3 -0
  11. package/dist/components/aspect-ratio.js +11 -0
  12. package/dist/components/attachment.d.ts +24 -0
  13. package/dist/components/attachment.js +192 -0
  14. package/dist/components/avatar.d.ts +11 -0
  15. package/dist/components/avatar.js +104 -0
  16. package/dist/components/badge.d.ts +12 -0
  17. package/dist/components/badge.js +63 -0
  18. package/dist/components/breadcrumb.d.ts +11 -0
  19. package/dist/components/breadcrumb.js +103 -0
  20. package/dist/components/bubble.d.ts +17 -0
  21. package/dist/components/bubble.js +110 -0
  22. package/dist/components/button-group.d.ts +11 -0
  23. package/dist/components/button-group.js +76 -0
  24. package/dist/components/button.d.ts +10 -0
  25. package/dist/components/button.js +59 -0
  26. package/dist/components/calendar.d.ts +8 -0
  27. package/dist/components/calendar.js +195 -0
  28. package/dist/components/card.d.ts +9 -0
  29. package/dist/components/card.js +90 -0
  30. package/dist/components/carousel.d.ts +19 -0
  31. package/dist/components/carousel.js +199 -0
  32. package/dist/components/chart.d.ts +44 -0
  33. package/dist/components/chart.js +253 -0
  34. package/dist/components/checkbox.d.ts +4 -0
  35. package/dist/components/checkbox.js +33 -0
  36. package/dist/components/choice-card.d.ts +18 -0
  37. package/dist/components/choice-card.js +43 -0
  38. package/dist/components/collapsible.d.ts +5 -0
  39. package/dist/components/collapsible.js +35 -0
  40. package/dist/components/combobox.d.ts +24 -0
  41. package/dist/components/combobox.js +297 -0
  42. package/dist/components/command.d.ts +18 -0
  43. package/dist/components/command.js +177 -0
  44. package/dist/components/context-menu.d.ts +25 -0
  45. package/dist/components/context-menu.js +224 -0
  46. package/dist/components/dialog.d.ts +17 -0
  47. package/dist/components/dialog.js +147 -0
  48. package/dist/components/direction.d.ts +7 -0
  49. package/dist/components/direction.js +15 -0
  50. package/dist/components/drawer.d.ts +13 -0
  51. package/dist/components/drawer.js +129 -0
  52. package/dist/components/dropdown-menu.d.ts +25 -0
  53. package/dist/components/dropdown-menu.js +232 -0
  54. package/dist/components/empty.d.ts +11 -0
  55. package/dist/components/empty.js +102 -0
  56. package/dist/components/field.d.ts +52 -0
  57. package/dist/components/field.js +261 -0
  58. package/dist/components/form.d.ts +24 -0
  59. package/dist/components/form.js +126 -0
  60. package/dist/components/hover-card.d.ts +6 -0
  61. package/dist/components/hover-card.js +39 -0
  62. package/dist/components/input-group.d.ts +16 -0
  63. package/dist/components/input-group.js +160 -0
  64. package/dist/components/input-otp.d.ts +11 -0
  65. package/dist/components/input-otp.js +67 -0
  66. package/dist/components/input.d.ts +3 -0
  67. package/dist/components/input.js +25 -0
  68. package/dist/components/item.d.ts +23 -0
  69. package/dist/components/item.js +187 -0
  70. package/dist/components/kbd.d.ts +3 -0
  71. package/dist/components/kbd.js +31 -0
  72. package/dist/components/label.d.ts +4 -0
  73. package/dist/components/label.js +23 -0
  74. package/dist/components/layout.d.ts +34 -0
  75. package/dist/components/layout.js +46 -0
  76. package/dist/components/loader.d.ts +38 -0
  77. package/dist/components/loader.js +90 -0
  78. package/dist/components/marker.d.ts +11 -0
  79. package/dist/components/marker.js +66 -0
  80. package/dist/components/menubar.d.ts +26 -0
  81. package/dist/components/menubar.js +252 -0
  82. package/dist/components/message-scroller.d.ts +10 -0
  83. package/dist/components/message-scroller.js +118 -0
  84. package/dist/components/message.d.ts +10 -0
  85. package/dist/components/message.js +90 -0
  86. package/dist/components/native-select.d.ts +7 -0
  87. package/dist/components/native-select.js +71 -0
  88. package/dist/components/nav-item.d.ts +18 -0
  89. package/dist/components/nav-item.js +40 -0
  90. package/dist/components/navigation-menu.d.ts +14 -0
  91. package/dist/components/navigation-menu.js +170 -0
  92. package/dist/components/page.d.ts +80 -0
  93. package/dist/components/page.js +84 -0
  94. package/dist/components/pagination.d.ts +13 -0
  95. package/dist/components/pagination.js +122 -0
  96. package/dist/components/popover.d.ts +10 -0
  97. package/dist/components/popover.js +81 -0
  98. package/dist/components/progress.d.ts +4 -0
  99. package/dist/components/progress.js +32 -0
  100. package/dist/components/radio-group.d.ts +5 -0
  101. package/dist/components/radio-group.js +46 -0
  102. package/dist/components/resizable.d.ts +7 -0
  103. package/dist/components/resizable.js +47 -0
  104. package/dist/components/scroll-area.d.ts +5 -0
  105. package/dist/components/scroll-area.js +61 -0
  106. package/dist/components/select.d.ts +15 -0
  107. package/dist/components/select.js +179 -0
  108. package/dist/components/separator.d.ts +4 -0
  109. package/dist/components/separator.js +27 -0
  110. package/dist/components/sheet.d.ts +14 -0
  111. package/dist/components/sheet.js +128 -0
  112. package/dist/components/sidebar.d.ts +69 -0
  113. package/dist/components/sidebar.js +650 -0
  114. package/dist/components/skeleton.d.ts +2 -0
  115. package/dist/components/skeleton.js +15 -0
  116. package/dist/components/slider.d.ts +4 -0
  117. package/dist/components/slider.js +64 -0
  118. package/dist/components/sonner.d.ts +3 -0
  119. package/dist/components/sonner.js +38 -0
  120. package/dist/components/spinner.d.ts +2 -0
  121. package/dist/components/spinner.js +17 -0
  122. package/dist/components/stat.d.ts +47 -0
  123. package/dist/components/stat.js +120 -0
  124. package/dist/components/surface.d.ts +28 -0
  125. package/dist/components/surface.js +39 -0
  126. package/dist/components/switch.d.ts +6 -0
  127. package/dist/components/switch.js +34 -0
  128. package/dist/components/table.d.ts +10 -0
  129. package/dist/components/table.js +115 -0
  130. package/dist/components/tabs.d.ts +11 -0
  131. package/dist/components/tabs.js +92 -0
  132. package/dist/components/textarea.d.ts +3 -0
  133. package/dist/components/textarea.js +22 -0
  134. package/dist/components/toggle-group.d.ts +9 -0
  135. package/dist/components/toggle-group.js +69 -0
  136. package/dist/components/toggle.d.ts +9 -0
  137. package/dist/components/toggle.js +44 -0
  138. package/dist/components/tooltip.d.ts +7 -0
  139. package/dist/components/tooltip.js +56 -0
  140. package/dist/components/web-section.d.ts +40 -0
  141. package/dist/components/web-section.js +72 -0
  142. package/dist/hooks/use-mobile.d.ts +1 -0
  143. package/dist/hooks/use-mobile.js +18 -0
  144. package/dist/lib/utils.d.ts +2 -0
  145. package/dist/lib/utils.js +8 -0
  146. package/package.json +79 -3
  147. package/README.md +0 -3
@@ -0,0 +1,84 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@recanica/ui/lib/utils";
3
+ const widths = { reading: "reading", content: "max-w-content", full: "" };
4
+ function Page({ width = "full", className, ...props }) {
5
+ return /* @__PURE__ */ jsx("div", { "data-slot": "page", className: cn("flow w-full", widths[width], className), ...props });
6
+ }
7
+ function PageHeader({
8
+ eyebrow,
9
+ title,
10
+ description,
11
+ actions,
12
+ back,
13
+ className,
14
+ children
15
+ }) {
16
+ return /* @__PURE__ */ jsxs("header", { "data-slot": "page-header", className: cn("@container space-y-(--spacing-group)", className), children: [
17
+ back && /* @__PURE__ */ jsx("div", { className: "-ml-3", children: back }),
18
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 @2xl:flex-row @2xl:items-end @2xl:justify-between", children: [
19
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-2", children: [
20
+ eyebrow && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: eyebrow }),
21
+ /* @__PURE__ */ jsx(Heading, { level: 1, children: title }),
22
+ description && /* @__PURE__ */ jsx("div", { className: "max-w-[65ch] text-muted-foreground", children: description })
23
+ ] }),
24
+ actions && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 @2xl:shrink-0 @2xl:justify-end", children: actions })
25
+ ] }),
26
+ children
27
+ ] });
28
+ }
29
+ const headingSize = { title: "text-title", heading: "text-heading", sm: "text-lg" };
30
+ const defaultSize = { 1: "title", 2: "heading", 3: "sm" };
31
+ function Heading({ level = 2, size, id, className, children }) {
32
+ const Tag = `h${level}`;
33
+ return /* @__PURE__ */ jsx(Tag, { id, "data-slot": "heading", className: cn("scroll-mt-20", headingSize[size ?? defaultSize[level]], className), children: id ? /* @__PURE__ */ jsx("a", { href: `#${id}`, className: "hover:underline hover:underline-offset-4", children }) : children });
34
+ }
35
+ function Section({
36
+ id,
37
+ title,
38
+ description,
39
+ actions,
40
+ level = 2,
41
+ className,
42
+ children
43
+ }) {
44
+ return /* @__PURE__ */ jsxs("section", { "data-slot": "section", "aria-labelledby": id, className: cn("flow", className), children: [
45
+ (title || actions) && /* @__PURE__ */ jsxs("div", { "data-slot": "section-header", className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
46
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
47
+ title && /* @__PURE__ */ jsx(Heading, { level, id, children: title }),
48
+ description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
49
+ ] }),
50
+ actions && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-wrap gap-2", children: actions })
51
+ ] }),
52
+ children
53
+ ] });
54
+ }
55
+ const stackGaps = { group: "gap-(--spacing-group)", flow: "gap-(--spacing-flow)", stack: "gap-(--spacing-stack)" };
56
+ function Stack({ gap = "flow", className, ...props }) {
57
+ return /* @__PURE__ */ jsx("div", { "data-slot": "stack", className: cn("flex min-w-0 flex-col", stackGaps[gap], className), ...props });
58
+ }
59
+ function ReferenceTable({ head, rows, keys = "label", className }) {
60
+ const codeKeys = keys === "code";
61
+ return /* @__PURE__ */ jsx("div", { "data-slot": "reference-table", className: cn("overflow-x-auto rounded-2xl border", className), children: /* @__PURE__ */ jsxs("table", { className: "w-full min-w-[32rem] text-sm", children: [
62
+ /* @__PURE__ */ jsx("thead", { className: "border-b bg-surface text-left text-muted-foreground", children: /* @__PURE__ */ jsx("tr", { children: head.map((h) => /* @__PURE__ */ jsx("th", { className: "px-(--spacing-inset-sm) py-2.5 font-normal whitespace-nowrap", children: h }, h)) }) }),
63
+ /* @__PURE__ */ jsx("tbody", { className: "divide-y", children: rows.map((r, i) => /* @__PURE__ */ jsx("tr", { children: r.map((c, j) => /* @__PURE__ */ jsx(
64
+ "td",
65
+ {
66
+ className: cn(
67
+ "px-(--spacing-inset-sm) py-3 align-top",
68
+ j === 0 && (codeKeys ? "font-mono text-xs [overflow-wrap:anywhere]" : "whitespace-nowrap text-foreground"),
69
+ j > 0 && "text-muted-foreground"
70
+ ),
71
+ children: c
72
+ },
73
+ j
74
+ )) }, i)) })
75
+ ] }) });
76
+ }
77
+ export {
78
+ Heading,
79
+ Page,
80
+ PageHeader,
81
+ ReferenceTable,
82
+ Section,
83
+ Stack
84
+ };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import { type Button } from "@recanica/ui/components/button";
3
+ declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
4
+ declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
5
+ declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
6
+ type PaginationLinkProps = {
7
+ isActive?: boolean;
8
+ } & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
9
+ declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
10
+ declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
11
+ declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
12
+ declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
13
+ export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
@@ -0,0 +1,122 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@recanica/ui/lib/utils";
3
+ import {
4
+ ChevronLeftIcon,
5
+ ChevronRightIcon,
6
+ MoreHorizontalIcon
7
+ } from "lucide-react";
8
+ import { buttonVariants } from "@recanica/ui/components/button";
9
+ function Pagination({ className, ...props }) {
10
+ return /* @__PURE__ */ jsx(
11
+ "nav",
12
+ {
13
+ role: "navigation",
14
+ "aria-label": "pagination",
15
+ "data-slot": "pagination",
16
+ className: cn("@container/pagination mx-auto flex w-full justify-center", className),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function PaginationContent({
22
+ className,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ "ul",
27
+ {
28
+ "data-slot": "pagination-content",
29
+ className: cn("flex flex-row items-center gap-1", className),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function PaginationItem({ ...props }) {
35
+ return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
36
+ }
37
+ function PaginationLink({
38
+ className,
39
+ isActive,
40
+ size = "icon",
41
+ ...props
42
+ }) {
43
+ return /* @__PURE__ */ jsx(
44
+ "a",
45
+ {
46
+ "aria-current": isActive ? "page" : void 0,
47
+ "data-slot": "pagination-link",
48
+ "data-active": isActive,
49
+ className: cn(
50
+ buttonVariants({
51
+ variant: isActive ? "outline" : "ghost",
52
+ size
53
+ }),
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+ function PaginationPrevious({
61
+ className,
62
+ ...props
63
+ }) {
64
+ return /* @__PURE__ */ jsxs(
65
+ PaginationLink,
66
+ {
67
+ "aria-label": "Go to previous page",
68
+ size: "default",
69
+ className: cn("gap-1 px-2.5", className),
70
+ ...props,
71
+ children: [
72
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
73
+ /* @__PURE__ */ jsx("span", { className: "hidden @sm/pagination:block", children: "Previous" })
74
+ ]
75
+ }
76
+ );
77
+ }
78
+ function PaginationNext({
79
+ className,
80
+ ...props
81
+ }) {
82
+ return /* @__PURE__ */ jsxs(
83
+ PaginationLink,
84
+ {
85
+ "aria-label": "Go to next page",
86
+ size: "default",
87
+ className: cn("gap-1 px-2.5", className),
88
+ ...props,
89
+ children: [
90
+ /* @__PURE__ */ jsx("span", { className: "hidden @sm/pagination:block", children: "Next" }),
91
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
92
+ ]
93
+ }
94
+ );
95
+ }
96
+ function PaginationEllipsis({
97
+ className,
98
+ ...props
99
+ }) {
100
+ return /* @__PURE__ */ jsxs(
101
+ "span",
102
+ {
103
+ "aria-hidden": true,
104
+ "data-slot": "pagination-ellipsis",
105
+ className: cn("flex size-9 items-center justify-center", className),
106
+ ...props,
107
+ children: [
108
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
109
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
110
+ ]
111
+ }
112
+ );
113
+ }
114
+ export {
115
+ Pagination,
116
+ PaginationContent,
117
+ PaginationEllipsis,
118
+ PaginationItem,
119
+ PaginationLink,
120
+ PaginationNext,
121
+ PaginationPrevious
122
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { Popover as PopoverPrimitive } from "radix-ui";
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
7
+ declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
9
+ declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
10
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription, };
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Popover as PopoverPrimitive } from "radix-ui";
5
+ function Popover({
6
+ ...props
7
+ }) {
8
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
9
+ }
10
+ function PopoverTrigger({
11
+ ...props
12
+ }) {
13
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
14
+ }
15
+ function PopoverContent({
16
+ className,
17
+ align = "center",
18
+ sideOffset = 4,
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
22
+ PopoverPrimitive.Content,
23
+ {
24
+ "data-slot": "popover-content",
25
+ align,
26
+ sideOffset,
27
+ className: cn(
28
+ "z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-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-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
29
+ className
30
+ ),
31
+ ...props
32
+ }
33
+ ) });
34
+ }
35
+ function PopoverAnchor({
36
+ ...props
37
+ }) {
38
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
39
+ }
40
+ function PopoverHeader({ className, ...props }) {
41
+ return /* @__PURE__ */ jsx(
42
+ "div",
43
+ {
44
+ "data-slot": "popover-header",
45
+ className: cn("flex flex-col gap-1 text-sm", className),
46
+ ...props
47
+ }
48
+ );
49
+ }
50
+ function PopoverTitle({ className, ...props }) {
51
+ return /* @__PURE__ */ jsx(
52
+ "div",
53
+ {
54
+ "data-slot": "popover-title",
55
+ className: cn("font-medium", className),
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+ function PopoverDescription({
61
+ className,
62
+ ...props
63
+ }) {
64
+ return /* @__PURE__ */ jsx(
65
+ "p",
66
+ {
67
+ "data-slot": "popover-description",
68
+ className: cn("text-muted-foreground", className),
69
+ ...props
70
+ }
71
+ );
72
+ }
73
+ export {
74
+ Popover,
75
+ PopoverAnchor,
76
+ PopoverContent,
77
+ PopoverDescription,
78
+ PopoverHeader,
79
+ PopoverTitle,
80
+ PopoverTrigger
81
+ };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { Progress as ProgressPrimitive } from "radix-ui";
3
+ declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): React.JSX.Element;
4
+ export { Progress };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Progress as ProgressPrimitive } from "radix-ui";
5
+ function Progress({
6
+ className,
7
+ value,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ ProgressPrimitive.Root,
12
+ {
13
+ "data-slot": "progress",
14
+ className: cn(
15
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
16
+ className
17
+ ),
18
+ ...props,
19
+ children: /* @__PURE__ */ jsx(
20
+ ProgressPrimitive.Indicator,
21
+ {
22
+ "data-slot": "progress-indicator",
23
+ className: "h-full w-full flex-1 bg-primary transition-all",
24
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
25
+ }
26
+ )
27
+ }
28
+ );
29
+ }
30
+ export {
31
+ Progress
32
+ };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
3
+ declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): React.JSX.Element;
4
+ declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): React.JSX.Element;
5
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { CircleIcon } from "lucide-react";
5
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
6
+ function RadioGroup({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ RadioGroupPrimitive.Root,
12
+ {
13
+ "data-slot": "radio-group",
14
+ className: cn("grid gap-3", className),
15
+ ...props
16
+ }
17
+ );
18
+ }
19
+ function RadioGroupItem({
20
+ className,
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsx(
24
+ RadioGroupPrimitive.Item,
25
+ {
26
+ "data-slot": "radio-group-item",
27
+ className: cn(
28
+ "aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
29
+ className
30
+ ),
31
+ ...props,
32
+ children: /* @__PURE__ */ jsx(
33
+ RadioGroupPrimitive.Indicator,
34
+ {
35
+ "data-slot": "radio-group-indicator",
36
+ className: "relative flex items-center justify-center",
37
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary" })
38
+ }
39
+ )
40
+ }
41
+ );
42
+ }
43
+ export {
44
+ RadioGroup,
45
+ RadioGroupItem
46
+ };
@@ -0,0 +1,7 @@
1
+ import * as ResizablePrimitive from "react-resizable-panels";
2
+ declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react").JSX.Element;
3
+ declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react").JSX.Element;
4
+ declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
5
+ withHandle?: boolean;
6
+ }): import("react").JSX.Element;
7
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { GripVerticalIcon } from "lucide-react";
5
+ import * as ResizablePrimitive from "react-resizable-panels";
6
+ function ResizablePanelGroup({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ ResizablePrimitive.Group,
12
+ {
13
+ "data-slot": "resizable-panel-group",
14
+ className: cn(
15
+ "flex h-full w-full aria-[orientation=vertical]:flex-col",
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ function ResizablePanel({ ...props }) {
23
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
24
+ }
25
+ function ResizableHandle({
26
+ withHandle,
27
+ className,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(
31
+ ResizablePrimitive.Separator,
32
+ {
33
+ "data-slot": "resizable-handle",
34
+ className: cn(
35
+ "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
36
+ className
37
+ ),
38
+ ...props,
39
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
40
+ }
41
+ );
42
+ }
43
+ export {
44
+ ResizableHandle,
45
+ ResizablePanel,
46
+ ResizablePanelGroup
47
+ };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
3
+ declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
4
+ declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
5
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
5
+ function ScrollArea({
6
+ className,
7
+ children,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsxs(
11
+ ScrollAreaPrimitive.Root,
12
+ {
13
+ "data-slot": "scroll-area",
14
+ className: cn("relative", className),
15
+ ...props,
16
+ children: [
17
+ /* @__PURE__ */ jsx(
18
+ ScrollAreaPrimitive.Viewport,
19
+ {
20
+ "data-slot": "scroll-area-viewport",
21
+ className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
22
+ children
23
+ }
24
+ ),
25
+ /* @__PURE__ */ jsx(ScrollBar, {}),
26
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
27
+ ]
28
+ }
29
+ );
30
+ }
31
+ function ScrollBar({
32
+ className,
33
+ orientation = "vertical",
34
+ ...props
35
+ }) {
36
+ return /* @__PURE__ */ jsx(
37
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
38
+ {
39
+ "data-slot": "scroll-area-scrollbar",
40
+ orientation,
41
+ className: cn(
42
+ "flex touch-none p-px transition-colors select-none",
43
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
44
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
45
+ className
46
+ ),
47
+ ...props,
48
+ children: /* @__PURE__ */ jsx(
49
+ ScrollAreaPrimitive.ScrollAreaThumb,
50
+ {
51
+ "data-slot": "scroll-area-thumb",
52
+ className: "relative flex-1 rounded-full bg-border"
53
+ }
54
+ )
55
+ }
56
+ );
57
+ }
58
+ export {
59
+ ScrollArea,
60
+ ScrollBar
61
+ };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { Select as SelectPrimitive } from "radix-ui";
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
4
+ declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: "sm" | "default";
8
+ }): React.JSX.Element;
9
+ declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };