@vvedantb/ui 0.1.1 → 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
@@ -1,191 +1,191 @@
1
- "use client";
2
- import type { ComponentProps, ReactNode } from "react";
3
- import { useRef, useState, useEffect } from "react";
4
- import { Button } from "../ui/button";
5
- import { cn } from "../utils/cn";
6
- import { flatInteractiveClass } from "../ui/surface-classes";
7
- import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
8
- import { AnimatePresence, motion } from "motion/react";
9
- import { fastTransition } from "../motion/presets.vibot";
10
- export type SuggestionsProps = {
11
- className?: string;
12
- children?: ReactNode;
13
- orientation?: "horizontal" | "vertical";
14
- };
15
- function HorizontalSuggestions({
16
- className,
17
- children,
18
- }: Pick<SuggestionsProps, "className" | "children">) {
19
- const scrollRef = useRef<HTMLDivElement>(null);
20
- const [canScrollLeft, setCanScrollLeft] = useState(false);
21
- const [canScrollRight, setCanScrollRight] = useState(false);
22
- const isDragging = useRef(false);
23
- const dragStartX = useRef(0);
24
- const dragScrollLeft = useRef(0);
25
- const checkScrollability = () => {
26
- const el = scrollRef.current;
27
- if (!el) return;
28
- setCanScrollLeft(el.scrollLeft > 0);
29
- setCanScrollRight(el.scrollLeft < el.scrollWidth - el.clientWidth - 1);
30
- };
31
- useEffect(() => {
32
- const el = scrollRef.current;
33
- if (!el) return;
34
- checkScrollability();
35
- el.addEventListener("scroll", checkScrollability, { passive: true });
36
- const ro = new ResizeObserver(checkScrollability);
37
- ro.observe(el);
38
- return () => {
39
- el.removeEventListener("scroll", checkScrollability);
40
- ro.disconnect();
41
- };
42
- }, [checkScrollability]);
43
- const scrollBy = (amount: number) => {
44
- scrollRef.current?.scrollBy({ left: amount, behavior: "smooth" });
45
- };
46
- const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
47
- const el = scrollRef.current;
48
- if (!el) return;
49
- isDragging.current = true;
50
- dragStartX.current = e.pageX - el.offsetLeft;
51
- dragScrollLeft.current = el.scrollLeft;
52
- el.style.cursor = "grabbing";
53
- };
54
- const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
55
- if (!isDragging.current) return;
56
- const el = scrollRef.current;
57
- if (!el) return;
58
- e.preventDefault();
59
- const x = e.pageX - el.offsetLeft;
60
- el.scrollLeft = dragScrollLeft.current - (x - dragStartX.current);
61
- };
62
- const handleMouseUp = () => {
63
- const el = scrollRef.current;
64
- if (!el) return;
65
- isDragging.current = false;
66
- el.style.cursor = "grab";
67
- };
68
- return (
69
- <div className={cn("flex w-full items-center gap-1", className)}>
70
- <AnimatePresence initial={false}>
71
- {canScrollLeft ? (
72
- <motion.div
73
- key="scroll-left"
74
- initial={{ opacity: 0 }}
75
- animate={{ opacity: 1 }}
76
- exit={{ opacity: 0 }}
77
- transition={fastTransition}
78
- >
79
- <Button
80
- size="icon"
81
- variant="ghost"
82
- type="button"
83
- onClick={() => scrollBy(-200)}
84
- className={cn(
85
- flatInteractiveClass,
86
- "h-7 w-7 shrink-0 rounded-full",
87
- )}
88
- >
89
- <IconChevronLeft size={14} />
90
- </Button>
91
- </motion.div>
92
- ) : null}
93
- </AnimatePresence>
94
-
95
- <div
96
- ref={scrollRef}
97
- className="flex-1 overflow-x-auto select-none cursor-grab [&::-webkit-scrollbar]:hidden"
98
- style={{ scrollbarWidth: "none" }}
99
- onMouseDown={handleMouseDown}
100
- onMouseMove={handleMouseMove}
101
- onMouseUp={handleMouseUp}
102
- onMouseLeave={handleMouseUp}
103
- >
104
- <div className="flex w-max flex-nowrap items-center gap-2 px-1">
105
- {children}
106
- </div>
107
- </div>
108
-
109
- <AnimatePresence initial={false}>
110
- {canScrollRight ? (
111
- <motion.div
112
- key="scroll-right"
113
- initial={{ opacity: 0 }}
114
- animate={{ opacity: 1 }}
115
- exit={{ opacity: 0 }}
116
- transition={fastTransition}
117
- >
118
- <Button
119
- size="icon"
120
- variant="ghost"
121
- type="button"
122
- onClick={() => scrollBy(200)}
123
- className={cn(
124
- flatInteractiveClass,
125
- "h-7 w-7 shrink-0 rounded-full",
126
- )}
127
- >
128
- <IconChevronRight size={14} />
129
- </Button>
130
- </motion.div>
131
- ) : null}
132
- </AnimatePresence>
133
- </div>
134
- );
135
- }
136
- export const Suggestions = ({
137
- className,
138
- children,
139
- orientation = "horizontal",
140
- }: SuggestionsProps) => {
141
- if (orientation === "vertical") {
142
- return (
143
- <div
144
- className={cn(
145
- "flex w-full flex-col items-stretch gap-2",
146
- "[&_button]:h-auto [&_button]:w-full [&_button]:justify-start [&_button]:rounded-lg [&_button]:whitespace-normal [&_button]:text-left [&_button]:py-2",
147
- className,
148
- )}
149
- >
150
- {children}
151
- </div>
152
- );
153
- }
154
- return (
155
- <HorizontalSuggestions className={className}>
156
- {children}
157
- </HorizontalSuggestions>
158
- );
159
- };
160
- export type SuggestionProps = Omit<ComponentProps<typeof Button>, "onClick"> & {
161
- suggestion: string;
162
- onClick?: (suggestion: string) => void;
163
- };
164
- export const Suggestion = ({
165
- suggestion,
166
- onClick,
167
- className,
168
- variant = "outline",
169
- size = "sm",
170
- children,
171
- ...props
172
- }: SuggestionProps) => {
173
- const handleClick = () => {
174
- onClick?.(suggestion);
175
- };
176
- return (
177
- <Button
178
- className={cn(
179
- "h-auto cursor-pointer rounded-full bg-surface-secondary px-3 py-1.5 text-sm text-muted hover:bg-surface-tertiary hover:text-foreground",
180
- className,
181
- )}
182
- onClick={handleClick}
183
- size={size}
184
- type="button"
185
- variant={variant}
186
- {...props}
187
- >
188
- {children || suggestion}
189
- </Button>
190
- );
191
- };
1
+ "use client";
2
+ import type { ComponentProps, ReactNode } from "react";
3
+ import { useRef, useState, useEffect } from "react";
4
+ import { Button } from "../ui/button";
5
+ import { cn } from "../utils/cn";
6
+ import { flatInteractiveClass } from "../ui/surface-classes";
7
+ import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
8
+ import { AnimatePresence, motion } from "motion/react";
9
+ import { fastTransition } from "../motion/presets.vibot";
10
+ export type SuggestionsProps = {
11
+ className?: string;
12
+ children?: ReactNode;
13
+ orientation?: "horizontal" | "vertical";
14
+ };
15
+ function HorizontalSuggestions({
16
+ className,
17
+ children,
18
+ }: Pick<SuggestionsProps, "className" | "children">) {
19
+ const scrollRef = useRef<HTMLDivElement>(null);
20
+ const [canScrollLeft, setCanScrollLeft] = useState(false);
21
+ const [canScrollRight, setCanScrollRight] = useState(false);
22
+ const isDragging = useRef(false);
23
+ const dragStartX = useRef(0);
24
+ const dragScrollLeft = useRef(0);
25
+ const checkScrollability = () => {
26
+ const el = scrollRef.current;
27
+ if (!el) return;
28
+ setCanScrollLeft(el.scrollLeft > 0);
29
+ setCanScrollRight(el.scrollLeft < el.scrollWidth - el.clientWidth - 1);
30
+ };
31
+ useEffect(() => {
32
+ const el = scrollRef.current;
33
+ if (!el) return;
34
+ checkScrollability();
35
+ el.addEventListener("scroll", checkScrollability, { passive: true });
36
+ const ro = new ResizeObserver(checkScrollability);
37
+ ro.observe(el);
38
+ return () => {
39
+ el.removeEventListener("scroll", checkScrollability);
40
+ ro.disconnect();
41
+ };
42
+ }, [checkScrollability]);
43
+ const scrollBy = (amount: number) => {
44
+ scrollRef.current?.scrollBy({ left: amount, behavior: "smooth" });
45
+ };
46
+ const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
47
+ const el = scrollRef.current;
48
+ if (!el) return;
49
+ isDragging.current = true;
50
+ dragStartX.current = e.pageX - el.offsetLeft;
51
+ dragScrollLeft.current = el.scrollLeft;
52
+ el.style.cursor = "grabbing";
53
+ };
54
+ const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
55
+ if (!isDragging.current) return;
56
+ const el = scrollRef.current;
57
+ if (!el) return;
58
+ e.preventDefault();
59
+ const x = e.pageX - el.offsetLeft;
60
+ el.scrollLeft = dragScrollLeft.current - (x - dragStartX.current);
61
+ };
62
+ const handleMouseUp = () => {
63
+ const el = scrollRef.current;
64
+ if (!el) return;
65
+ isDragging.current = false;
66
+ el.style.cursor = "grab";
67
+ };
68
+ return (
69
+ <div className={cn("flex w-full items-center gap-1", className)}>
70
+ <AnimatePresence initial={false}>
71
+ {canScrollLeft ? (
72
+ <motion.div
73
+ key="scroll-left"
74
+ initial={{ opacity: 0 }}
75
+ animate={{ opacity: 1 }}
76
+ exit={{ opacity: 0 }}
77
+ transition={fastTransition}
78
+ >
79
+ <Button
80
+ size="icon"
81
+ variant="ghost"
82
+ type="button"
83
+ onClick={() => scrollBy(-200)}
84
+ className={cn(
85
+ flatInteractiveClass,
86
+ "h-7 w-7 shrink-0 rounded-full",
87
+ )}
88
+ >
89
+ <IconChevronLeft size={14} />
90
+ </Button>
91
+ </motion.div>
92
+ ) : null}
93
+ </AnimatePresence>
94
+
95
+ <div
96
+ ref={scrollRef}
97
+ className="flex-1 overflow-x-auto select-none cursor-grab [&::-webkit-scrollbar]:hidden"
98
+ style={{ scrollbarWidth: "none" }}
99
+ onMouseDown={handleMouseDown}
100
+ onMouseMove={handleMouseMove}
101
+ onMouseUp={handleMouseUp}
102
+ onMouseLeave={handleMouseUp}
103
+ >
104
+ <div className="flex w-max flex-nowrap items-center gap-2 px-1">
105
+ {children}
106
+ </div>
107
+ </div>
108
+
109
+ <AnimatePresence initial={false}>
110
+ {canScrollRight ? (
111
+ <motion.div
112
+ key="scroll-right"
113
+ initial={{ opacity: 0 }}
114
+ animate={{ opacity: 1 }}
115
+ exit={{ opacity: 0 }}
116
+ transition={fastTransition}
117
+ >
118
+ <Button
119
+ size="icon"
120
+ variant="ghost"
121
+ type="button"
122
+ onClick={() => scrollBy(200)}
123
+ className={cn(
124
+ flatInteractiveClass,
125
+ "h-7 w-7 shrink-0 rounded-full",
126
+ )}
127
+ >
128
+ <IconChevronRight size={14} />
129
+ </Button>
130
+ </motion.div>
131
+ ) : null}
132
+ </AnimatePresence>
133
+ </div>
134
+ );
135
+ }
136
+ export const Suggestions = ({
137
+ className,
138
+ children,
139
+ orientation = "horizontal",
140
+ }: SuggestionsProps) => {
141
+ if (orientation === "vertical") {
142
+ return (
143
+ <div
144
+ className={cn(
145
+ "flex w-full flex-col items-stretch gap-2",
146
+ "[&_button]:h-auto [&_button]:w-full [&_button]:justify-start [&_button]:rounded-lg [&_button]:whitespace-normal [&_button]:text-left [&_button]:py-2",
147
+ className,
148
+ )}
149
+ >
150
+ {children}
151
+ </div>
152
+ );
153
+ }
154
+ return (
155
+ <HorizontalSuggestions className={className}>
156
+ {children}
157
+ </HorizontalSuggestions>
158
+ );
159
+ };
160
+ export type SuggestionProps = Omit<ComponentProps<typeof Button>, "onClick"> & {
161
+ suggestion: string;
162
+ onClick?: (suggestion: string) => void;
163
+ };
164
+ export const Suggestion = ({
165
+ suggestion,
166
+ onClick,
167
+ className,
168
+ variant = "outline",
169
+ size = "sm",
170
+ children,
171
+ ...props
172
+ }: SuggestionProps) => {
173
+ const handleClick = () => {
174
+ onClick?.(suggestion);
175
+ };
176
+ return (
177
+ <Button
178
+ className={cn(
179
+ "h-auto cursor-pointer rounded-full bg-surface-secondary px-3 py-1.5 text-sm text-muted hover:bg-surface-tertiary hover:text-foreground",
180
+ className,
181
+ )}
182
+ onClick={handleClick}
183
+ size={size}
184
+ type="button"
185
+ variant={variant}
186
+ {...props}
187
+ >
188
+ {children || suggestion}
189
+ </Button>
190
+ );
191
+ };
package/src/css.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- // Ambient declarations for CSS side-effect imports (e.g. `import "./sonner.css"`).
2
- declare module "*.css";
1
+ // Ambient declarations for CSS side-effect imports (e.g. `import "./sonner.css"`).
2
+ declare module "*.css";
package/src/index.ts CHANGED
@@ -1,96 +1,96 @@
1
- // Colour, radius, shadow and font tokens live in @vvedantb/tokens. Import that
2
- // stylesheet in the app. This package does not ship a second token set.
3
- export { cn } from "./utils/cn";
4
- export { floatingSurfaceClass } from "./ui/_menu-classes";
5
- export * from "./ui/surface-classes";
6
- export * from "./motion/presets";
7
-
8
- export * from "./ui/badge";
9
- export * from "./ui/breadcrumb";
10
- export * from "./ui/button";
11
- export * from "./ui/button-group";
12
- export * from "./ui/card";
13
- export * from "./ui/carousel";
14
- export * from "./ui/checkbox";
15
- export * from "./ui/collapsible";
16
- export * from "./ui/command";
17
- export * from "./ui/context-menu";
18
- export * from "./ui/dialog";
19
- export * from "./ui/dropdown-menu";
20
- export * from "./ui/hover-card";
21
- export * from "./ui/input";
22
- export * from "./ui/label";
23
- export * from "./ui/labeled-switch-row";
24
- export * from "./ui/pagination";
25
- export * from "./ui/popover";
26
- export * from "./ui/progress";
27
- export {
28
- Select as RadixSelect,
29
- SelectContent as RadixSelectContent,
30
- SelectGroup as RadixSelectGroup,
31
- SelectItem as RadixSelectItem,
32
- SelectLabel as RadixSelectLabel,
33
- SelectScrollDownButton as RadixSelectScrollDownButton,
34
- SelectScrollUpButton as RadixSelectScrollUpButton,
35
- SelectSeparator as RadixSelectSeparator,
36
- SelectTrigger as RadixSelectTrigger,
37
- SelectValue as RadixSelectValue,
38
- } from "./ui/radix-select";
39
- export * from "./ui/search-input";
40
- export * from "./ui/select";
41
- export * from "./ui/separator";
42
- export * from "./ui/skeleton";
43
- export * from "./ui/sonner";
44
- export * from "./ui/spinner";
45
- export * from "./ui/switch";
46
- export * from "./ui/table";
47
- export * from "./ui/tabs";
48
- export * from "./ui/textarea";
49
- export * from "./ui/time-picker";
50
- export * from "./ui/tooltip";
51
- export * from "./ui/kbd";
52
- export * from "./ui/sheet";
53
- export * from "./ui/visually-hidden";
54
- export * from "./ui/clearInputDissolve";
55
-
56
- // Dual copies: richer file uses the plain name; the other keeps a suffix.
57
- export * from "./ui/accordion";
58
- export {
59
- Accordion as AccordionVerve,
60
- AccordionItem as AccordionItemVerve,
61
- AccordionTrigger as AccordionTriggerVerve,
62
- AccordionContent as AccordionContentVerve,
63
- } from "./ui/accordion.verve";
64
- export * from "./ui/clear-input";
65
- export { ClearInput as ClearInputVibot } from "./ui/clear-input.vibot";
66
- export * from "./ui/input-group";
67
- export {
68
- InputGroup as InputGroupVerve,
69
- InputGroupAddon as InputGroupAddonVerve,
70
- InputGroupButton as InputGroupButtonVerve,
71
- InputGroupText as InputGroupTextVerve,
72
- InputGroupInput as InputGroupInputVerve,
73
- InputGroupTextarea as InputGroupTextareaVerve,
74
- } from "./ui/input-group.verve";
75
- export * from "./ui/scroll-area";
76
- export {
77
- ScrollArea as ScrollAreaVerve,
78
- ScrollBar as ScrollBarVerve,
79
- } from "./ui/scroll-area.verve";
80
-
81
- export * from "./ai-elements/artifact";
82
- export * from "./ai-elements/attachments";
83
- export * from "./ai-elements/chain-of-thought";
84
- export * from "./ai-elements/code-block";
85
- export * from "./ai-elements/conversation";
86
- export * from "./ai-elements/image";
87
- export * from "./ai-elements/inline-citation";
88
- export * from "./ai-elements/message";
89
- export * from "./ai-elements/model-selector";
90
- export * from "./ai-elements/prompt-input";
91
- export * from "./ai-elements/queue";
92
- export * from "./ai-elements/reasoning";
93
- export * from "./ai-elements/shimmer";
94
- export * from "./ai-elements/sources";
95
- export * from "./ai-elements/speech-input";
96
- export * from "./ai-elements/suggestion";
1
+ // Colour, radius, shadow and font tokens live in @vvedantb/tokens. Import that
2
+ // stylesheet in the app. This package does not ship a second token set.
3
+ export { cn } from "./utils/cn";
4
+ export { floatingSurfaceClass } from "./ui/_menu-classes";
5
+ export * from "./ui/surface-classes";
6
+ export * from "./motion/presets";
7
+
8
+ export * from "./ui/badge";
9
+ export * from "./ui/breadcrumb";
10
+ export * from "./ui/button";
11
+ export * from "./ui/button-group";
12
+ export * from "./ui/card";
13
+ export * from "./ui/carousel";
14
+ export * from "./ui/checkbox";
15
+ export * from "./ui/collapsible";
16
+ export * from "./ui/command";
17
+ export * from "./ui/context-menu";
18
+ export * from "./ui/dialog";
19
+ export * from "./ui/dropdown-menu";
20
+ export * from "./ui/hover-card";
21
+ export * from "./ui/input";
22
+ export * from "./ui/label";
23
+ export * from "./ui/labeled-switch-row";
24
+ export * from "./ui/pagination";
25
+ export * from "./ui/popover";
26
+ export * from "./ui/progress";
27
+ export {
28
+ Select as RadixSelect,
29
+ SelectContent as RadixSelectContent,
30
+ SelectGroup as RadixSelectGroup,
31
+ SelectItem as RadixSelectItem,
32
+ SelectLabel as RadixSelectLabel,
33
+ SelectScrollDownButton as RadixSelectScrollDownButton,
34
+ SelectScrollUpButton as RadixSelectScrollUpButton,
35
+ SelectSeparator as RadixSelectSeparator,
36
+ SelectTrigger as RadixSelectTrigger,
37
+ SelectValue as RadixSelectValue,
38
+ } from "./ui/radix-select";
39
+ export * from "./ui/search-input";
40
+ export * from "./ui/select";
41
+ export * from "./ui/separator";
42
+ export * from "./ui/skeleton";
43
+ export * from "./ui/sonner";
44
+ export * from "./ui/spinner";
45
+ export * from "./ui/switch";
46
+ export * from "./ui/table";
47
+ export * from "./ui/tabs";
48
+ export * from "./ui/textarea";
49
+ export * from "./ui/time-picker";
50
+ export * from "./ui/tooltip";
51
+ export * from "./ui/kbd";
52
+ export * from "./ui/sheet";
53
+ export * from "./ui/visually-hidden";
54
+ export * from "./ui/clearInputDissolve";
55
+
56
+ // Dual copies: richer file uses the plain name; the other keeps a suffix.
57
+ export * from "./ui/accordion";
58
+ export {
59
+ Accordion as AccordionVerve,
60
+ AccordionItem as AccordionItemVerve,
61
+ AccordionTrigger as AccordionTriggerVerve,
62
+ AccordionContent as AccordionContentVerve,
63
+ } from "./ui/accordion.verve";
64
+ export * from "./ui/clear-input";
65
+ export { ClearInput as ClearInputVibot } from "./ui/clear-input.vibot";
66
+ export * from "./ui/input-group";
67
+ export {
68
+ InputGroup as InputGroupVerve,
69
+ InputGroupAddon as InputGroupAddonVerve,
70
+ InputGroupButton as InputGroupButtonVerve,
71
+ InputGroupText as InputGroupTextVerve,
72
+ InputGroupInput as InputGroupInputVerve,
73
+ InputGroupTextarea as InputGroupTextareaVerve,
74
+ } from "./ui/input-group.verve";
75
+ export * from "./ui/scroll-area";
76
+ export {
77
+ ScrollArea as ScrollAreaVerve,
78
+ ScrollBar as ScrollBarVerve,
79
+ } from "./ui/scroll-area.verve";
80
+
81
+ export * from "./ai-elements/artifact";
82
+ export * from "./ai-elements/attachments";
83
+ export * from "./ai-elements/chain-of-thought";
84
+ export * from "./ai-elements/code-block";
85
+ export * from "./ai-elements/conversation";
86
+ export * from "./ai-elements/image";
87
+ export * from "./ai-elements/inline-citation";
88
+ export * from "./ai-elements/message";
89
+ export * from "./ai-elements/model-selector";
90
+ export * from "./ai-elements/prompt-input";
91
+ export * from "./ai-elements/queue";
92
+ export * from "./ai-elements/reasoning";
93
+ export * from "./ai-elements/shimmer";
94
+ export * from "./ai-elements/sources";
95
+ export * from "./ai-elements/speech-input";
96
+ export * from "./ai-elements/suggestion";
@@ -1,35 +1,35 @@
1
- import type { Transition, Variants } from "motion/react";
2
-
3
- export const motionEase: [number, number, number, number] = [0.22, 1, 0.36, 1];
4
-
5
- export const motionDuration = {
6
- fast: 0.22,
7
- base: 0.3,
8
- slow: 0.36,
9
- } as const;
10
-
11
- export const motionTiming = {
12
- route: 0.3,
13
- sidebar: 0.28,
14
- stagger: 0.03,
15
- } as const;
16
-
17
- export const motionDistance = {
18
- routeX: 12,
19
- pageY: 8,
20
- } as const;
21
-
22
- export const defaultTransition: Transition = {
23
- duration: motionDuration.base,
24
- ease: motionEase,
25
- };
26
-
27
- export const fadeUp: Variants = {
28
- hidden: { opacity: 0, y: motionDistance.pageY },
29
- show: { opacity: 1, y: 0, transition: defaultTransition },
30
- exit: {
31
- opacity: 0,
32
- y: 6,
33
- transition: { duration: motionDuration.fast, ease: motionEase },
34
- },
35
- };
1
+ import type { Transition, Variants } from "motion/react";
2
+
3
+ export const motionEase: [number, number, number, number] = [0.22, 1, 0.36, 1];
4
+
5
+ export const motionDuration = {
6
+ fast: 0.22,
7
+ base: 0.3,
8
+ slow: 0.36,
9
+ } as const;
10
+
11
+ export const motionTiming = {
12
+ route: 0.3,
13
+ sidebar: 0.28,
14
+ stagger: 0.03,
15
+ } as const;
16
+
17
+ export const motionDistance = {
18
+ routeX: 12,
19
+ pageY: 8,
20
+ } as const;
21
+
22
+ export const defaultTransition: Transition = {
23
+ duration: motionDuration.base,
24
+ ease: motionEase,
25
+ };
26
+
27
+ export const fadeUp: Variants = {
28
+ hidden: { opacity: 0, y: motionDistance.pageY },
29
+ show: { opacity: 1, y: 0, transition: defaultTransition },
30
+ exit: {
31
+ opacity: 0,
32
+ y: 6,
33
+ transition: { duration: motionDuration.fast, ease: motionEase },
34
+ },
35
+ };