@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.
Files changed (101) hide show
  1. package/dist/components/hooks/index.js +41 -32
  2. package/dist/components/hooks/index.js.map +1 -1
  3. package/dist/components/hooks/index.mjs +42 -33
  4. package/dist/components/hooks/index.mjs.map +1 -1
  5. package/dist/components/molecules/index.js +41 -32
  6. package/dist/components/molecules/index.js.map +1 -1
  7. package/dist/components/molecules/index.mjs +42 -33
  8. package/dist/components/molecules/index.mjs.map +1 -1
  9. package/dist/components/organisms/index.js +41 -32
  10. package/dist/components/organisms/index.js.map +1 -1
  11. package/dist/components/organisms/index.mjs +42 -33
  12. package/dist/components/organisms/index.mjs.map +1 -1
  13. package/dist/index.js +41 -32
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +42 -33
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/package.json +136 -0
  18. package/package.json +50 -53
  19. package/src/components/atoms/index.ts +0 -32
  20. package/src/components/atoms/ui/alert.tsx +0 -59
  21. package/src/components/atoms/ui/aspect-ratio.tsx +0 -7
  22. package/src/components/atoms/ui/avatar.tsx +0 -50
  23. package/src/components/atoms/ui/badge.tsx +0 -36
  24. package/src/components/atoms/ui/breadcrumb.tsx +0 -120
  25. package/src/components/atoms/ui/button.tsx +0 -56
  26. package/src/components/atoms/ui/card.tsx +0 -87
  27. package/src/components/atoms/ui/checkbox.tsx +0 -31
  28. package/src/components/atoms/ui/command.tsx +0 -155
  29. package/src/components/atoms/ui/dialog.tsx +0 -125
  30. package/src/components/atoms/ui/drawer.tsx +0 -119
  31. package/src/components/atoms/ui/input.tsx +0 -26
  32. package/src/components/atoms/ui/label.tsx +0 -26
  33. package/src/components/atoms/ui/loader.tsx +0 -52
  34. package/src/components/atoms/ui/popover.tsx +0 -31
  35. package/src/components/atoms/ui/rich-text.tsx +0 -19
  36. package/src/components/atoms/ui/scroll-area.tsx +0 -48
  37. package/src/components/atoms/ui/select.tsx +0 -160
  38. package/src/components/atoms/ui/skeleton.tsx +0 -15
  39. package/src/components/atoms/ui/slider.tsx +0 -29
  40. package/src/components/atoms/ui/switch.tsx +0 -30
  41. package/src/components/atoms/ui/table.tsx +0 -118
  42. package/src/components/atoms/ui/tabs.tsx +0 -56
  43. package/src/components/atoms/ui/text-area/index.tsx +0 -24
  44. package/src/components/atoms/ui/textarea.tsx +0 -25
  45. package/src/components/atoms/ui/think-indicator.tsx +0 -103
  46. package/src/components/atoms/ui/toast.tsx +0 -129
  47. package/src/components/atoms/ui/toaster.tsx +0 -38
  48. package/src/components/atoms/ui/toggle.tsx +0 -45
  49. package/src/components/atoms/ui/typography/index.tsx +0 -30
  50. package/src/components/hooks/index.ts +0 -4
  51. package/src/components/hooks/use-document.tsx +0 -44
  52. package/src/components/hooks/use-resize-observer.ts +0 -28
  53. package/src/components/hooks/use-text-streaming.ts +0 -63
  54. package/src/components/hooks/use-toast.ts +0 -194
  55. package/src/components/index.ts +0 -1
  56. package/src/components/molecules/alert-dialog.tsx +0 -141
  57. package/src/components/molecules/assistant-button.tsx +0 -148
  58. package/src/components/molecules/call-out.tsx +0 -163
  59. package/src/components/molecules/carousel.tsx +0 -262
  60. package/src/components/molecules/documents/document-selector.tsx +0 -79
  61. package/src/components/molecules/documents/document-viewer.tsx +0 -85
  62. package/src/components/molecules/documents/index.ts +0 -2
  63. package/src/components/molecules/index.ts +0 -11
  64. package/src/components/molecules/navigation-menu.tsx +0 -128
  65. package/src/components/molecules/page-container.tsx +0 -17
  66. package/src/components/molecules/rating-comment.tsx +0 -93
  67. package/src/components/molecules/rating-stars.tsx +0 -136
  68. package/src/components/molecules/rating-thumbs.tsx +0 -90
  69. package/src/components/molecules/sidebar.tsx +0 -107
  70. package/src/components/molecules/sonner.tsx +0 -30
  71. package/src/components/molecules/viewers/index.ts +0 -2
  72. package/src/components/molecules/viewers/pdf-viewer.tsx +0 -138
  73. package/src/components/molecules/viewers/plain-text-viewer.tsx +0 -40
  74. package/src/components/organisms/assistant.tsx +0 -271
  75. package/src/components/organisms/index.ts +0 -6
  76. package/src/components/organisms/rating-dialog.tsx +0 -104
  77. package/src/components/organisms/speechToText.tsx +0 -92
  78. package/src/components/organisms/whisper.tsx +0 -106
  79. package/src/components/templates/cards/index.ts +0 -2
  80. package/src/components/templates/cards/with-image-heading-description-avatar.tsx +0 -94
  81. package/src/components/templates/cards/with-image-heading-description.tsx +0 -63
  82. package/src/components/templates/hero/index.tsx +0 -39
  83. package/src/components/templates/index.ts +0 -4
  84. package/src/components/templates/messages-window.tsx +0 -15
  85. package/src/components/templates/query-box.tsx +0 -13
  86. package/src/components/ui/input.tsx +0 -25
  87. package/src/components/ui/select.tsx +0 -163
  88. package/src/index.ts +0 -7
  89. package/src/lib/index.ts +0 -1
  90. package/src/lib/utils.ts +0 -34
  91. package/src/styles/call-out.css +0 -153
  92. package/src/styles/drawer.css +0 -28
  93. package/src/styles/globals.css +0 -69
  94. package/src/styles/prose.css +0 -51
  95. package/src/styles/ratings.css +0 -27
  96. package/src/styles/themes/base-alquimia.css +0 -95
  97. package/src/styles/themes/base-nordic.css +0 -83
  98. package/src/styles/themes/base-primary.css +0 -85
  99. package/src/styles/themes/base.css +0 -8
  100. package/src/types/index.ts +0 -1
  101. package/src/types/type.ts +0 -76
@@ -0,0 +1,136 @@
1
+ {
2
+ "name": "@alquimia-ai/ui",
3
+ "version": "1.2.4",
4
+ "author": "Alquimia AI",
5
+ "description": "UI components for Alquimia SDK",
6
+ "private": false,
7
+ "license": "MIT",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./styles.css": "./dist/styles.css",
15
+ "./components/atoms": {
16
+ "types": "./dist/components/atoms/index.d.ts",
17
+ "import": "./dist/components/atoms/index.mjs",
18
+ "require": "./dist/components/atoms/index.js"
19
+ },
20
+ "./components/templates": {
21
+ "types": "./dist/components/templates/index.d.ts",
22
+ "import": "./dist/components/templates/index.mjs",
23
+ "require": "./dist/components/templates/index.js"
24
+ },
25
+ "./components/organisms": {
26
+ "types": "./dist/components/organisms/index.d.ts",
27
+ "import": "./dist/components/organisms/index.mjs",
28
+ "require": "./dist/components/organisms/index.js"
29
+ },
30
+ "./components/molecules": {
31
+ "types": "./dist/components/molecules/index.d.ts",
32
+ "import": "./dist/components/molecules/index.mjs",
33
+ "require": "./dist/components/molecules/index.js"
34
+ },
35
+ "./components/hooks": {
36
+ "types": "./dist/components/hooks/index.d.ts",
37
+ "import": "./dist/components/hooks/index.mjs",
38
+ "require": "./dist/components/hooks/index.js"
39
+ },
40
+ "./components/molecules/viewers": {
41
+ "types": "./dist/components/molecules/viewers/index.d.ts",
42
+ "import": "./dist/components/molecules/viewers/index.mjs",
43
+ "require": "./dist/components/molecules/viewers/index.js"
44
+ },
45
+ "./components/molecules/documents": {
46
+ "types": "./dist/components/molecules/documents/index.d.ts",
47
+ "import": "./dist/components/molecules/documents/index.mjs",
48
+ "require": "./dist/components/molecules/documents/index.js"
49
+ },
50
+ "./lib/utils": {
51
+ "types": "./dist/lib/index.d.ts",
52
+ "import": "./dist/lib/index.mjs",
53
+ "require": "./dist/lib/index.js"
54
+ },
55
+ "./types": {
56
+ "types": "./dist/types/index.d.ts",
57
+ "import": "./dist/types/index.mjs",
58
+ "require": "./dist/types/index.js"
59
+ },
60
+ "./styles/*": {
61
+ "import": "./dist/styles/*",
62
+ "require": "./dist/styles/*"
63
+ },
64
+ "./styles/themes/*": "./dist/styles/themes/*",
65
+ "./tailwind.config": "./dist/tailwind.config.js",
66
+ "./package.json": "./package.json"
67
+ },
68
+ "scripts": {
69
+ "lint": "eslint . --max-warnings 0",
70
+ "generate:component": "turbo gen react-component",
71
+ "prebuild": "cd ../tools && npm run build",
72
+ "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
+ "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
+ "genversion": "genversion --es6 --semi ./version.js"
76
+ },
77
+ "files": [
78
+ "dist/**",
79
+ "README.md",
80
+ "package.json"
81
+ ],
82
+ "devDependencies": {
83
+ "@alquimia-ai/eslint-config": "*",
84
+ "@alquimia-ai/tools": "*",
85
+ "@alquimia-ai/typescript-config": "*",
86
+ "@changesets/changelog-git": "^0.2.0",
87
+ "@changesets/changelog-github": "^0.5.0",
88
+ "@turbo/gen": "^1.12.4",
89
+ "@types/eslint": "^8.56.5",
90
+ "@types/node": "^20.11.24",
91
+ "@types/react": "^18.2.61",
92
+ "@types/react-dom": "^18.2.19",
93
+ "cpx": "^1.5.0",
94
+ "eslint": "^8.57.0",
95
+ "next": ">=13.5.0",
96
+ "react": ">=18.0.0",
97
+ "react-dom": ">=18.0.0",
98
+ "typescript": "^5.3.3"
99
+ },
100
+ "dependencies": {
101
+ "@alquimia-ai/tools": "*",
102
+ "@radix-ui/react-alert-dialog": "^1.1.2",
103
+ "@radix-ui/react-aspect-ratio": "^1.1.0",
104
+ "@radix-ui/react-avatar": "^1.1.0",
105
+ "@radix-ui/react-checkbox": "^1.1.2",
106
+ "@radix-ui/react-dialog": "^1.1.2",
107
+ "@radix-ui/react-icons": "^1.3.0",
108
+ "@radix-ui/react-label": "^2.1.0",
109
+ "@radix-ui/react-navigation-menu": "^1.2.1",
110
+ "@radix-ui/react-popover": "^1.1.2",
111
+ "@radix-ui/react-scroll-area": "^1.1.0",
112
+ "@radix-ui/react-select": "^2.1.2",
113
+ "@radix-ui/react-slider": "^1.2.1",
114
+ "@radix-ui/react-slot": "^1.1.0",
115
+ "@radix-ui/react-switch": "^1.1.1",
116
+ "@radix-ui/react-tabs": "^1.1.1",
117
+ "@radix-ui/react-toast": "^1.2.2",
118
+ "@radix-ui/react-toggle": "^1.1.0",
119
+ "@radix-ui/react-tooltip": "^1.1.3",
120
+ "@tanstack/react-table": "^8.20.5",
121
+ "class-variance-authority": "^0.7.0",
122
+ "clsx": "^2.1.1",
123
+ "cmdk": "1.0.0",
124
+ "embla-carousel-react": "^8.3.0",
125
+ "lucide-react": "^0.436.0",
126
+ "next-themes": ">=0.3.0",
127
+ "pdfjs-dist": "4.4.168",
128
+ "react-markdown": "^9.0.1",
129
+ "react-pdf": "9.1.1",
130
+ "remark-gfm": "^4.0.0",
131
+ "sonner": "^1.5.0",
132
+ "tailwind-merge": "^2.5.2",
133
+ "tailwindcss-animate": "^1.0.7",
134
+ "vaul": "^0.9.4"
135
+ }
136
+ }
package/package.json CHANGED
@@ -1,81 +1,61 @@
1
1
  {
2
2
  "name": "@alquimia-ai/ui",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
4
  "author": "Alquimia AI",
5
5
  "description": "UI components for Alquimia SDK",
6
6
  "private": false,
7
7
  "license": "MIT",
8
- "exports": {
8
+ "exportsProd": {
9
9
  ".": {
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"
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
15
13
  },
16
14
  "./styles.css": "./dist/styles.css",
17
15
  "./components/atoms": {
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"
16
+ "types": "./dist/components/atoms/index.d.ts",
17
+ "import": "./dist/components/atoms/index.mjs",
18
+ "require": "./dist/components/atoms/index.js"
23
19
  },
24
20
  "./components/templates": {
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"
21
+ "types": "./dist/components/templates/index.d.ts",
22
+ "import": "./dist/components/templates/index.mjs",
23
+ "require": "./dist/components/templates/index.js"
30
24
  },
31
25
  "./components/organisms": {
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"
26
+ "types": "./dist/components/organisms/index.d.ts",
27
+ "import": "./dist/components/organisms/index.mjs",
28
+ "require": "./dist/components/organisms/index.js"
37
29
  },
38
30
  "./components/molecules": {
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"
31
+ "types": "./dist/components/molecules/index.d.ts",
32
+ "import": "./dist/components/molecules/index.mjs",
33
+ "require": "./dist/components/molecules/index.js"
44
34
  },
45
35
  "./components/hooks": {
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"
36
+ "types": "./dist/components/hooks/index.d.ts",
37
+ "import": "./dist/components/hooks/index.mjs",
38
+ "require": "./dist/components/hooks/index.js"
51
39
  },
52
40
  "./components/molecules/viewers": {
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"
41
+ "types": "./dist/components/molecules/viewers/index.d.ts",
42
+ "import": "./dist/components/molecules/viewers/index.mjs",
43
+ "require": "./dist/components/molecules/viewers/index.js"
58
44
  },
59
45
  "./components/molecules/documents": {
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"
46
+ "types": "./dist/components/molecules/documents/index.d.ts",
47
+ "import": "./dist/components/molecules/documents/index.mjs",
48
+ "require": "./dist/components/molecules/documents/index.js"
65
49
  },
66
50
  "./lib/utils": {
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"
51
+ "types": "./dist/lib/index.d.ts",
52
+ "import": "./dist/lib/index.mjs",
53
+ "require": "./dist/lib/index.js"
72
54
  },
73
55
  "./types": {
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"
56
+ "types": "./dist/types/index.d.ts",
57
+ "import": "./dist/types/index.mjs",
58
+ "require": "./dist/types/index.js"
79
59
  },
80
60
  "./styles/*": {
81
61
  "import": "./dist/styles/*",
@@ -85,17 +65,34 @@
85
65
  "./tailwind.config": "./dist/tailwind.config.js",
86
66
  "./package.json": "./package.json"
87
67
  },
68
+ "exports": {
69
+ ".": "./src/index.ts",
70
+ "./styles.css": "./src/styles.css",
71
+ "./components/atoms": "./src/components/atoms/index.ts",
72
+ "./components/templates": "./src/components/templates/index.ts",
73
+ "./components/organisms": "./src/components/organisms/index.ts",
74
+ "./components/molecules": "./src/components/molecules/index.ts",
75
+ "./components/hooks": "./src/components/hooks/index.ts",
76
+ "./components/molecules/viewers": "./src/components/molecules/viewers/index.ts",
77
+ "./components/molecules/documents": "./src/components/molecules/documents/index.ts",
78
+ "./lib/utils": "./src/lib/index.ts",
79
+ "./types": "./src/types/index.ts",
80
+ "./styles/*": "./src/styles/*",
81
+ "./styles/themes/*": "./src/styles/themes/*",
82
+ "./tailwind.config": "./src/tailwind.config.js",
83
+ "./package.json": "./package.json"
84
+ },
88
85
  "scripts": {
89
86
  "lint": "eslint . --max-warnings 0",
90
87
  "generate:component": "turbo gen react-component",
91
88
  "prebuild": "cd ../tools && npm run build",
92
89
  "build": "tsup src/index.ts src/**/index.ts src/**/**/index.ts src/**/**/**/index.ts --format esm,cjs --target es2020 && cpx \"src/styles/**/*\" dist/styles",
93
90
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
91
+ "dev": "tsup src/index.ts src/**/index.ts src/**/**/index.ts src/**/**/**/index.ts --format esm,cjs --target es2020 --watch",
94
92
  "genversion": "genversion --es6 --semi ./version.js"
95
93
  },
96
94
  "files": [
97
95
  "dist/**",
98
- "src/**",
99
96
  "README.md",
100
97
  "package.json"
101
98
  ],
@@ -1,32 +0,0 @@
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";
@@ -1,59 +0,0 @@
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 };
@@ -1,7 +0,0 @@
1
- "use client"
2
-
3
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
4
-
5
- const AspectRatio = AspectRatioPrimitive.Root
6
-
7
- export { AspectRatio }
@@ -1,50 +0,0 @@
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 }
@@ -1,36 +0,0 @@
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 }
@@ -1,120 +0,0 @@
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
- };
@@ -1,56 +0,0 @@
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 };