@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,104 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Avatar as AvatarPrimitive } from "radix-ui";
5
+ function Avatar({
6
+ className,
7
+ size = "default",
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ AvatarPrimitive.Root,
12
+ {
13
+ "data-slot": "avatar",
14
+ "data-size": size,
15
+ className: cn(
16
+ "group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
17
+ className
18
+ ),
19
+ ...props
20
+ }
21
+ );
22
+ }
23
+ function AvatarImage({
24
+ className,
25
+ ...props
26
+ }) {
27
+ return /* @__PURE__ */ jsx(
28
+ AvatarPrimitive.Image,
29
+ {
30
+ "data-slot": "avatar-image",
31
+ className: cn("aspect-square size-full", className),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function AvatarFallback({
37
+ className,
38
+ ...props
39
+ }) {
40
+ return /* @__PURE__ */ jsx(
41
+ AvatarPrimitive.Fallback,
42
+ {
43
+ "data-slot": "avatar-fallback",
44
+ className: cn(
45
+ "flex size-full items-center justify-center rounded-full border bg-muted text-xs tracking-wide text-muted-foreground group-data-[size=sm]/avatar:text-xs",
46
+ className
47
+ ),
48
+ ...props
49
+ }
50
+ );
51
+ }
52
+ function AvatarBadge({ className, ...props }) {
53
+ return /* @__PURE__ */ jsx(
54
+ "span",
55
+ {
56
+ "data-slot": "avatar-badge",
57
+ className: cn(
58
+ "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none",
59
+ "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
60
+ "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
61
+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
62
+ className
63
+ ),
64
+ ...props
65
+ }
66
+ );
67
+ }
68
+ function AvatarGroup({ className, ...props }) {
69
+ return /* @__PURE__ */ jsx(
70
+ "div",
71
+ {
72
+ "data-slot": "avatar-group",
73
+ className: cn(
74
+ "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
75
+ className
76
+ ),
77
+ ...props
78
+ }
79
+ );
80
+ }
81
+ function AvatarGroupCount({
82
+ className,
83
+ ...props
84
+ }) {
85
+ return /* @__PURE__ */ jsx(
86
+ "div",
87
+ {
88
+ "data-slot": "avatar-group-count",
89
+ className: cn(
90
+ "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
91
+ className
92
+ ),
93
+ ...props
94
+ }
95
+ );
96
+ }
97
+ export {
98
+ Avatar,
99
+ AvatarBadge,
100
+ AvatarFallback,
101
+ AvatarGroup,
102
+ AvatarGroupCount,
103
+ AvatarImage
104
+ };
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "brand" | "default" | "destructive" | "ghost" | "link" | "muted" | "outline" | "secondary" | "success" | "warning" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, onRemove, removeLabel, children, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ /** Makes it a removable chip (active filters, selected tags): adds a small remove button inside the badge. */
9
+ onRemove?: () => void;
10
+ removeLabel?: string;
11
+ }): React.JSX.Element;
12
+ export { Badge, badgeVariants };
@@ -0,0 +1,63 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Slot } from "radix-ui";
5
+ const badgeVariants = cva(
6
+ "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
11
+ secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
12
+ destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
13
+ outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
14
+ ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
15
+ brand: "bg-brand text-brand-foreground",
16
+ success: "bg-success/12 text-success",
17
+ warning: "bg-warning/15 text-warning",
18
+ muted: "bg-muted text-muted-foreground",
19
+ link: "text-primary underline-offset-4 [a&]:hover:underline"
20
+ }
21
+ },
22
+ defaultVariants: {
23
+ variant: "default"
24
+ }
25
+ }
26
+ );
27
+ function Badge({
28
+ className,
29
+ variant = "default",
30
+ asChild = false,
31
+ onRemove,
32
+ removeLabel = "Remove",
33
+ children,
34
+ ...props
35
+ }) {
36
+ const Comp = asChild ? Slot.Root : "span";
37
+ return /* @__PURE__ */ jsxs(
38
+ Comp,
39
+ {
40
+ "data-slot": "badge",
41
+ "data-variant": variant,
42
+ className: cn(badgeVariants({ variant }), onRemove && "gap-1 pr-1", className),
43
+ ...props,
44
+ children: [
45
+ children,
46
+ onRemove && /* @__PURE__ */ jsx(
47
+ "button",
48
+ {
49
+ type: "button",
50
+ "aria-label": removeLabel,
51
+ onClick: onRemove,
52
+ className: "-my-1 inline-flex size-5 items-center justify-center rounded-full transition-colors outline-none hover:bg-background focus-visible:ring-[3px] focus-visible:ring-ring/50",
53
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "size-3", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
54
+ }
55
+ )
56
+ ]
57
+ }
58
+ );
59
+ }
60
+ export {
61
+ Badge,
62
+ badgeVariants
63
+ };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
3
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
4
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
5
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
6
+ asChild?: boolean;
7
+ }): React.JSX.Element;
8
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
9
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
10
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
11
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,103 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@recanica/ui/lib/utils";
3
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
4
+ import { Slot } from "radix-ui";
5
+ function Breadcrumb({ ...props }) {
6
+ return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
7
+ }
8
+ function BreadcrumbList({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx(
10
+ "ol",
11
+ {
12
+ "data-slot": "breadcrumb-list",
13
+ className: cn(
14
+ "flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ function BreadcrumbItem({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx(
23
+ "li",
24
+ {
25
+ "data-slot": "breadcrumb-item",
26
+ className: cn("inline-flex items-center gap-1.5", className),
27
+ ...props
28
+ }
29
+ );
30
+ }
31
+ function BreadcrumbLink({
32
+ asChild,
33
+ className,
34
+ ...props
35
+ }) {
36
+ const Comp = asChild ? Slot.Root : "a";
37
+ return /* @__PURE__ */ jsx(
38
+ Comp,
39
+ {
40
+ "data-slot": "breadcrumb-link",
41
+ className: cn("transition-colors hover:text-foreground", className),
42
+ ...props
43
+ }
44
+ );
45
+ }
46
+ function BreadcrumbPage({ className, ...props }) {
47
+ return /* @__PURE__ */ jsx(
48
+ "span",
49
+ {
50
+ "data-slot": "breadcrumb-page",
51
+ role: "link",
52
+ "aria-disabled": "true",
53
+ "aria-current": "page",
54
+ className: cn("font-normal text-foreground", className),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ function BreadcrumbSeparator({
60
+ children,
61
+ className,
62
+ ...props
63
+ }) {
64
+ return /* @__PURE__ */ jsx(
65
+ "li",
66
+ {
67
+ "data-slot": "breadcrumb-separator",
68
+ role: "presentation",
69
+ "aria-hidden": "true",
70
+ className: cn("[&>svg]:size-3.5", className),
71
+ ...props,
72
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
73
+ }
74
+ );
75
+ }
76
+ function BreadcrumbEllipsis({
77
+ className,
78
+ ...props
79
+ }) {
80
+ return /* @__PURE__ */ jsxs(
81
+ "span",
82
+ {
83
+ "data-slot": "breadcrumb-ellipsis",
84
+ role: "presentation",
85
+ "aria-hidden": "true",
86
+ className: cn("flex size-9 items-center justify-center", className),
87
+ ...props,
88
+ children: [
89
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
90
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
91
+ ]
92
+ }
93
+ );
94
+ }
95
+ export {
96
+ Breadcrumb,
97
+ BreadcrumbEllipsis,
98
+ BreadcrumbItem,
99
+ BreadcrumbLink,
100
+ BreadcrumbList,
101
+ BreadcrumbPage,
102
+ BreadcrumbSeparator
103
+ };
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
4
+ declare const bubbleVariants: (props?: ({
5
+ variant?: "default" | "destructive" | "ghost" | "muted" | "outline" | "secondary" | "tinted" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
8
+ align?: "start" | "end";
9
+ }): React.JSX.Element;
10
+ declare function BubbleContent({ asChild, className, ...props }: React.ComponentProps<"div"> & {
11
+ asChild?: boolean;
12
+ }): React.JSX.Element;
13
+ declare function BubbleReactions({ side, align, className, ...props }: React.ComponentProps<"div"> & {
14
+ align?: "start" | "end";
15
+ side?: "top" | "bottom";
16
+ }): React.JSX.Element;
17
+ export { BubbleGroup, Bubble, BubbleContent, BubbleReactions };
@@ -0,0 +1,110 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Slot } from "radix-ui";
5
+ function BubbleGroup({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "data-slot": "bubble-group",
10
+ className: cn("flex min-w-0 flex-col gap-2", className),
11
+ ...props
12
+ }
13
+ );
14
+ }
15
+ const bubbleVariants = cva(
16
+ "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
17
+ {
18
+ variants: {
19
+ variant: {
20
+ default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
21
+ secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
22
+ muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
23
+ tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
24
+ outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
25
+ ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
26
+ destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ variant: "default"
31
+ }
32
+ }
33
+ );
34
+ function Bubble({
35
+ variant = "default",
36
+ align = "start",
37
+ className,
38
+ ...props
39
+ }) {
40
+ return /* @__PURE__ */ jsx(
41
+ "div",
42
+ {
43
+ "data-slot": "bubble",
44
+ "data-variant": variant,
45
+ "data-align": align,
46
+ className: cn(bubbleVariants({ variant }), className),
47
+ ...props
48
+ }
49
+ );
50
+ }
51
+ function BubbleContent({
52
+ asChild = false,
53
+ className,
54
+ ...props
55
+ }) {
56
+ const Comp = asChild ? Slot.Root : "div";
57
+ return /* @__PURE__ */ jsx(
58
+ Comp,
59
+ {
60
+ "data-slot": "bubble-content",
61
+ className: cn(
62
+ "w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
63
+ className
64
+ ),
65
+ ...props
66
+ }
67
+ );
68
+ }
69
+ const bubbleReactionsVariants = cva(
70
+ "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
71
+ {
72
+ variants: {
73
+ side: {
74
+ top: "top-0 -translate-y-3/4",
75
+ bottom: "bottom-0 translate-y-3/4"
76
+ },
77
+ align: {
78
+ start: "left-3",
79
+ end: "right-3"
80
+ }
81
+ },
82
+ defaultVariants: {
83
+ side: "bottom",
84
+ align: "end"
85
+ }
86
+ }
87
+ );
88
+ function BubbleReactions({
89
+ side = "bottom",
90
+ align = "end",
91
+ className,
92
+ ...props
93
+ }) {
94
+ return /* @__PURE__ */ jsx(
95
+ "div",
96
+ {
97
+ "data-slot": "bubble-reactions",
98
+ "data-align": align,
99
+ "data-side": side,
100
+ className: cn(bubbleReactionsVariants({ side, align }), className),
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ export {
106
+ Bubble,
107
+ BubbleContent,
108
+ BubbleGroup,
109
+ BubbleReactions
110
+ };
@@ -0,0 +1,11 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import { Separator } from "@recanica/ui/components/separator";
3
+ declare const buttonGroupVariants: (props?: ({
4
+ orientation?: "horizontal" | "vertical" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
7
+ declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
8
+ asChild?: boolean;
9
+ }): import("react").JSX.Element;
10
+ declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
11
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
@@ -0,0 +1,76 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Slot } from "radix-ui";
5
+ import { Separator } from "@recanica/ui/components/separator";
6
+ const buttonGroupVariants = cva(
7
+ "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
8
+ {
9
+ variants: {
10
+ orientation: {
11
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
12
+ vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ orientation: "horizontal"
17
+ }
18
+ }
19
+ );
20
+ function ButtonGroup({
21
+ className,
22
+ orientation,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ "div",
27
+ {
28
+ role: "group",
29
+ "data-slot": "button-group",
30
+ "data-orientation": orientation,
31
+ className: cn(buttonGroupVariants({ orientation }), className),
32
+ ...props
33
+ }
34
+ );
35
+ }
36
+ function ButtonGroupText({
37
+ className,
38
+ asChild = false,
39
+ ...props
40
+ }) {
41
+ const Comp = asChild ? Slot.Root : "div";
42
+ return /* @__PURE__ */ jsx(
43
+ Comp,
44
+ {
45
+ className: cn(
46
+ "flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
47
+ className
48
+ ),
49
+ ...props
50
+ }
51
+ );
52
+ }
53
+ function ButtonGroupSeparator({
54
+ className,
55
+ orientation = "vertical",
56
+ ...props
57
+ }) {
58
+ return /* @__PURE__ */ jsx(
59
+ Separator,
60
+ {
61
+ "data-slot": "button-group-separator",
62
+ orientation,
63
+ className: cn(
64
+ "relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto",
65
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ export {
72
+ ButtonGroup,
73
+ ButtonGroupSeparator,
74
+ ButtonGroupText,
75
+ buttonGroupVariants
76
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "brand" | "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
5
+ size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "inline" | "lg" | "sm" | "xs" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): React.JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,59 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "@recanica/ui/lib/utils";
4
+ import { Slot } from "radix-ui";
5
+ const buttonVariants = cva(
6
+ "inline-flex max-w-full min-w-0 shrink-0 items-center justify-center gap-2 rounded-full text-sm font-medium whitespace-nowrap transition-all outline-none 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 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
11
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
12
+ outline: "border bg-transparent hover:bg-accent hover:text-accent-foreground dark:border-input dark:hover:bg-accent",
13
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
15
+ link: "text-primary underline-offset-4 hover:underline",
16
+ brand: "bg-brand text-brand-foreground hover:bg-brand/90"
17
+ },
18
+ size: {
19
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
20
+ xs: "h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
21
+ sm: "h-8 gap-1.5 rounded-full px-3 has-[>svg]:px-2.5",
22
+ lg: "h-11 rounded-full px-6 text-base has-[>svg]:px-5",
23
+ icon: "size-9",
24
+ "icon-xs": "size-6 rounded-full [&_svg:not([class*='size-'])]:size-3",
25
+ "icon-sm": "size-8",
26
+ "icon-lg": "size-10",
27
+ // A text action inside a sentence ("Resend code", "browse"): no height or padding, keeps the line's rhythm.
28
+ inline: "h-auto rounded-sm p-0 align-baseline"
29
+ }
30
+ },
31
+ defaultVariants: {
32
+ variant: "default",
33
+ size: "default"
34
+ }
35
+ }
36
+ );
37
+ function Button({
38
+ className,
39
+ variant = "default",
40
+ size = "default",
41
+ asChild = false,
42
+ ...props
43
+ }) {
44
+ const Comp = asChild ? Slot.Root : "button";
45
+ return /* @__PURE__ */ jsx(
46
+ Comp,
47
+ {
48
+ "data-slot": "button",
49
+ "data-variant": variant,
50
+ "data-size": size,
51
+ className: cn(buttonVariants({ variant, size, className })),
52
+ ...props
53
+ }
54
+ );
55
+ }
56
+ export {
57
+ Button,
58
+ buttonVariants
59
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { DayPicker, type DayButton } from "react-day-picker";
3
+ import { Button } from "@recanica/ui/components/button";
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
+ }): React.JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
8
+ export { Calendar, CalendarDayButton };