@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,48 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const ScrollArea = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
|
11
|
-
>(({ className, children, ...props }, ref) => (
|
|
12
|
-
<ScrollAreaPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn("relative overflow-hidden", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
>
|
|
17
|
-
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
|
|
18
|
-
{children}
|
|
19
|
-
</ScrollAreaPrimitive.Viewport>
|
|
20
|
-
<ScrollBar />
|
|
21
|
-
<ScrollAreaPrimitive.Corner />
|
|
22
|
-
</ScrollAreaPrimitive.Root>
|
|
23
|
-
))
|
|
24
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
|
|
25
|
-
|
|
26
|
-
const ScrollBar = React.forwardRef<
|
|
27
|
-
React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
|
|
28
|
-
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
29
|
-
>(({ className, orientation = "vertical", ...props }, ref) => (
|
|
30
|
-
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
31
|
-
ref={ref}
|
|
32
|
-
orientation={orientation}
|
|
33
|
-
className={cn(
|
|
34
|
-
"flex touch-none select-none transition-colors",
|
|
35
|
-
orientation === "vertical" &&
|
|
36
|
-
"h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
37
|
-
orientation === "horizontal" &&
|
|
38
|
-
"h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
39
|
-
className
|
|
40
|
-
)}
|
|
41
|
-
{...props}
|
|
42
|
-
>
|
|
43
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
|
44
|
-
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
45
|
-
))
|
|
46
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
|
|
47
|
-
|
|
48
|
-
export { ScrollArea, ScrollBar }
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
-
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Select = SelectPrimitive.Root;
|
|
9
|
-
|
|
10
|
-
const SelectGroup = SelectPrimitive.Group;
|
|
11
|
-
|
|
12
|
-
const SelectValue = SelectPrimitive.Value;
|
|
13
|
-
|
|
14
|
-
const SelectTrigger = React.forwardRef<
|
|
15
|
-
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
16
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
|
|
17
|
-
>(({ className, children, ...props }, ref) => (
|
|
18
|
-
<SelectPrimitive.Trigger
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(
|
|
21
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
22
|
-
className,
|
|
23
|
-
"alq--select"
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
>
|
|
27
|
-
{children}
|
|
28
|
-
<SelectPrimitive.Icon asChild>
|
|
29
|
-
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
30
|
-
</SelectPrimitive.Icon>
|
|
31
|
-
</SelectPrimitive.Trigger>
|
|
32
|
-
));
|
|
33
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
34
|
-
|
|
35
|
-
const SelectScrollUpButton = React.forwardRef<
|
|
36
|
-
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
37
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
38
|
-
>(({ className, ...props }, ref) => (
|
|
39
|
-
<SelectPrimitive.ScrollUpButton
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn(
|
|
42
|
-
"flex cursor-default items-center justify-center py-1",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
>
|
|
47
|
-
<ChevronUp className="h-4 w-4" />
|
|
48
|
-
</SelectPrimitive.ScrollUpButton>
|
|
49
|
-
));
|
|
50
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
51
|
-
|
|
52
|
-
const SelectScrollDownButton = React.forwardRef<
|
|
53
|
-
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
54
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
55
|
-
>(({ className, ...props }, ref) => (
|
|
56
|
-
<SelectPrimitive.ScrollDownButton
|
|
57
|
-
ref={ref}
|
|
58
|
-
className={cn(
|
|
59
|
-
"flex cursor-default items-center justify-center py-1",
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
>
|
|
64
|
-
<ChevronDown className="h-4 w-4" />
|
|
65
|
-
</SelectPrimitive.ScrollDownButton>
|
|
66
|
-
));
|
|
67
|
-
SelectScrollDownButton.displayName =
|
|
68
|
-
SelectPrimitive.ScrollDownButton.displayName;
|
|
69
|
-
|
|
70
|
-
const SelectContent = React.forwardRef<
|
|
71
|
-
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
72
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
73
|
-
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
74
|
-
<SelectPrimitive.Portal>
|
|
75
|
-
<SelectPrimitive.Content
|
|
76
|
-
ref={ref}
|
|
77
|
-
className={cn(
|
|
78
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
79
|
-
position === "popper" &&
|
|
80
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
81
|
-
className
|
|
82
|
-
)}
|
|
83
|
-
position={position}
|
|
84
|
-
{...props}
|
|
85
|
-
>
|
|
86
|
-
<SelectScrollUpButton />
|
|
87
|
-
<SelectPrimitive.Viewport
|
|
88
|
-
className={cn(
|
|
89
|
-
"p-1",
|
|
90
|
-
position === "popper" &&
|
|
91
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
92
|
-
)}
|
|
93
|
-
>
|
|
94
|
-
{children}
|
|
95
|
-
</SelectPrimitive.Viewport>
|
|
96
|
-
<SelectScrollDownButton />
|
|
97
|
-
</SelectPrimitive.Content>
|
|
98
|
-
</SelectPrimitive.Portal>
|
|
99
|
-
));
|
|
100
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
101
|
-
|
|
102
|
-
const SelectLabel = React.forwardRef<
|
|
103
|
-
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
104
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
105
|
-
>(({ className, ...props }, ref) => (
|
|
106
|
-
<SelectPrimitive.Label
|
|
107
|
-
ref={ref}
|
|
108
|
-
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
109
|
-
{...props}
|
|
110
|
-
/>
|
|
111
|
-
));
|
|
112
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
113
|
-
|
|
114
|
-
const SelectItem = React.forwardRef<
|
|
115
|
-
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
116
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
117
|
-
>(({ className, children, ...props }, ref) => (
|
|
118
|
-
<SelectPrimitive.Item
|
|
119
|
-
ref={ref}
|
|
120
|
-
className={cn(
|
|
121
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
122
|
-
className
|
|
123
|
-
)}
|
|
124
|
-
{...props}
|
|
125
|
-
>
|
|
126
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
127
|
-
<SelectPrimitive.ItemIndicator>
|
|
128
|
-
<Check className="h-4 w-4" />
|
|
129
|
-
</SelectPrimitive.ItemIndicator>
|
|
130
|
-
</span>
|
|
131
|
-
|
|
132
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
133
|
-
</SelectPrimitive.Item>
|
|
134
|
-
));
|
|
135
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
136
|
-
|
|
137
|
-
const SelectSeparator = React.forwardRef<
|
|
138
|
-
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
139
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
140
|
-
>(({ className, ...props }, ref) => (
|
|
141
|
-
<SelectPrimitive.Separator
|
|
142
|
-
ref={ref}
|
|
143
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
144
|
-
{...props}
|
|
145
|
-
/>
|
|
146
|
-
));
|
|
147
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
148
|
-
|
|
149
|
-
export {
|
|
150
|
-
Select,
|
|
151
|
-
SelectGroup,
|
|
152
|
-
SelectValue,
|
|
153
|
-
SelectTrigger,
|
|
154
|
-
SelectContent,
|
|
155
|
-
SelectLabel,
|
|
156
|
-
SelectItem,
|
|
157
|
-
SelectSeparator,
|
|
158
|
-
SelectScrollUpButton,
|
|
159
|
-
SelectScrollDownButton,
|
|
160
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils";
|
|
2
|
-
|
|
3
|
-
function Skeleton({
|
|
4
|
-
className,
|
|
5
|
-
...props
|
|
6
|
-
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className={cn("animate-pulse rounded-md bg-muted text-muted-foreground", className, "alq--skeleton")}
|
|
10
|
-
{...props}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { Skeleton };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Slider = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SliderPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<SliderPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative flex w-44 touch-none select-none items-center",
|
|
16
|
-
className,
|
|
17
|
-
"alq--slider"
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
>
|
|
21
|
-
<SliderPrimitive.Track className="relative h-2 w-44 grow overflow-hidden rounded-full bg-primary">
|
|
22
|
-
<SliderPrimitive.Range className="absolute h-full bg-secondary" />
|
|
23
|
-
</SliderPrimitive.Track>
|
|
24
|
-
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-gray bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
|
|
25
|
-
</SliderPrimitive.Root>
|
|
26
|
-
));
|
|
27
|
-
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
28
|
-
|
|
29
|
-
export { Slider };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Switch = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<SwitchPrimitives.Root
|
|
13
|
-
className={cn(
|
|
14
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
15
|
-
className,
|
|
16
|
-
"alq--switch"
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
ref={ref}
|
|
20
|
-
>
|
|
21
|
-
<SwitchPrimitives.Thumb
|
|
22
|
-
className={cn(
|
|
23
|
-
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
24
|
-
)}
|
|
25
|
-
/>
|
|
26
|
-
</SwitchPrimitives.Root>
|
|
27
|
-
));
|
|
28
|
-
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
29
|
-
|
|
30
|
-
export { Switch };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../lib/utils";
|
|
4
|
-
|
|
5
|
-
const Table = React.forwardRef<
|
|
6
|
-
HTMLTableElement,
|
|
7
|
-
React.HTMLAttributes<HTMLTableElement>
|
|
8
|
-
>(({ className, ...props }, ref) => (
|
|
9
|
-
<div className="relative w-full overflow-auto">
|
|
10
|
-
<table
|
|
11
|
-
ref={ref}
|
|
12
|
-
className={cn("w-full caption-bottom text-sm text-foreground bg-background", className, "alq--table")}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
));
|
|
17
|
-
Table.displayName = "Table";
|
|
18
|
-
|
|
19
|
-
const TableHeader = React.forwardRef<
|
|
20
|
-
HTMLTableSectionElement,
|
|
21
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
22
|
-
>(({ className, ...props }, ref) => (
|
|
23
|
-
<thead ref={ref} className={cn("[&_tr]:border-b border-border bg-muted", className, "alq--table-header")} {...props} />
|
|
24
|
-
));
|
|
25
|
-
TableHeader.displayName = "TableHeader";
|
|
26
|
-
|
|
27
|
-
const TableBody = React.forwardRef<
|
|
28
|
-
HTMLTableSectionElement,
|
|
29
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
30
|
-
>(({ className, ...props }, ref) => (
|
|
31
|
-
<tbody
|
|
32
|
-
ref={ref}
|
|
33
|
-
className={cn("[&_tr:last-child]:border-0 [&_tr]:border-b border-border", className, "alq--table-body")}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
));
|
|
37
|
-
TableBody.displayName = "TableBody";
|
|
38
|
-
|
|
39
|
-
const TableFooter = React.forwardRef<
|
|
40
|
-
HTMLTableSectionElement,
|
|
41
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
42
|
-
>(({ className, ...props }, ref) => (
|
|
43
|
-
<tfoot
|
|
44
|
-
ref={ref}
|
|
45
|
-
className={cn(
|
|
46
|
-
"border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
47
|
-
className,
|
|
48
|
-
"alq--table-footer"
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
));
|
|
53
|
-
TableFooter.displayName = "TableFooter";
|
|
54
|
-
|
|
55
|
-
const TableRow = React.forwardRef<
|
|
56
|
-
HTMLTableRowElement,
|
|
57
|
-
React.HTMLAttributes<HTMLTableRowElement>
|
|
58
|
-
>(({ className, ...props }, ref) => (
|
|
59
|
-
<tr
|
|
60
|
-
ref={ref}
|
|
61
|
-
className={cn(
|
|
62
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
63
|
-
className
|
|
64
|
-
)}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
));
|
|
68
|
-
TableRow.displayName = "TableRow";
|
|
69
|
-
|
|
70
|
-
const TableHead = React.forwardRef<
|
|
71
|
-
HTMLTableCellElement,
|
|
72
|
-
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
73
|
-
>(({ className, ...props }, ref) => (
|
|
74
|
-
<th
|
|
75
|
-
ref={ref}
|
|
76
|
-
className={cn(
|
|
77
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
78
|
-
className
|
|
79
|
-
)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
));
|
|
83
|
-
TableHead.displayName = "TableHead";
|
|
84
|
-
|
|
85
|
-
const TableCell = React.forwardRef<
|
|
86
|
-
HTMLTableCellElement,
|
|
87
|
-
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
88
|
-
>(({ className, ...props }, ref) => (
|
|
89
|
-
<td
|
|
90
|
-
ref={ref}
|
|
91
|
-
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
));
|
|
95
|
-
TableCell.displayName = "TableCell";
|
|
96
|
-
|
|
97
|
-
const TableCaption = React.forwardRef<
|
|
98
|
-
HTMLTableCaptionElement,
|
|
99
|
-
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
100
|
-
>(({ className, ...props }, ref) => (
|
|
101
|
-
<caption
|
|
102
|
-
ref={ref}
|
|
103
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
104
|
-
{...props}
|
|
105
|
-
/>
|
|
106
|
-
));
|
|
107
|
-
TableCaption.displayName = "TableCaption";
|
|
108
|
-
|
|
109
|
-
export {
|
|
110
|
-
Table,
|
|
111
|
-
TableHeader,
|
|
112
|
-
TableBody,
|
|
113
|
-
TableFooter,
|
|
114
|
-
TableHead,
|
|
115
|
-
TableRow,
|
|
116
|
-
TableCell,
|
|
117
|
-
TableCaption,
|
|
118
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Tabs = TabsPrimitive.Root;
|
|
9
|
-
|
|
10
|
-
const TabsList = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof TabsPrimitive.List>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
13
|
-
>(({ className, ...props }, ref) => (
|
|
14
|
-
<TabsPrimitive.List
|
|
15
|
-
ref={ref}
|
|
16
|
-
className={cn(
|
|
17
|
-
"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground",
|
|
18
|
-
className,
|
|
19
|
-
"alq--tabs"
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
));
|
|
24
|
-
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
25
|
-
|
|
26
|
-
const TabsTrigger = React.forwardRef<
|
|
27
|
-
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
28
|
-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
29
|
-
>(({ className, ...props }, ref) => (
|
|
30
|
-
<TabsPrimitive.Trigger
|
|
31
|
-
ref={ref}
|
|
32
|
-
className={cn(
|
|
33
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:border-b-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
));
|
|
39
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
40
|
-
|
|
41
|
-
const TabsContent = React.forwardRef<
|
|
42
|
-
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
43
|
-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
44
|
-
>(({ className, ...props }, ref) => (
|
|
45
|
-
<TabsPrimitive.Content
|
|
46
|
-
ref={ref}
|
|
47
|
-
className={cn(
|
|
48
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
49
|
-
className
|
|
50
|
-
)}
|
|
51
|
-
{...props}
|
|
52
|
-
/>
|
|
53
|
-
));
|
|
54
|
-
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
55
|
-
|
|
56
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../../lib/utils";
|
|
4
|
-
|
|
5
|
-
export interface TextareaProps
|
|
6
|
-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
7
|
-
|
|
8
|
-
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
9
|
-
({ className, ...props }, ref) => {
|
|
10
|
-
return (
|
|
11
|
-
<textarea
|
|
12
|
-
className={cn(
|
|
13
|
-
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
ref={ref}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
Textarea.displayName = "Textarea";
|
|
23
|
-
|
|
24
|
-
export { Textarea };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../lib/utils";
|
|
4
|
-
|
|
5
|
-
export interface TextareaProps
|
|
6
|
-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
7
|
-
|
|
8
|
-
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
9
|
-
({ className, ...props }, ref) => {
|
|
10
|
-
return (
|
|
11
|
-
<textarea
|
|
12
|
-
className={cn(
|
|
13
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",
|
|
14
|
-
className,
|
|
15
|
-
"alq--textarea"
|
|
16
|
-
)}
|
|
17
|
-
ref={ref}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
Textarea.displayName = "Textarea";
|
|
24
|
-
|
|
25
|
-
export { Textarea };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { useState, useEffect } from "react";
|
|
5
|
-
import { Loader } from "..";
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
8
|
-
|
|
9
|
-
const thinkIndicatorVariants = cva(
|
|
10
|
-
"flex items-center gap-3",
|
|
11
|
-
{
|
|
12
|
-
variants: {
|
|
13
|
-
variant: {
|
|
14
|
-
default: "text-muted-foreground",
|
|
15
|
-
primary: "text-primary",
|
|
16
|
-
secondary: "text-secondary",
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
default: "gap-3",
|
|
20
|
-
sm: "gap-2",
|
|
21
|
-
lg: "gap-4",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
variant: "default",
|
|
26
|
-
size: "default",
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
export interface ThinkIndicatorProps
|
|
32
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
33
|
-
VariantProps<typeof thinkIndicatorVariants> {
|
|
34
|
-
thoughts?: string[];
|
|
35
|
-
interval?: number;
|
|
36
|
-
loader?: React.ReactNode;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const ThinkIndicator = React.forwardRef<HTMLDivElement, ThinkIndicatorProps>(
|
|
40
|
-
({
|
|
41
|
-
className,
|
|
42
|
-
variant,
|
|
43
|
-
size,
|
|
44
|
-
thoughts = [
|
|
45
|
-
"Analyzing your request...",
|
|
46
|
-
"Processing information...",
|
|
47
|
-
"Formulating response...",
|
|
48
|
-
],
|
|
49
|
-
interval = 5000,
|
|
50
|
-
loader,
|
|
51
|
-
...props
|
|
52
|
-
}, ref) => {
|
|
53
|
-
const [currentThoughtIndex, setCurrentThoughtIndex] = useState<number>(0);
|
|
54
|
-
const [isAnimating, setIsAnimating] = useState<boolean>(false);
|
|
55
|
-
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
const timer = setInterval(() => {
|
|
58
|
-
setIsAnimating(true);
|
|
59
|
-
setTimeout(() => {
|
|
60
|
-
setCurrentThoughtIndex((prev) => {
|
|
61
|
-
return prev < thoughts.length - 1 ? prev + 1 : prev;
|
|
62
|
-
});
|
|
63
|
-
setIsAnimating(false);
|
|
64
|
-
}, 300);
|
|
65
|
-
}, interval);
|
|
66
|
-
|
|
67
|
-
if (currentThoughtIndex === thoughts.length - 1) {
|
|
68
|
-
clearInterval(timer);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return () => clearInterval(timer);
|
|
72
|
-
}, [thoughts, interval, currentThoughtIndex]);
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<div
|
|
76
|
-
ref={ref}
|
|
77
|
-
className={cn(thinkIndicatorVariants({ variant, size }), className, "alq--think-indicator")}
|
|
78
|
-
{...props}
|
|
79
|
-
>
|
|
80
|
-
{loader || (
|
|
81
|
-
<Loader
|
|
82
|
-
className={cn(
|
|
83
|
-
size === "sm" ? "h-3 w-3" : size === "lg" ? "h-5 w-5" : "h-4 w-4"
|
|
84
|
-
)}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
<div
|
|
88
|
-
className={cn(
|
|
89
|
-
"alq--think-indicator-text",
|
|
90
|
-
"transition-all duration-300",
|
|
91
|
-
isAnimating ? "opacity-0 -translate-y-2" : "opacity-100 translate-y-0"
|
|
92
|
-
)}
|
|
93
|
-
>
|
|
94
|
-
{thoughts[currentThoughtIndex]}
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
ThinkIndicator.displayName = "ThinkIndicator";
|
|
102
|
-
|
|
103
|
-
export { thinkIndicatorVariants };
|