@vvedantb/ui 0.1.0 → 0.1.2

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 (74) hide show
  1. package/LICENSE +21 -21
  2. package/package.json +3 -2
  3. package/src/ai-elements/artifact.tsx +99 -99
  4. package/src/ai-elements/attachments.tsx +366 -366
  5. package/src/ai-elements/chain-of-thought.tsx +212 -212
  6. package/src/ai-elements/code-block.tsx +478 -478
  7. package/src/ai-elements/conversation.tsx +157 -157
  8. package/src/ai-elements/image.tsx +25 -25
  9. package/src/ai-elements/inline-citation.tsx +252 -252
  10. package/src/ai-elements/message.tsx +269 -269
  11. package/src/ai-elements/model-selector.tsx +211 -211
  12. package/src/ai-elements/prompt-input.tsx +1018 -1018
  13. package/src/ai-elements/queue.tsx +251 -251
  14. package/src/ai-elements/reasoning.tsx +178 -178
  15. package/src/ai-elements/shimmer.tsx +56 -56
  16. package/src/ai-elements/sources.tsx +77 -77
  17. package/src/ai-elements/speech-input.tsx +290 -290
  18. package/src/ai-elements/suggestion.tsx +191 -191
  19. package/src/css.d.ts +2 -2
  20. package/src/index.ts +96 -96
  21. package/src/motion/presets.ts +35 -35
  22. package/src/motion/presets.vibot.ts +105 -105
  23. package/src/ui/_menu-classes.ts +30 -30
  24. package/src/ui/_menu-classes.vibot.ts +33 -33
  25. package/src/ui/accordion.tsx +81 -81
  26. package/src/ui/accordion.verve.tsx +56 -56
  27. package/src/ui/badge.tsx +34 -34
  28. package/src/ui/breadcrumb.tsx +83 -83
  29. package/src/ui/button-group.tsx +84 -84
  30. package/src/ui/button.tsx +57 -57
  31. package/src/ui/card.tsx +27 -27
  32. package/src/ui/carousel.tsx +211 -211
  33. package/src/ui/checkbox.tsx +27 -27
  34. package/src/ui/clear-input.tsx +170 -170
  35. package/src/ui/clear-input.vibot.tsx +76 -76
  36. package/src/ui/clearInputDissolve.ts +214 -214
  37. package/src/ui/collapsible.tsx +7 -7
  38. package/src/ui/command.tsx +148 -148
  39. package/src/ui/context-menu.tsx +173 -173
  40. package/src/ui/dialog.tsx +149 -149
  41. package/src/ui/dropdown-menu.tsx +178 -178
  42. package/src/ui/hover-card.tsx +31 -31
  43. package/src/ui/input-group.tsx +162 -162
  44. package/src/ui/input-group.verve.tsx +150 -150
  45. package/src/ui/input.tsx +21 -21
  46. package/src/ui/kbd.tsx +18 -18
  47. package/src/ui/label.tsx +20 -20
  48. package/src/ui/labeled-switch-row.tsx +53 -53
  49. package/src/ui/modalTransition.ts +85 -85
  50. package/src/ui/pagination.tsx +47 -47
  51. package/src/ui/popover.tsx +33 -33
  52. package/src/ui/progress.tsx +25 -25
  53. package/src/ui/radix-select.tsx +202 -202
  54. package/src/ui/scroll-area.tsx +55 -55
  55. package/src/ui/scroll-area.verve.tsx +43 -43
  56. package/src/ui/search-input.tsx +29 -29
  57. package/src/ui/select.tsx +163 -163
  58. package/src/ui/separator.tsx +28 -28
  59. package/src/ui/sheet.tsx +87 -87
  60. package/src/ui/skeleton.tsx +18 -18
  61. package/src/ui/sonner.css +16 -16
  62. package/src/ui/sonner.tsx +47 -47
  63. package/src/ui/spinner.tsx +27 -27
  64. package/src/ui/surface-classes.ts +55 -55
  65. package/src/ui/switch.tsx +26 -26
  66. package/src/ui/table.tsx +123 -123
  67. package/src/ui/tabs.tsx +140 -140
  68. package/src/ui/tabsSliding.ts +56 -56
  69. package/src/ui/textarea.tsx +21 -21
  70. package/src/ui/time-picker.tsx +170 -170
  71. package/src/ui/tooltip.tsx +25 -25
  72. package/src/ui/visually-hidden.tsx +3 -3
  73. package/src/utils/cn.ts +16 -16
  74. package/src/utils/ref.ts +10 -10
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 vvedantb
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 vvedantb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "description": "Shared React 19 UI primitives for vmem, vibot and Verve.",
6
6
  "type": "module",
@@ -32,7 +32,8 @@
32
32
  ],
33
33
  "scripts": {
34
34
  "build": "tsc -p tsconfig.json",
35
- "typecheck": "tsc -p tsconfig.json"
35
+ "typecheck": "tsc -p tsconfig.json",
36
+ "prepack": "tsc -p tsconfig.json"
36
37
  },
37
38
  "peerDependencies": {
38
39
  "@radix-ui/react-accordion": "^1.2.12",
@@ -1,99 +1,99 @@
1
- "use client";
2
-
3
- import type { ComponentProps, ReactNode } from "react";
4
-
5
- import { Button } from "../ui/button";
6
- import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
7
- import { cn } from "../utils/cn";
8
- import { flatElevatedSurfaceClass } from "../ui/surface-classes";
9
-
10
- export type ArtifactProps = ComponentProps<"div">;
11
-
12
- export const Artifact = ({ className, ...props }: ArtifactProps) => (
13
- <div
14
- className={cn(flatElevatedSurfaceClass, "rounded-lg", className)}
15
- {...props}
16
- />
17
- );
18
-
19
- export type ArtifactHeaderProps = ComponentProps<"div">;
20
-
21
- export const ArtifactHeader = ({
22
- className,
23
- ...props
24
- }: ArtifactHeaderProps) => (
25
- <div
26
- className={cn(
27
- "flex items-start justify-between gap-2 px-4 py-3",
28
- className,
29
- )}
30
- {...props}
31
- />
32
- );
33
-
34
- export type ArtifactTitleProps = ComponentProps<"p">;
35
-
36
- export const ArtifactTitle = ({ className, ...props }: ArtifactTitleProps) => (
37
- <p
38
- className={cn("text-sm font-medium text-foreground", className)}
39
- {...props}
40
- />
41
- );
42
-
43
- export type ArtifactDescriptionProps = ComponentProps<"p">;
44
-
45
- export const ArtifactDescription = ({
46
- className,
47
- ...props
48
- }: ArtifactDescriptionProps) => (
49
- <p className={cn("text-xs text-muted", className)} {...props} />
50
- );
51
-
52
- export type ArtifactActionsProps = ComponentProps<"div">;
53
-
54
- export const ArtifactActions = ({
55
- className,
56
- ...props
57
- }: ArtifactActionsProps) => (
58
- <div className={cn("flex items-center gap-1", className)} {...props} />
59
- );
60
-
61
- export type ArtifactActionProps = ComponentProps<typeof Button> & {
62
- tooltip: string;
63
- icon: ReactNode;
64
- label?: string;
65
- };
66
-
67
- export const ArtifactAction = ({
68
- tooltip,
69
- icon,
70
- label,
71
- className,
72
- variant = "ghost",
73
- size = "icon",
74
- ...props
75
- }: ArtifactActionProps) => (
76
- <Tooltip>
77
- <TooltipTrigger asChild>
78
- <Button
79
- variant={variant}
80
- size={size}
81
- className={cn("min-w-6 h-6", className)}
82
- aria-label={label ?? tooltip}
83
- {...props}
84
- >
85
- {icon}
86
- </Button>
87
- </TooltipTrigger>
88
- <TooltipContent>{tooltip}</TooltipContent>
89
- </Tooltip>
90
- );
91
-
92
- export type ArtifactContentProps = ComponentProps<"div">;
93
-
94
- export const ArtifactContent = ({
95
- className,
96
- ...props
97
- }: ArtifactContentProps) => (
98
- <div className={cn("px-4 pb-4", className)} {...props} />
99
- );
1
+ "use client";
2
+
3
+ import type { ComponentProps, ReactNode } from "react";
4
+
5
+ import { Button } from "../ui/button";
6
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
7
+ import { cn } from "../utils/cn";
8
+ import { flatElevatedSurfaceClass } from "../ui/surface-classes";
9
+
10
+ export type ArtifactProps = ComponentProps<"div">;
11
+
12
+ export const Artifact = ({ className, ...props }: ArtifactProps) => (
13
+ <div
14
+ className={cn(flatElevatedSurfaceClass, "rounded-lg", className)}
15
+ {...props}
16
+ />
17
+ );
18
+
19
+ export type ArtifactHeaderProps = ComponentProps<"div">;
20
+
21
+ export const ArtifactHeader = ({
22
+ className,
23
+ ...props
24
+ }: ArtifactHeaderProps) => (
25
+ <div
26
+ className={cn(
27
+ "flex items-start justify-between gap-2 px-4 py-3",
28
+ className,
29
+ )}
30
+ {...props}
31
+ />
32
+ );
33
+
34
+ export type ArtifactTitleProps = ComponentProps<"p">;
35
+
36
+ export const ArtifactTitle = ({ className, ...props }: ArtifactTitleProps) => (
37
+ <p
38
+ className={cn("text-sm font-medium text-foreground", className)}
39
+ {...props}
40
+ />
41
+ );
42
+
43
+ export type ArtifactDescriptionProps = ComponentProps<"p">;
44
+
45
+ export const ArtifactDescription = ({
46
+ className,
47
+ ...props
48
+ }: ArtifactDescriptionProps) => (
49
+ <p className={cn("text-xs text-muted", className)} {...props} />
50
+ );
51
+
52
+ export type ArtifactActionsProps = ComponentProps<"div">;
53
+
54
+ export const ArtifactActions = ({
55
+ className,
56
+ ...props
57
+ }: ArtifactActionsProps) => (
58
+ <div className={cn("flex items-center gap-1", className)} {...props} />
59
+ );
60
+
61
+ export type ArtifactActionProps = ComponentProps<typeof Button> & {
62
+ tooltip: string;
63
+ icon: ReactNode;
64
+ label?: string;
65
+ };
66
+
67
+ export const ArtifactAction = ({
68
+ tooltip,
69
+ icon,
70
+ label,
71
+ className,
72
+ variant = "ghost",
73
+ size = "icon",
74
+ ...props
75
+ }: ArtifactActionProps) => (
76
+ <Tooltip>
77
+ <TooltipTrigger asChild>
78
+ <Button
79
+ variant={variant}
80
+ size={size}
81
+ className={cn("min-w-6 h-6", className)}
82
+ aria-label={label ?? tooltip}
83
+ {...props}
84
+ >
85
+ {icon}
86
+ </Button>
87
+ </TooltipTrigger>
88
+ <TooltipContent>{tooltip}</TooltipContent>
89
+ </Tooltip>
90
+ );
91
+
92
+ export type ArtifactContentProps = ComponentProps<"div">;
93
+
94
+ export const ArtifactContent = ({
95
+ className,
96
+ ...props
97
+ }: ArtifactContentProps) => (
98
+ <div className={cn("px-4 pb-4", className)} {...props} />
99
+ );