@alquimia-ai/ui 1.2.1 → 1.2.4
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.
- package/dist/components/hooks/index.js +41 -32
- package/dist/components/hooks/index.js.map +1 -1
- package/dist/components/hooks/index.mjs +42 -33
- package/dist/components/hooks/index.mjs.map +1 -1
- package/dist/components/molecules/index.js +41 -32
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +42 -33
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/organisms/index.js +41 -32
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +42 -33
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/index.js +41 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -33
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +136 -0
- package/package.json +50 -53
- package/src/components/atoms/index.ts +0 -32
- package/src/components/atoms/ui/alert.tsx +0 -59
- package/src/components/atoms/ui/aspect-ratio.tsx +0 -7
- package/src/components/atoms/ui/avatar.tsx +0 -50
- package/src/components/atoms/ui/badge.tsx +0 -36
- package/src/components/atoms/ui/breadcrumb.tsx +0 -120
- package/src/components/atoms/ui/button.tsx +0 -56
- package/src/components/atoms/ui/card.tsx +0 -87
- package/src/components/atoms/ui/checkbox.tsx +0 -31
- package/src/components/atoms/ui/command.tsx +0 -155
- package/src/components/atoms/ui/dialog.tsx +0 -125
- package/src/components/atoms/ui/drawer.tsx +0 -119
- package/src/components/atoms/ui/input.tsx +0 -26
- package/src/components/atoms/ui/label.tsx +0 -26
- package/src/components/atoms/ui/loader.tsx +0 -52
- package/src/components/atoms/ui/popover.tsx +0 -31
- package/src/components/atoms/ui/rich-text.tsx +0 -19
- package/src/components/atoms/ui/scroll-area.tsx +0 -48
- package/src/components/atoms/ui/select.tsx +0 -160
- package/src/components/atoms/ui/skeleton.tsx +0 -15
- package/src/components/atoms/ui/slider.tsx +0 -29
- package/src/components/atoms/ui/switch.tsx +0 -30
- package/src/components/atoms/ui/table.tsx +0 -118
- package/src/components/atoms/ui/tabs.tsx +0 -56
- package/src/components/atoms/ui/text-area/index.tsx +0 -24
- package/src/components/atoms/ui/textarea.tsx +0 -25
- package/src/components/atoms/ui/think-indicator.tsx +0 -103
- package/src/components/atoms/ui/toast.tsx +0 -129
- package/src/components/atoms/ui/toaster.tsx +0 -38
- package/src/components/atoms/ui/toggle.tsx +0 -45
- package/src/components/atoms/ui/typography/index.tsx +0 -30
- package/src/components/hooks/index.ts +0 -4
- package/src/components/hooks/use-document.tsx +0 -44
- package/src/components/hooks/use-resize-observer.ts +0 -28
- package/src/components/hooks/use-text-streaming.ts +0 -63
- package/src/components/hooks/use-toast.ts +0 -194
- package/src/components/index.ts +0 -1
- package/src/components/molecules/alert-dialog.tsx +0 -141
- package/src/components/molecules/assistant-button.tsx +0 -148
- package/src/components/molecules/call-out.tsx +0 -163
- package/src/components/molecules/carousel.tsx +0 -262
- package/src/components/molecules/documents/document-selector.tsx +0 -79
- package/src/components/molecules/documents/document-viewer.tsx +0 -85
- package/src/components/molecules/documents/index.ts +0 -2
- package/src/components/molecules/index.ts +0 -11
- package/src/components/molecules/navigation-menu.tsx +0 -128
- package/src/components/molecules/page-container.tsx +0 -17
- package/src/components/molecules/rating-comment.tsx +0 -93
- package/src/components/molecules/rating-stars.tsx +0 -136
- package/src/components/molecules/rating-thumbs.tsx +0 -90
- package/src/components/molecules/sidebar.tsx +0 -107
- package/src/components/molecules/sonner.tsx +0 -30
- package/src/components/molecules/viewers/index.ts +0 -2
- package/src/components/molecules/viewers/pdf-viewer.tsx +0 -138
- package/src/components/molecules/viewers/plain-text-viewer.tsx +0 -40
- package/src/components/organisms/assistant.tsx +0 -271
- package/src/components/organisms/index.ts +0 -6
- package/src/components/organisms/rating-dialog.tsx +0 -104
- package/src/components/organisms/speechToText.tsx +0 -92
- package/src/components/organisms/whisper.tsx +0 -106
- package/src/components/templates/cards/index.ts +0 -2
- package/src/components/templates/cards/with-image-heading-description-avatar.tsx +0 -94
- package/src/components/templates/cards/with-image-heading-description.tsx +0 -63
- package/src/components/templates/hero/index.tsx +0 -39
- package/src/components/templates/index.ts +0 -4
- package/src/components/templates/messages-window.tsx +0 -15
- package/src/components/templates/query-box.tsx +0 -13
- package/src/components/ui/input.tsx +0 -25
- package/src/components/ui/select.tsx +0 -163
- package/src/index.ts +0 -7
- package/src/lib/index.ts +0 -1
- package/src/lib/utils.ts +0 -34
- package/src/styles/call-out.css +0 -153
- package/src/styles/drawer.css +0 -28
- package/src/styles/globals.css +0 -69
- package/src/styles/prose.css +0 -51
- package/src/styles/ratings.css +0 -27
- package/src/styles/themes/base-alquimia.css +0 -95
- package/src/styles/themes/base-nordic.css +0 -83
- package/src/styles/themes/base-primary.css +0 -85
- package/src/styles/themes/base.css +0 -8
- package/src/types/index.ts +0 -1
- package/src/types/type.ts +0 -76
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../lib/utils";
|
|
4
|
-
|
|
5
|
-
const Card = React.forwardRef<
|
|
6
|
-
HTMLDivElement,
|
|
7
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
8
|
-
>(({ className, ...props }, ref) => (
|
|
9
|
-
<div
|
|
10
|
-
ref={ref}
|
|
11
|
-
className={cn(
|
|
12
|
-
"rounded-lg",
|
|
13
|
-
" border",
|
|
14
|
-
"bg-card",
|
|
15
|
-
"text-card-foreground",
|
|
16
|
-
"shadow-raised",
|
|
17
|
-
className
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
));
|
|
22
|
-
Card.displayName = "Card";
|
|
23
|
-
|
|
24
|
-
const CardHeader = React.forwardRef<
|
|
25
|
-
HTMLDivElement,
|
|
26
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
27
|
-
>(({ className, ...props }, ref) => (
|
|
28
|
-
<div
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
31
|
-
{...props}
|
|
32
|
-
/>
|
|
33
|
-
));
|
|
34
|
-
CardHeader.displayName = "CardHeader";
|
|
35
|
-
|
|
36
|
-
const CardTitle = React.forwardRef<
|
|
37
|
-
HTMLParagraphElement,
|
|
38
|
-
React.HTMLAttributes<HTMLHeadingElement>
|
|
39
|
-
>(({ className, ...props }, ref) => (
|
|
40
|
-
<h3
|
|
41
|
-
ref={ref}
|
|
42
|
-
className={cn("alq--typography-heading4", className)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
));
|
|
46
|
-
CardTitle.displayName = "CardTitle";
|
|
47
|
-
|
|
48
|
-
const CardDescription = React.forwardRef<
|
|
49
|
-
HTMLParagraphElement,
|
|
50
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
51
|
-
>(({ className, ...props }, ref) => (
|
|
52
|
-
<p
|
|
53
|
-
ref={ref}
|
|
54
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
55
|
-
{...props}
|
|
56
|
-
/>
|
|
57
|
-
));
|
|
58
|
-
CardDescription.displayName = "CardDescription";
|
|
59
|
-
|
|
60
|
-
const CardContent = React.forwardRef<
|
|
61
|
-
HTMLDivElement,
|
|
62
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
63
|
-
>(({ className, ...props }, ref) => (
|
|
64
|
-
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
65
|
-
));
|
|
66
|
-
CardContent.displayName = "CardContent";
|
|
67
|
-
|
|
68
|
-
const CardFooter = React.forwardRef<
|
|
69
|
-
HTMLDivElement,
|
|
70
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
71
|
-
>(({ className, ...props }, ref) => (
|
|
72
|
-
<div
|
|
73
|
-
ref={ref}
|
|
74
|
-
className={cn("flex items-center p-6 pt-0", className)}
|
|
75
|
-
{...props}
|
|
76
|
-
/>
|
|
77
|
-
));
|
|
78
|
-
CardFooter.displayName = "CardFooter";
|
|
79
|
-
|
|
80
|
-
export {
|
|
81
|
-
Card,
|
|
82
|
-
CardHeader,
|
|
83
|
-
CardFooter,
|
|
84
|
-
CardTitle,
|
|
85
|
-
CardDescription,
|
|
86
|
-
CardContent,
|
|
87
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5
|
-
import { Check } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../../lib/utils";
|
|
8
|
-
|
|
9
|
-
const Checkbox = React.forwardRef<
|
|
10
|
-
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
11
|
-
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
12
|
-
>(({ className, ...props }, ref) => (
|
|
13
|
-
<CheckboxPrimitive.Root
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={cn(
|
|
16
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
17
|
-
className,
|
|
18
|
-
"alq--checkbox"
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
>
|
|
22
|
-
<CheckboxPrimitive.Indicator
|
|
23
|
-
className={cn("flex items-center justify-center text-current")}
|
|
24
|
-
>
|
|
25
|
-
<Check className="h-4 w-4" />
|
|
26
|
-
</CheckboxPrimitive.Indicator>
|
|
27
|
-
</CheckboxPrimitive.Root>
|
|
28
|
-
));
|
|
29
|
-
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
30
|
-
|
|
31
|
-
export { Checkbox };
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { type DialogProps } from "@radix-ui/react-dialog";
|
|
5
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
6
|
-
import { Search } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
import { cn } from "../../../lib/utils";
|
|
9
|
-
import { Dialog, DialogContent } from "./dialog";
|
|
10
|
-
|
|
11
|
-
const Command = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof CommandPrimitive>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
|
|
14
|
-
>(({ className, ...props }, ref) => (
|
|
15
|
-
<CommandPrimitive
|
|
16
|
-
ref={ref}
|
|
17
|
-
className={cn(
|
|
18
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
));
|
|
24
|
-
Command.displayName = CommandPrimitive.displayName;
|
|
25
|
-
|
|
26
|
-
interface CommandDialogProps extends DialogProps {}
|
|
27
|
-
|
|
28
|
-
const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
|
|
29
|
-
return (
|
|
30
|
-
<Dialog {...props}>
|
|
31
|
-
<DialogContent className="overflow-hidden p-0 shadow-lg">
|
|
32
|
-
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
33
|
-
{children}
|
|
34
|
-
</Command>
|
|
35
|
-
</DialogContent>
|
|
36
|
-
</Dialog>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const CommandInput = React.forwardRef<
|
|
41
|
-
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
42
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
|
43
|
-
>(({ className, ...props }, ref) => (
|
|
44
|
-
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
|
45
|
-
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
|
46
|
-
<CommandPrimitive.Input
|
|
47
|
-
ref={ref}
|
|
48
|
-
className={cn(
|
|
49
|
-
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
50
|
-
className
|
|
51
|
-
)}
|
|
52
|
-
{...props}
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
));
|
|
56
|
-
|
|
57
|
-
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
58
|
-
|
|
59
|
-
const CommandList = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof CommandPrimitive.List>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
|
62
|
-
>(({ className, ...props }, ref) => (
|
|
63
|
-
<CommandPrimitive.List
|
|
64
|
-
ref={ref}
|
|
65
|
-
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
));
|
|
69
|
-
|
|
70
|
-
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
71
|
-
|
|
72
|
-
const CommandEmpty = React.forwardRef<
|
|
73
|
-
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
74
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
|
75
|
-
>((props, ref) => (
|
|
76
|
-
<CommandPrimitive.Empty
|
|
77
|
-
ref={ref}
|
|
78
|
-
className="py-6 text-center text-sm"
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
));
|
|
82
|
-
|
|
83
|
-
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
84
|
-
|
|
85
|
-
const CommandGroup = React.forwardRef<
|
|
86
|
-
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
87
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
|
88
|
-
>(({ className, ...props }, ref) => (
|
|
89
|
-
<CommandPrimitive.Group
|
|
90
|
-
ref={ref}
|
|
91
|
-
className={cn(
|
|
92
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
93
|
-
className
|
|
94
|
-
)}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
));
|
|
98
|
-
|
|
99
|
-
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
100
|
-
|
|
101
|
-
const CommandSeparator = React.forwardRef<
|
|
102
|
-
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
103
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
|
104
|
-
>(({ className, ...props }, ref) => (
|
|
105
|
-
<CommandPrimitive.Separator
|
|
106
|
-
ref={ref}
|
|
107
|
-
className={cn("-mx-1 h-px bg-border", className)}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
));
|
|
111
|
-
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
112
|
-
|
|
113
|
-
const CommandItem = React.forwardRef<
|
|
114
|
-
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
115
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
|
116
|
-
>(({ className, ...props }, ref) => (
|
|
117
|
-
<CommandPrimitive.Item
|
|
118
|
-
ref={ref}
|
|
119
|
-
className={cn(
|
|
120
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
121
|
-
className
|
|
122
|
-
)}
|
|
123
|
-
{...props}
|
|
124
|
-
/>
|
|
125
|
-
));
|
|
126
|
-
|
|
127
|
-
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
128
|
-
|
|
129
|
-
const CommandShortcut = ({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
133
|
-
return (
|
|
134
|
-
<span
|
|
135
|
-
className={cn(
|
|
136
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
137
|
-
className
|
|
138
|
-
)}
|
|
139
|
-
{...props}
|
|
140
|
-
/>
|
|
141
|
-
);
|
|
142
|
-
};
|
|
143
|
-
CommandShortcut.displayName = "CommandShortcut";
|
|
144
|
-
|
|
145
|
-
export {
|
|
146
|
-
Command,
|
|
147
|
-
CommandDialog,
|
|
148
|
-
CommandInput,
|
|
149
|
-
CommandList,
|
|
150
|
-
CommandEmpty,
|
|
151
|
-
CommandGroup,
|
|
152
|
-
CommandItem,
|
|
153
|
-
CommandShortcut,
|
|
154
|
-
CommandSeparator,
|
|
155
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
-
import { X } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../../lib/utils";
|
|
8
|
-
|
|
9
|
-
const Dialog = DialogPrimitive.Root;
|
|
10
|
-
|
|
11
|
-
const DialogTrigger = DialogPrimitive.Trigger;
|
|
12
|
-
|
|
13
|
-
const DialogPortal = DialogPrimitive.Portal;
|
|
14
|
-
|
|
15
|
-
const DialogClose = DialogPrimitive.Close;
|
|
16
|
-
|
|
17
|
-
const DialogOverlay = React.forwardRef<
|
|
18
|
-
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
19
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
|
20
|
-
>(({ className, ...props }, ref) => (
|
|
21
|
-
<DialogPrimitive.Overlay
|
|
22
|
-
ref={ref}
|
|
23
|
-
className={cn(
|
|
24
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
25
|
-
className
|
|
26
|
-
)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
));
|
|
30
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
31
|
-
|
|
32
|
-
const DialogContent = React.forwardRef<
|
|
33
|
-
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
34
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
|
35
|
-
>(({ className, children, ...props }, ref) => (
|
|
36
|
-
<DialogPortal>
|
|
37
|
-
<DialogOverlay />
|
|
38
|
-
<DialogPrimitive.Content
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn(
|
|
41
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
42
|
-
className,
|
|
43
|
-
"alq--dialog-content"
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
{children}
|
|
48
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
49
|
-
<X className="h-4 w-4" />
|
|
50
|
-
<span className="sr-only">Close</span>
|
|
51
|
-
</DialogPrimitive.Close>
|
|
52
|
-
</DialogPrimitive.Content>
|
|
53
|
-
</DialogPortal>
|
|
54
|
-
));
|
|
55
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
56
|
-
|
|
57
|
-
const DialogHeader = ({
|
|
58
|
-
className,
|
|
59
|
-
...props
|
|
60
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
61
|
-
<div
|
|
62
|
-
className={cn(
|
|
63
|
-
"flex flex-col space-y-1.5 text-center sm:text-left text-foreground",
|
|
64
|
-
className,
|
|
65
|
-
"alq--dialog-header"
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
DialogHeader.displayName = "DialogHeader";
|
|
71
|
-
|
|
72
|
-
const DialogFooter = ({
|
|
73
|
-
className,
|
|
74
|
-
...props
|
|
75
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
76
|
-
<div
|
|
77
|
-
className={cn(
|
|
78
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
79
|
-
className
|
|
80
|
-
)}
|
|
81
|
-
{...props}
|
|
82
|
-
/>
|
|
83
|
-
);
|
|
84
|
-
DialogFooter.displayName = "DialogFooter";
|
|
85
|
-
|
|
86
|
-
const DialogTitle = React.forwardRef<
|
|
87
|
-
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
88
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
89
|
-
>(({ className, ...props }, ref) => (
|
|
90
|
-
<DialogPrimitive.Title
|
|
91
|
-
ref={ref}
|
|
92
|
-
className={cn(
|
|
93
|
-
"text-lg font-semibold leading-none tracking-tight text-foreground",
|
|
94
|
-
className,
|
|
95
|
-
"alq--dialog-title"
|
|
96
|
-
)}
|
|
97
|
-
{...props}
|
|
98
|
-
/>
|
|
99
|
-
));
|
|
100
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
101
|
-
|
|
102
|
-
const DialogDescription = React.forwardRef<
|
|
103
|
-
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
104
|
-
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
105
|
-
>(({ className, ...props }, ref) => (
|
|
106
|
-
<DialogPrimitive.Description
|
|
107
|
-
ref={ref}
|
|
108
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
109
|
-
{...props}
|
|
110
|
-
/>
|
|
111
|
-
));
|
|
112
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
113
|
-
|
|
114
|
-
export {
|
|
115
|
-
Dialog,
|
|
116
|
-
DialogPortal,
|
|
117
|
-
DialogOverlay,
|
|
118
|
-
DialogClose,
|
|
119
|
-
DialogTrigger,
|
|
120
|
-
DialogContent,
|
|
121
|
-
DialogHeader,
|
|
122
|
-
DialogFooter,
|
|
123
|
-
DialogTitle,
|
|
124
|
-
DialogDescription,
|
|
125
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Drawer = ({
|
|
9
|
-
shouldScaleBackground = true,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
|
|
12
|
-
<DrawerPrimitive.Root
|
|
13
|
-
shouldScaleBackground={shouldScaleBackground}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
Drawer.displayName = "Drawer";
|
|
18
|
-
|
|
19
|
-
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
20
|
-
|
|
21
|
-
const DrawerPortal = DrawerPrimitive.Portal;
|
|
22
|
-
|
|
23
|
-
const DrawerClose = DrawerPrimitive.Close;
|
|
24
|
-
|
|
25
|
-
const DrawerOverlay = React.forwardRef<
|
|
26
|
-
React.ElementRef<typeof DrawerPrimitive.Overlay>,
|
|
27
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
|
|
28
|
-
>(({ className, ...props }, ref) => (
|
|
29
|
-
<DrawerPrimitive.Overlay
|
|
30
|
-
ref={ref}
|
|
31
|
-
className={cn("fixed inset-0 z-50 bg-black/80", className)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
));
|
|
35
|
-
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
36
|
-
|
|
37
|
-
const DrawerContent = React.forwardRef<
|
|
38
|
-
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
39
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
40
|
-
>(({ className, children, ...props }, ref) => (
|
|
41
|
-
<DrawerPortal>
|
|
42
|
-
<DrawerOverlay />
|
|
43
|
-
<DrawerPrimitive.Content
|
|
44
|
-
ref={ref}
|
|
45
|
-
className={cn(
|
|
46
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-border bg-background text-foreground alq--drawer-content",
|
|
47
|
-
className
|
|
48
|
-
)}
|
|
49
|
-
{...props}
|
|
50
|
-
>
|
|
51
|
-
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
|
|
52
|
-
{children}
|
|
53
|
-
</DrawerPrimitive.Content>
|
|
54
|
-
</DrawerPortal>
|
|
55
|
-
));
|
|
56
|
-
DrawerContent.displayName = "DrawerContent";
|
|
57
|
-
|
|
58
|
-
const DrawerHeader = ({
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
62
|
-
<div
|
|
63
|
-
className={cn("grid gap-1.5 p-4 text-center sm:text-left", className, "alq--drawer-header")}
|
|
64
|
-
{...props}
|
|
65
|
-
/>
|
|
66
|
-
);
|
|
67
|
-
DrawerHeader.displayName = "DrawerHeader";
|
|
68
|
-
|
|
69
|
-
const DrawerFooter = ({
|
|
70
|
-
className,
|
|
71
|
-
...props
|
|
72
|
-
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
73
|
-
<div
|
|
74
|
-
className={cn("mt-auto flex flex-col gap-2 p-4", className, "alq--drawer-footer")}
|
|
75
|
-
{...props}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
DrawerFooter.displayName = "DrawerFooter";
|
|
79
|
-
|
|
80
|
-
const DrawerTitle = React.forwardRef<
|
|
81
|
-
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
82
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
83
|
-
>(({ className, ...props }, ref) => (
|
|
84
|
-
<DrawerPrimitive.Title
|
|
85
|
-
ref={ref}
|
|
86
|
-
className={cn(
|
|
87
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
88
|
-
className,
|
|
89
|
-
"alq--drawer-title"
|
|
90
|
-
)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
));
|
|
94
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
95
|
-
|
|
96
|
-
const DrawerDescription = React.forwardRef<
|
|
97
|
-
React.ElementRef<typeof DrawerPrimitive.Description>,
|
|
98
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
|
|
99
|
-
>(({ className, ...props }, ref) => (
|
|
100
|
-
<DrawerPrimitive.Description
|
|
101
|
-
ref={ref}
|
|
102
|
-
className={cn("text-sm text-muted-foreground", className, "alq--drawer-description")}
|
|
103
|
-
{...props}
|
|
104
|
-
/>
|
|
105
|
-
));
|
|
106
|
-
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
107
|
-
|
|
108
|
-
export {
|
|
109
|
-
Drawer,
|
|
110
|
-
DrawerPortal,
|
|
111
|
-
DrawerOverlay,
|
|
112
|
-
DrawerTrigger,
|
|
113
|
-
DrawerClose,
|
|
114
|
-
DrawerContent,
|
|
115
|
-
DrawerHeader,
|
|
116
|
-
DrawerFooter,
|
|
117
|
-
DrawerTitle,
|
|
118
|
-
DrawerDescription,
|
|
119
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../lib/utils";
|
|
4
|
-
|
|
5
|
-
export interface InputProps
|
|
6
|
-
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
7
|
-
|
|
8
|
-
const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
9
|
-
({ className, type, ...props }, ref) => {
|
|
10
|
-
return (
|
|
11
|
-
<input
|
|
12
|
-
type={type}
|
|
13
|
-
className={cn(
|
|
14
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
-
className,
|
|
16
|
-
"alq--input"
|
|
17
|
-
)}
|
|
18
|
-
ref={ref}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
Input.displayName = "Input";
|
|
25
|
-
|
|
26
|
-
export { Input };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../../lib/utils";
|
|
8
|
-
|
|
9
|
-
const labelVariants = cva(
|
|
10
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
const Label = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
15
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
16
|
-
VariantProps<typeof labelVariants>
|
|
17
|
-
>(({ className, ...props }, ref) => (
|
|
18
|
-
<LabelPrimitive.Root
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(labelVariants(), className, "alq--label")}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
));
|
|
24
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
|
25
|
-
|
|
26
|
-
export { Label };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// Loader.tsx
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
import { cn } from "../../../lib/utils";
|
|
5
|
-
import { Loader2 } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
const loaderVariants = cva(
|
|
8
|
-
"flex justify-center items-center w-full",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
size: {
|
|
12
|
-
small: "h-6 w-6",
|
|
13
|
-
medium: "h-8 w-8",
|
|
14
|
-
large: "h-12 w-12",
|
|
15
|
-
xl: "h-24 w-24",
|
|
16
|
-
},
|
|
17
|
-
colorVariant: {
|
|
18
|
-
default: "text-primary",
|
|
19
|
-
primary: "text-primary",
|
|
20
|
-
secondary: "text-secondary",
|
|
21
|
-
destructive: "text-destructive",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
size: "medium",
|
|
26
|
-
colorVariant: "default",
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
interface LoaderProps
|
|
32
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
33
|
-
VariantProps<typeof loaderVariants> {}
|
|
34
|
-
|
|
35
|
-
const Loader = React.forwardRef<HTMLDivElement, LoaderProps>(
|
|
36
|
-
(
|
|
37
|
-
{ className, size, colorVariant, ...props },
|
|
38
|
-
ref
|
|
39
|
-
) => (
|
|
40
|
-
<div
|
|
41
|
-
ref={ref}
|
|
42
|
-
className={cn(loaderVariants({ size, colorVariant }), "flex justify-center items-center h-full w-full", className)}
|
|
43
|
-
{...props}
|
|
44
|
-
>
|
|
45
|
-
<Loader2 className="animate-spin" />
|
|
46
|
-
</div>
|
|
47
|
-
)
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
Loader.displayName = "Loader";
|
|
51
|
-
|
|
52
|
-
export { Loader };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Popover = PopoverPrimitive.Root;
|
|
9
|
-
|
|
10
|
-
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
11
|
-
|
|
12
|
-
const PopoverContent = React.forwardRef<
|
|
13
|
-
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
14
|
-
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
15
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
16
|
-
<PopoverPrimitive.Portal>
|
|
17
|
-
<PopoverPrimitive.Content
|
|
18
|
-
ref={ref}
|
|
19
|
-
align={align}
|
|
20
|
-
sideOffset={sideOffset}
|
|
21
|
-
className={cn(
|
|
22
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
</PopoverPrimitive.Portal>
|
|
28
|
-
));
|
|
29
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
30
|
-
|
|
31
|
-
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import ReactMarkdown from "react-markdown";
|
|
3
|
-
import remarkGfm from "remark-gfm";
|
|
4
|
-
import { cn } from "../../../lib/utils";
|
|
5
|
-
|
|
6
|
-
interface RichTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
-
content: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function RichText({ content, className }: RichTextProps) {
|
|
12
|
-
return (
|
|
13
|
-
<ReactMarkdown className={cn(className)} remarkPlugins={[remarkGfm]}>
|
|
14
|
-
{content}
|
|
15
|
-
</ReactMarkdown>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { RichText };
|