@alquimia-ai/ui 1.2.0 → 1.2.1
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 +1 -1
- package/dist/components/hooks/index.js.map +1 -1
- package/dist/components/hooks/index.mjs +1 -1
- package/dist/components/hooks/index.mjs.map +1 -1
- package/dist/components/molecules/index.d.mts +15 -2
- package/dist/components/molecules/index.d.ts +15 -2
- package/dist/components/molecules/index.js +837 -725
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +819 -707
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/organisms/index.js +260 -149
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +258 -147
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +265 -153
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +263 -151
- package/dist/index.mjs.map +1 -1
- package/package.json +52 -32
- package/src/components/atoms/index.ts +32 -0
- package/src/components/atoms/ui/alert.tsx +59 -0
- package/src/components/atoms/ui/aspect-ratio.tsx +7 -0
- package/src/components/atoms/ui/avatar.tsx +50 -0
- package/src/components/atoms/ui/badge.tsx +36 -0
- package/src/components/atoms/ui/breadcrumb.tsx +120 -0
- package/src/components/atoms/ui/button.tsx +56 -0
- package/src/components/atoms/ui/card.tsx +87 -0
- package/src/components/atoms/ui/checkbox.tsx +31 -0
- package/src/components/atoms/ui/command.tsx +155 -0
- package/src/components/atoms/ui/dialog.tsx +125 -0
- package/src/components/atoms/ui/drawer.tsx +119 -0
- package/src/components/atoms/ui/input.tsx +26 -0
- package/src/components/atoms/ui/label.tsx +26 -0
- package/src/components/atoms/ui/loader.tsx +52 -0
- package/src/components/atoms/ui/popover.tsx +31 -0
- package/src/components/atoms/ui/rich-text.tsx +19 -0
- package/src/components/atoms/ui/scroll-area.tsx +48 -0
- package/src/components/atoms/ui/select.tsx +160 -0
- package/src/components/atoms/ui/skeleton.tsx +15 -0
- package/src/components/atoms/ui/slider.tsx +29 -0
- package/src/components/atoms/ui/switch.tsx +30 -0
- package/src/components/atoms/ui/table.tsx +118 -0
- package/src/components/atoms/ui/tabs.tsx +56 -0
- package/src/components/atoms/ui/text-area/index.tsx +24 -0
- package/src/components/atoms/ui/textarea.tsx +25 -0
- package/src/components/atoms/ui/think-indicator.tsx +103 -0
- package/src/components/atoms/ui/toast.tsx +129 -0
- package/src/components/atoms/ui/toaster.tsx +38 -0
- package/src/components/atoms/ui/toggle.tsx +45 -0
- package/src/components/atoms/ui/typography/index.tsx +30 -0
- package/src/components/hooks/index.ts +4 -0
- package/src/components/hooks/use-document.tsx +44 -0
- package/src/components/hooks/use-resize-observer.ts +28 -0
- package/src/components/hooks/use-text-streaming.ts +63 -0
- package/src/components/hooks/use-toast.ts +194 -0
- package/src/components/index.ts +1 -0
- package/src/components/molecules/alert-dialog.tsx +141 -0
- package/src/components/molecules/assistant-button.tsx +148 -0
- package/src/components/molecules/call-out.tsx +163 -0
- package/src/components/molecules/carousel.tsx +262 -0
- package/src/components/molecules/documents/document-selector.tsx +79 -0
- package/src/components/molecules/documents/document-viewer.tsx +85 -0
- package/src/components/molecules/documents/index.ts +2 -0
- package/src/components/molecules/index.ts +11 -0
- package/src/components/molecules/navigation-menu.tsx +128 -0
- package/src/components/molecules/page-container.tsx +17 -0
- package/src/components/molecules/rating-comment.tsx +93 -0
- package/src/components/molecules/rating-stars.tsx +136 -0
- package/src/components/molecules/rating-thumbs.tsx +90 -0
- package/src/components/molecules/sidebar.tsx +107 -0
- package/src/components/molecules/sonner.tsx +30 -0
- package/src/components/molecules/viewers/index.ts +2 -0
- package/src/components/molecules/viewers/pdf-viewer.tsx +138 -0
- package/src/components/molecules/viewers/plain-text-viewer.tsx +40 -0
- package/src/components/organisms/assistant.tsx +271 -0
- package/src/components/organisms/index.ts +6 -0
- package/src/components/organisms/rating-dialog.tsx +104 -0
- package/src/components/organisms/speechToText.tsx +92 -0
- package/src/components/organisms/whisper.tsx +106 -0
- package/src/components/templates/cards/index.ts +2 -0
- package/src/components/templates/cards/with-image-heading-description-avatar.tsx +94 -0
- package/src/components/templates/cards/with-image-heading-description.tsx +63 -0
- package/src/components/templates/hero/index.tsx +39 -0
- package/src/components/templates/index.ts +4 -0
- package/src/components/templates/messages-window.tsx +15 -0
- package/src/components/templates/query-box.tsx +13 -0
- package/src/components/ui/input.tsx +25 -0
- package/src/components/ui/select.tsx +163 -0
- package/src/index.ts +7 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/utils.ts +34 -0
- package/src/styles/call-out.css +153 -0
- package/src/styles/drawer.css +28 -0
- package/src/styles/globals.css +69 -0
- package/src/styles/prose.css +51 -0
- package/src/styles/ratings.css +27 -0
- package/src/styles/themes/base-alquimia.css +95 -0
- package/src/styles/themes/base-nordic.css +83 -0
- package/src/styles/themes/base-primary.css +85 -0
- package/src/styles/themes/base.css +8 -0
- package/src/types/index.ts +1 -0
- package/src/types/type.ts +76 -0
package/package.json
CHANGED
|
@@ -1,61 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alquimia-ai/ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"author": "Alquimia AI",
|
|
5
5
|
"description": "UI components for Alquimia SDK",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./
|
|
11
|
-
"import": "./
|
|
12
|
-
"require": "./dist/index.js"
|
|
10
|
+
"types": "./src/index.ts",
|
|
11
|
+
"import": "./src/index.ts",
|
|
12
|
+
"require": "./dist/index.js",
|
|
13
|
+
"development": "./src/index.ts",
|
|
14
|
+
"production": "./dist/index.js"
|
|
13
15
|
},
|
|
14
16
|
"./styles.css": "./dist/styles.css",
|
|
15
17
|
"./components/atoms": {
|
|
16
|
-
"types": "./
|
|
17
|
-
"import": "./
|
|
18
|
-
"require": "./dist/components/atoms/index.js"
|
|
18
|
+
"types": "./src/components/atoms/index.ts",
|
|
19
|
+
"import": "./src/components/atoms/index.ts",
|
|
20
|
+
"require": "./dist/components/atoms/index.js",
|
|
21
|
+
"development": "./src/components/atoms/index.ts",
|
|
22
|
+
"production": "./dist/components/atoms/index.js"
|
|
19
23
|
},
|
|
20
24
|
"./components/templates": {
|
|
21
|
-
"types": "./
|
|
22
|
-
"import": "./
|
|
23
|
-
"require": "./dist/components/templates/index.js"
|
|
25
|
+
"types": "./src/components/templates/index.ts",
|
|
26
|
+
"import": "./src/components/templates/index.ts",
|
|
27
|
+
"require": "./dist/components/templates/index.js",
|
|
28
|
+
"development": "./src/components/templates/index.ts",
|
|
29
|
+
"production": "./dist/components/templates/index.js"
|
|
24
30
|
},
|
|
25
31
|
"./components/organisms": {
|
|
26
|
-
"types": "./
|
|
27
|
-
"import": "./
|
|
28
|
-
"require": "./dist/components/organisms/index.js"
|
|
32
|
+
"types": "./src/components/organisms/index.ts",
|
|
33
|
+
"import": "./src/components/organisms/index.ts",
|
|
34
|
+
"require": "./dist/components/organisms/index.js",
|
|
35
|
+
"development": "./src/components/organisms/index.ts",
|
|
36
|
+
"production": "./dist/components/organisms/index.js"
|
|
29
37
|
},
|
|
30
38
|
"./components/molecules": {
|
|
31
|
-
"types": "./
|
|
32
|
-
"import": "./
|
|
33
|
-
"require": "./dist/components/molecules/index.js"
|
|
39
|
+
"types": "./src/components/molecules/index.ts",
|
|
40
|
+
"import": "./src/components/molecules/index.ts",
|
|
41
|
+
"require": "./dist/components/molecules/index.js",
|
|
42
|
+
"development": "./src/components/molecules/index.ts",
|
|
43
|
+
"production": "./dist/components/molecules/index.js"
|
|
34
44
|
},
|
|
35
45
|
"./components/hooks": {
|
|
36
|
-
"types": "./
|
|
37
|
-
"import": "./
|
|
38
|
-
"require": "./dist/components/hooks/index.js"
|
|
46
|
+
"types": "./src/components/hooks/index.ts",
|
|
47
|
+
"import": "./src/components/hooks/index.ts",
|
|
48
|
+
"require": "./dist/components/hooks/index.js",
|
|
49
|
+
"development": "./src/components/hooks/index.ts",
|
|
50
|
+
"production": "./dist/components/hooks/index.js"
|
|
39
51
|
},
|
|
40
52
|
"./components/molecules/viewers": {
|
|
41
|
-
"types": "./
|
|
42
|
-
"import": "./
|
|
43
|
-
"require": "./dist/components/molecules/viewers/index.js"
|
|
53
|
+
"types": "./src/components/molecules/viewers/index.ts",
|
|
54
|
+
"import": "./src/components/molecules/viewers/index.ts",
|
|
55
|
+
"require": "./dist/components/molecules/viewers/index.js",
|
|
56
|
+
"development": "./src/components/molecules/viewers/index.ts",
|
|
57
|
+
"production": "./dist/components/molecules/viewers/index.js"
|
|
44
58
|
},
|
|
45
59
|
"./components/molecules/documents": {
|
|
46
|
-
"types": "./
|
|
47
|
-
"import": "./
|
|
48
|
-
"require": "./dist/components/molecules/documents/index.js"
|
|
60
|
+
"types": "./src/components/molecules/documents/index.ts",
|
|
61
|
+
"import": "./src/components/molecules/documents/index.ts",
|
|
62
|
+
"require": "./dist/components/molecules/documents/index.js",
|
|
63
|
+
"development": "./src/components/molecules/documents/index.ts",
|
|
64
|
+
"production": "./dist/components/molecules/documents/index.js"
|
|
49
65
|
},
|
|
50
66
|
"./lib/utils": {
|
|
51
|
-
"types": "./
|
|
52
|
-
"import": "./
|
|
53
|
-
"require": "./dist/lib/index.js"
|
|
67
|
+
"types": "./src/lib/index.ts",
|
|
68
|
+
"import": "./src/lib/index.ts",
|
|
69
|
+
"require": "./dist/lib/index.js",
|
|
70
|
+
"development": "./src/lib/index.ts",
|
|
71
|
+
"production": "./dist/lib/index.js"
|
|
54
72
|
},
|
|
55
73
|
"./types": {
|
|
56
|
-
"types": "./
|
|
57
|
-
"import": "./
|
|
58
|
-
"require": "./dist/types/index.js"
|
|
74
|
+
"types": "./src/types/index.ts",
|
|
75
|
+
"import": "./src/types/index.ts",
|
|
76
|
+
"require": "./dist/types/index.js",
|
|
77
|
+
"development": "./src/types/index.ts",
|
|
78
|
+
"production": "./dist/types/index.js"
|
|
59
79
|
},
|
|
60
80
|
"./styles/*": {
|
|
61
81
|
"import": "./dist/styles/*",
|
|
@@ -71,11 +91,11 @@
|
|
|
71
91
|
"prebuild": "cd ../tools && npm run build",
|
|
72
92
|
"build": "tsup src/index.ts src/**/index.ts src/**/**/index.ts src/**/**/**/index.ts --format esm,cjs --target es2020 && cpx \"src/styles/**/*\" dist/styles",
|
|
73
93
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
74
|
-
"dev": "tsup src/index.ts src/**/index.ts src/**/**/index.ts src/**/**/**/index.ts --format esm,cjs --target es2020 --watch",
|
|
75
94
|
"genversion": "genversion --es6 --semi ./version.js"
|
|
76
95
|
},
|
|
77
96
|
"files": [
|
|
78
97
|
"dist/**",
|
|
98
|
+
"src/**",
|
|
79
99
|
"README.md",
|
|
80
100
|
"package.json"
|
|
81
101
|
],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from "./ui/button";
|
|
2
|
+
export * from "./ui/textarea";
|
|
3
|
+
export * from "./ui/input";
|
|
4
|
+
export * from "./ui/select";
|
|
5
|
+
export * from "./ui/avatar";
|
|
6
|
+
export * from "./ui/scroll-area";
|
|
7
|
+
export * from "./ui/rich-text";
|
|
8
|
+
export * from "./ui/skeleton";
|
|
9
|
+
export * from "./ui/card";
|
|
10
|
+
export * from "./ui/drawer";
|
|
11
|
+
export * from "./ui/typography";
|
|
12
|
+
export * from "./ui/badge";
|
|
13
|
+
export * from "./ui/alert";
|
|
14
|
+
export * from "./ui/input";
|
|
15
|
+
export * from "./ui/label";
|
|
16
|
+
export * from "./ui/checkbox";
|
|
17
|
+
export * from "./ui/toggle";
|
|
18
|
+
export * from "./ui/select";
|
|
19
|
+
export * from "./ui/slider";
|
|
20
|
+
export * from "./ui/switch";
|
|
21
|
+
export * from "./ui/tabs";
|
|
22
|
+
export * from "./ui/aspect-ratio";
|
|
23
|
+
export * from "./ui/table";
|
|
24
|
+
export * from "./ui/breadcrumb";
|
|
25
|
+
export * from "../molecules/alert-dialog";
|
|
26
|
+
export * from "./ui/popover";
|
|
27
|
+
export * from "./ui/command";
|
|
28
|
+
export * from "./ui/dialog";
|
|
29
|
+
export * from "./ui/toast";
|
|
30
|
+
export * from "./ui/loader";
|
|
31
|
+
export * from "./ui/toaster";
|
|
32
|
+
export * from "./ui/think-indicator";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../../lib/utils";
|
|
5
|
+
|
|
6
|
+
const alertVariants = cva(
|
|
7
|
+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-background text-foreground",
|
|
12
|
+
destructive:
|
|
13
|
+
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const Alert = React.forwardRef<
|
|
23
|
+
HTMLDivElement,
|
|
24
|
+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
25
|
+
>(({ className, variant, ...props }, ref) => (
|
|
26
|
+
<div
|
|
27
|
+
ref={ref}
|
|
28
|
+
role="alert"
|
|
29
|
+
className={cn(alertVariants({ variant }), className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
33
|
+
Alert.displayName = "Alert";
|
|
34
|
+
|
|
35
|
+
const AlertTitle = React.forwardRef<
|
|
36
|
+
HTMLParagraphElement,
|
|
37
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
38
|
+
>(({ className, ...props }, ref) => (
|
|
39
|
+
<h5
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
));
|
|
45
|
+
AlertTitle.displayName = "AlertTitle";
|
|
46
|
+
|
|
47
|
+
const AlertDescription = React.forwardRef<
|
|
48
|
+
HTMLParagraphElement,
|
|
49
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
50
|
+
>(({ className, ...props }, ref) => (
|
|
51
|
+
<div
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
));
|
|
57
|
+
AlertDescription.displayName = "AlertDescription";
|
|
58
|
+
|
|
59
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../../../lib/utils";
|
|
7
|
+
|
|
8
|
+
const Avatar = React.forwardRef<
|
|
9
|
+
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
|
+
>(({ className, ...props }, ref) => (
|
|
12
|
+
<AvatarPrimitive.Root
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn(
|
|
15
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
))
|
|
21
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName
|
|
22
|
+
|
|
23
|
+
const AvatarImage = React.forwardRef<
|
|
24
|
+
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
26
|
+
>(({ className, ...props }, ref) => (
|
|
27
|
+
<AvatarPrimitive.Image
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={cn("aspect-square h-full w-full", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
))
|
|
33
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
|
34
|
+
|
|
35
|
+
const AvatarFallback = React.forwardRef<
|
|
36
|
+
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
37
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
38
|
+
>(({ className, ...props }, ref) => (
|
|
39
|
+
<AvatarPrimitive.Fallback
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn(
|
|
42
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
43
|
+
className
|
|
44
|
+
)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
))
|
|
48
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
49
|
+
|
|
50
|
+
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../../lib/utils";
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva(
|
|
7
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default:
|
|
12
|
+
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
13
|
+
secondary:
|
|
14
|
+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
+
destructive:
|
|
16
|
+
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
17
|
+
outline: "text-foreground",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
export interface BadgeProps
|
|
27
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
28
|
+
VariantProps<typeof badgeVariants> {}
|
|
29
|
+
|
|
30
|
+
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
31
|
+
return (
|
|
32
|
+
<div className={cn(badgeVariants({ variant }), className, "alq--badge")} {...props} />
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Badge, badgeVariants }
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
interface BreadcrumbItemProps {
|
|
7
|
+
label: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
current?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Breadcrumb = React.forwardRef<
|
|
13
|
+
HTMLElement,
|
|
14
|
+
React.ComponentPropsWithoutRef<"nav"> & {
|
|
15
|
+
separator?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
18
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
19
|
+
|
|
20
|
+
const BreadcrumbList = React.forwardRef<
|
|
21
|
+
HTMLOListElement,
|
|
22
|
+
React.ComponentPropsWithoutRef<"ol">
|
|
23
|
+
>(({ className, ...props }, ref) => (
|
|
24
|
+
<ol
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn(
|
|
27
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
));
|
|
33
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
34
|
+
|
|
35
|
+
const BreadcrumbItem = React.forwardRef<
|
|
36
|
+
HTMLLIElement,
|
|
37
|
+
React.ComponentPropsWithoutRef<"li">
|
|
38
|
+
>(({ className, ...props }, ref) => (
|
|
39
|
+
<li
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn("inline-flex items-center gap-1.5", className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
));
|
|
45
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
46
|
+
|
|
47
|
+
const BreadcrumbLink = React.forwardRef<
|
|
48
|
+
HTMLAnchorElement,
|
|
49
|
+
React.ComponentPropsWithoutRef<"a"> & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}
|
|
52
|
+
>(({ asChild, className, ...props }, ref) => {
|
|
53
|
+
const Comp = asChild ? Slot : "a";
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Comp
|
|
57
|
+
ref={ref}
|
|
58
|
+
className={cn("transition-colors hover:text-foreground", className)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
64
|
+
|
|
65
|
+
const BreadcrumbPage = React.forwardRef<
|
|
66
|
+
HTMLSpanElement,
|
|
67
|
+
React.ComponentPropsWithoutRef<"span">
|
|
68
|
+
>(({ className, ...props }, ref) => (
|
|
69
|
+
<span
|
|
70
|
+
ref={ref}
|
|
71
|
+
role="link"
|
|
72
|
+
aria-disabled="true"
|
|
73
|
+
aria-current="page"
|
|
74
|
+
className={cn("font-normal text-foreground", className)}
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
));
|
|
78
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
79
|
+
|
|
80
|
+
const BreadcrumbSeparator = ({
|
|
81
|
+
children,
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}: React.ComponentProps<"li">) => (
|
|
85
|
+
<li
|
|
86
|
+
role="presentation"
|
|
87
|
+
aria-hidden="true"
|
|
88
|
+
className={cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)}
|
|
89
|
+
{...props}
|
|
90
|
+
>
|
|
91
|
+
{children ?? <ChevronRight />}
|
|
92
|
+
</li>
|
|
93
|
+
);
|
|
94
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
95
|
+
|
|
96
|
+
const BreadcrumbEllipsis = ({
|
|
97
|
+
className,
|
|
98
|
+
...props
|
|
99
|
+
}: React.ComponentProps<"span">) => (
|
|
100
|
+
<span
|
|
101
|
+
role="presentation"
|
|
102
|
+
aria-hidden="true"
|
|
103
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
104
|
+
{...props}
|
|
105
|
+
>
|
|
106
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
107
|
+
<span className="sr-only">More</span>
|
|
108
|
+
</span>
|
|
109
|
+
);
|
|
110
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
111
|
+
|
|
112
|
+
export {
|
|
113
|
+
Breadcrumb,
|
|
114
|
+
BreadcrumbList,
|
|
115
|
+
BreadcrumbItem,
|
|
116
|
+
BreadcrumbLink,
|
|
117
|
+
BreadcrumbPage,
|
|
118
|
+
BreadcrumbSeparator,
|
|
119
|
+
BreadcrumbEllipsis,
|
|
120
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive:
|
|
14
|
+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
15
|
+
outline:
|
|
16
|
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
secondary:
|
|
18
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "h-10 px-4 py-2",
|
|
24
|
+
sm: "h-9 rounded-md px-3",
|
|
25
|
+
lg: "h-11 rounded-md px-8",
|
|
26
|
+
icon: "h-10 w-10",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default",
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export interface ButtonProps
|
|
37
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
38
|
+
VariantProps<typeof buttonVariants> {
|
|
39
|
+
asChild?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
43
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
45
|
+
return (
|
|
46
|
+
<Comp
|
|
47
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
48
|
+
ref={ref}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
Button.displayName = "Button";
|
|
55
|
+
|
|
56
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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 };
|