@gram-ai/elements 1.34.0 → 1.36.0

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 (238) hide show
  1. package/dist/compat-shims-CO9JXXV4.cjs.map +1 -1
  2. package/dist/compat-shims-DxtUrORi.js.map +1 -1
  3. package/dist/compat-shims.d.ts +9 -8
  4. package/dist/components/Chat/index.d.ts +2 -1
  5. package/dist/components/ChatHistory.d.ts +1 -1
  6. package/dist/components/FrontendTools/index.d.ts +1 -1
  7. package/dist/components/Replay.d.ts +1 -1
  8. package/dist/components/Replay.stories.d.ts +2 -2
  9. package/dist/components/ShadowRoot.d.ts +1 -1
  10. package/dist/components/ShareButton/index.d.ts +1 -1
  11. package/dist/components/assistant-ui/thinking-indicator.d.ts +8 -0
  12. package/dist/components/ui/avatar.d.ts +3 -3
  13. package/dist/components/ui/button.d.ts +2 -2
  14. package/dist/components/ui/buttonVariants.d.ts +2 -2
  15. package/dist/components/ui/calendar.d.ts +2 -1
  16. package/dist/components/ui/collapsible.d.ts +3 -3
  17. package/dist/components/ui/dialog.d.ts +10 -10
  18. package/dist/components/ui/popover.d.ts +4 -4
  19. package/dist/components/ui/skeleton.d.ts +1 -1
  20. package/dist/components/ui/time-range-picker.d.ts +2 -1
  21. package/dist/components/ui/tool-ui.d.ts +9 -7
  22. package/dist/components/ui/tooltip.d.ts +4 -4
  23. package/dist/contexts/ConnectionStatusContext.d.ts +1 -1
  24. package/dist/contexts/ElementsProvider.d.ts +1 -1
  25. package/dist/contexts/ToolApprovalContext.d.ts +2 -2
  26. package/dist/contexts/ToolExecutionContext.d.ts +1 -1
  27. package/dist/contexts/portal-container.d.ts +1 -1
  28. package/dist/elements.cjs +1 -1
  29. package/dist/elements.css +1 -1
  30. package/dist/elements.js +2 -2
  31. package/dist/hooks/useDensity.d.ts +1 -1
  32. package/dist/hooks/useElements.d.ts +2 -1
  33. package/dist/hooks/useGramThreadListAdapter.d.ts +13 -0
  34. package/dist/hooks/useRadius.d.ts +1 -1
  35. package/dist/hooks/useThemeProps.d.ts +1 -1
  36. package/dist/hooks/useToolApproval.d.ts +2 -1
  37. package/dist/index-7fTI_vaV.cjs +194 -0
  38. package/dist/index-7fTI_vaV.cjs.map +1 -0
  39. package/dist/{index-B5lZrrO2.js → index-Bv-yE4G1.js} +2919 -2806
  40. package/dist/index-Bv-yE4G1.js.map +1 -0
  41. package/dist/{index-BFU6NvbL.js → index-BziIHO9O.js} +9621 -9308
  42. package/dist/index-BziIHO9O.js.map +1 -0
  43. package/dist/{index-C08dvTEo.cjs → index-CGBkMd0d.cjs} +48 -48
  44. package/dist/index-CGBkMd0d.cjs.map +1 -0
  45. package/dist/lib/errorTracking.d.ts +1 -1
  46. package/dist/lib/tools.d.ts +11 -10
  47. package/dist/plugins/generative-ui/catalog.d.ts +3 -3
  48. package/dist/plugins/generative-ui/ui/accordion-wrapper.d.ts +2 -2
  49. package/dist/plugins/generative-ui/ui/accordion.d.ts +4 -4
  50. package/dist/plugins/generative-ui/ui/action-button.d.ts +1 -1
  51. package/dist/plugins/generative-ui/ui/alert-wrapper.d.ts +2 -1
  52. package/dist/plugins/generative-ui/ui/alert.d.ts +3 -3
  53. package/dist/plugins/generative-ui/ui/avatar-wrapper.d.ts +2 -1
  54. package/dist/plugins/generative-ui/ui/avatar.d.ts +6 -6
  55. package/dist/plugins/generative-ui/ui/badge.d.ts +2 -2
  56. package/dist/plugins/generative-ui/ui/button-wrapper.d.ts +2 -1
  57. package/dist/plugins/generative-ui/ui/button.d.ts +3 -3
  58. package/dist/plugins/generative-ui/ui/card-wrapper.d.ts +1 -1
  59. package/dist/plugins/generative-ui/ui/card.d.ts +7 -7
  60. package/dist/plugins/generative-ui/ui/checkbox-wrapper.d.ts +2 -1
  61. package/dist/plugins/generative-ui/ui/checkbox.d.ts +1 -1
  62. package/dist/plugins/generative-ui/ui/data-table.d.ts +1 -1
  63. package/dist/plugins/generative-ui/ui/dialog.d.ts +10 -10
  64. package/dist/plugins/generative-ui/ui/dropdown-menu.d.ts +15 -15
  65. package/dist/plugins/generative-ui/ui/grid.d.ts +1 -1
  66. package/dist/plugins/generative-ui/ui/index.d.ts +57 -40
  67. package/dist/plugins/generative-ui/ui/input-wrapper.d.ts +2 -1
  68. package/dist/plugins/generative-ui/ui/input.d.ts +1 -1
  69. package/dist/plugins/generative-ui/ui/label.d.ts +1 -1
  70. package/dist/plugins/generative-ui/ui/list.d.ts +2 -1
  71. package/dist/plugins/generative-ui/ui/metric.d.ts +1 -1
  72. package/dist/plugins/generative-ui/ui/pagination.d.ts +7 -7
  73. package/dist/plugins/generative-ui/ui/popover.d.ts +7 -7
  74. package/dist/plugins/generative-ui/ui/progress.d.ts +1 -1
  75. package/dist/plugins/generative-ui/ui/radio-group.d.ts +2 -2
  76. package/dist/plugins/generative-ui/ui/select-wrapper.d.ts +2 -1
  77. package/dist/plugins/generative-ui/ui/select.d.ts +10 -10
  78. package/dist/plugins/generative-ui/ui/separator.d.ts +1 -1
  79. package/dist/plugins/generative-ui/ui/skeleton-wrapper.d.ts +2 -1
  80. package/dist/plugins/generative-ui/ui/skeleton.d.ts +1 -1
  81. package/dist/plugins/generative-ui/ui/stack.d.ts +1 -1
  82. package/dist/plugins/generative-ui/ui/switch.d.ts +1 -1
  83. package/dist/plugins/generative-ui/ui/table.d.ts +8 -8
  84. package/dist/plugins/generative-ui/ui/tabs-wrapper.d.ts +2 -2
  85. package/dist/plugins/generative-ui/ui/tabs.d.ts +4 -4
  86. package/dist/plugins/generative-ui/ui/text.d.ts +1 -1
  87. package/dist/plugins/generative-ui/ui/textarea.d.ts +1 -1
  88. package/dist/plugins/generative-ui/ui/tooltip.d.ts +4 -4
  89. package/dist/plugins.cjs +1 -1
  90. package/dist/plugins.js +1 -1
  91. package/dist/{profiler-BRnyr1GA.cjs → profiler-DuJEf_S6.cjs} +2 -2
  92. package/dist/{profiler-BRnyr1GA.cjs.map → profiler-DuJEf_S6.cjs.map} +1 -1
  93. package/dist/{profiler-KLSTpp6I.js → profiler-xLXOPfmj.js} +2 -2
  94. package/dist/{profiler-KLSTpp6I.js.map → profiler-xLXOPfmj.js.map} +1 -1
  95. package/dist/react-shim.cjs.map +1 -1
  96. package/dist/react-shim.d.ts +1 -1
  97. package/dist/react-shim.js +1 -4
  98. package/dist/react-shim.js.map +1 -1
  99. package/dist/server/bun.cjs.map +1 -1
  100. package/dist/server/bun.js.map +1 -1
  101. package/dist/server/express.cjs.map +1 -1
  102. package/dist/server/express.js.map +1 -1
  103. package/dist/server/fastify.cjs.map +1 -1
  104. package/dist/server/fastify.js.map +1 -1
  105. package/dist/server/hono.cjs.map +1 -1
  106. package/dist/server/hono.js.map +1 -1
  107. package/dist/server/nextjs.cjs.map +1 -1
  108. package/dist/server/nextjs.js.map +1 -1
  109. package/dist/server/tanstack-start.cjs.map +1 -1
  110. package/dist/server/tanstack-start.js.map +1 -1
  111. package/dist/{startRecording-CKx-YWbq.cjs → startRecording-C2XF9-Ol.cjs} +2 -2
  112. package/dist/{startRecording-CKx-YWbq.cjs.map → startRecording-C2XF9-Ol.cjs.map} +1 -1
  113. package/dist/{startRecording-BfxB1xxR.js → startRecording-qKnXr4lw.js} +2 -2
  114. package/dist/{startRecording-BfxB1xxR.js.map → startRecording-qKnXr4lw.js.map} +1 -1
  115. package/dist/types/index.d.ts +29 -3
  116. package/package.json +8 -11
  117. package/src/compat-shims.ts +16 -2
  118. package/src/components/Chat/index.tsx +4 -1
  119. package/src/components/Chat/stories/FrontendTools.stories.tsx +1 -1
  120. package/src/components/Chat/stories/ToolApproval.stories.tsx +2 -2
  121. package/src/components/Chat/stories/Tools.stories.tsx +13 -5
  122. package/src/components/ChatHistory.tsx +3 -1
  123. package/src/components/FrontendTools/index.tsx +1 -1
  124. package/src/components/MessageContent.tsx +1 -0
  125. package/src/components/Replay.stories.tsx +2 -3
  126. package/src/components/Replay.tsx +17 -10
  127. package/src/components/ShadowRoot.tsx +2 -2
  128. package/src/components/ShareButton/index.tsx +4 -2
  129. package/src/components/assistant-ui/assistant-modal.tsx +5 -3
  130. package/src/components/assistant-ui/attachment.tsx +1 -1
  131. package/src/components/assistant-ui/error-boundary.tsx +1 -1
  132. package/src/components/assistant-ui/markdown-text.tsx +1 -1
  133. package/src/components/assistant-ui/thinking-indicator.tsx +175 -0
  134. package/src/components/assistant-ui/thread.tsx +251 -27
  135. package/src/components/assistant-ui/tool-fallback.tsx +8 -8
  136. package/src/components/assistant-ui/tool-group.tsx +4 -13
  137. package/src/components/assistant-ui/tool-mention-autocomplete.tsx +1 -1
  138. package/src/components/ui/avatar.tsx +3 -3
  139. package/src/components/ui/calendar.tsx +1 -1
  140. package/src/components/ui/collapsible.tsx +7 -3
  141. package/src/components/ui/dialog.tsx +18 -10
  142. package/src/components/ui/generative-ui.tsx +9 -4
  143. package/src/components/ui/popover.tsx +4 -4
  144. package/src/components/ui/skeleton.tsx +4 -1
  145. package/src/components/ui/time-range-picker.stories.tsx +164 -154
  146. package/src/components/ui/time-range-picker.tsx +11 -5
  147. package/src/components/ui/tool-ui.tsx +68 -40
  148. package/src/components/ui/tooltip.tsx +4 -4
  149. package/src/contexts/ChatIdContext.tsx +1 -1
  150. package/src/contexts/ConnectionStatusContext.tsx +6 -5
  151. package/src/contexts/ElementsProvider.tsx +64 -41
  152. package/src/contexts/ReplayContext.ts +1 -1
  153. package/src/contexts/ToolApprovalContext.tsx +5 -1
  154. package/src/contexts/ToolExecutionContext.tsx +1 -1
  155. package/src/contexts/portal-container.tsx +1 -1
  156. package/src/global.css +55 -16
  157. package/src/hooks/useAuth.ts +2 -1
  158. package/src/hooks/useDensity.ts +1 -1
  159. package/src/hooks/useElements.ts +2 -1
  160. package/src/hooks/useFollowOnSuggestions.ts +3 -6
  161. package/src/hooks/useGramThreadListAdapter.tsx +50 -3
  162. package/src/hooks/useMCPTools.ts +2 -2
  163. package/src/hooks/useModel.ts +1 -3
  164. package/src/hooks/usePluginComponents.ts +3 -1
  165. package/src/hooks/useRadius.ts +1 -1
  166. package/src/hooks/useSession.ts +3 -1
  167. package/src/hooks/useThemeProps.ts +5 -5
  168. package/src/hooks/useToolApproval.ts +2 -1
  169. package/src/lib/cassette.ts +20 -8
  170. package/src/lib/errorTracking.ts +1 -4
  171. package/src/lib/messageConverter.test.ts +11 -13
  172. package/src/lib/messageConverter.ts +13 -4
  173. package/src/lib/token.ts +2 -5
  174. package/src/lib/tool-mentions.ts +5 -2
  175. package/src/lib/tools.byte-cap.test.ts +1 -1
  176. package/src/lib/tools.test.ts +1 -1
  177. package/src/lib/tools.ts +15 -5
  178. package/src/lib/utils.ts +2 -2
  179. package/src/lib.d.ts +8 -1
  180. package/src/plugins/chart/chart.test.ts +3 -4
  181. package/src/plugins/chart/component.tsx +7 -6
  182. package/src/plugins/chart/ui/area-chart.tsx +1 -1
  183. package/src/plugins/chart/ui/line-chart.tsx +1 -1
  184. package/src/plugins/generative-ui/ui/accordion-wrapper.tsx +2 -2
  185. package/src/plugins/generative-ui/ui/accordion.tsx +4 -4
  186. package/src/plugins/generative-ui/ui/action-button.tsx +4 -2
  187. package/src/plugins/generative-ui/ui/alert-wrapper.tsx +1 -1
  188. package/src/plugins/generative-ui/ui/alert.tsx +7 -3
  189. package/src/plugins/generative-ui/ui/avatar-wrapper.tsx +5 -1
  190. package/src/plugins/generative-ui/ui/avatar.tsx +12 -6
  191. package/src/plugins/generative-ui/ui/badge.tsx +1 -1
  192. package/src/plugins/generative-ui/ui/button-wrapper.tsx +1 -1
  193. package/src/plugins/generative-ui/ui/button.tsx +1 -1
  194. package/src/plugins/generative-ui/ui/card-wrapper.tsx +1 -1
  195. package/src/plugins/generative-ui/ui/card.tsx +28 -7
  196. package/src/plugins/generative-ui/ui/checkbox-wrapper.tsx +1 -1
  197. package/src/plugins/generative-ui/ui/checkbox.tsx +1 -1
  198. package/src/plugins/generative-ui/ui/data-table.tsx +1 -1
  199. package/src/plugins/generative-ui/ui/dialog.tsx +15 -10
  200. package/src/plugins/generative-ui/ui/dropdown-menu.tsx +33 -15
  201. package/src/plugins/generative-ui/ui/grid.tsx +1 -1
  202. package/src/plugins/generative-ui/ui/index.ts +154 -40
  203. package/src/plugins/generative-ui/ui/input-wrapper.tsx +1 -1
  204. package/src/plugins/generative-ui/ui/input.tsx +5 -1
  205. package/src/plugins/generative-ui/ui/label.tsx +1 -1
  206. package/src/plugins/generative-ui/ui/list.tsx +5 -1
  207. package/src/plugins/generative-ui/ui/metric.tsx +2 -1
  208. package/src/plugins/generative-ui/ui/pagination.tsx +12 -7
  209. package/src/plugins/generative-ui/ui/popover.tsx +13 -7
  210. package/src/plugins/generative-ui/ui/progress.tsx +1 -1
  211. package/src/plugins/generative-ui/ui/radio-group.tsx +2 -2
  212. package/src/plugins/generative-ui/ui/select-wrapper.tsx +1 -1
  213. package/src/plugins/generative-ui/ui/select.tsx +14 -10
  214. package/src/plugins/generative-ui/ui/separator.tsx +1 -1
  215. package/src/plugins/generative-ui/ui/skeleton-wrapper.tsx +1 -1
  216. package/src/plugins/generative-ui/ui/skeleton.tsx +4 -1
  217. package/src/plugins/generative-ui/ui/stack.tsx +1 -1
  218. package/src/plugins/generative-ui/ui/switch.tsx +1 -1
  219. package/src/plugins/generative-ui/ui/table.tsx +29 -8
  220. package/src/plugins/generative-ui/ui/tabs-wrapper.tsx +5 -2
  221. package/src/plugins/generative-ui/ui/tabs.tsx +4 -4
  222. package/src/plugins/generative-ui/ui/text.tsx +1 -1
  223. package/src/plugins/generative-ui/ui/textarea.tsx +4 -1
  224. package/src/plugins/generative-ui/ui/tooltip.tsx +4 -4
  225. package/src/react-shim.ts +9 -4
  226. package/src/server/bun.ts +1 -1
  227. package/src/server/express.ts +1 -1
  228. package/src/server/fastify.ts +1 -1
  229. package/src/server/hono.ts +1 -1
  230. package/src/server/nextjs.ts +1 -1
  231. package/src/server/tanstack-start.ts +1 -1
  232. package/src/storybook.d.ts +5 -0
  233. package/src/types/index.ts +39 -3
  234. package/dist/index-B5lZrrO2.js.map +0 -1
  235. package/dist/index-BFU6NvbL.js.map +0 -1
  236. package/dist/index-C08dvTEo.cjs.map +0 -1
  237. package/dist/index-DzZ1-jQY.cjs +0 -194
  238. package/dist/index-DzZ1-jQY.cjs.map +0 -1
@@ -2,7 +2,10 @@ import * as React from "react";
2
2
 
3
3
  import { cn } from "@/lib/utils";
4
4
 
5
- function Card({ className, ...props }: React.ComponentProps<"div">) {
5
+ function Card({
6
+ className,
7
+ ...props
8
+ }: React.ComponentProps<"div">): React.JSX.Element {
6
9
  return (
7
10
  <div
8
11
  data-slot="card"
@@ -15,7 +18,10 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
15
18
  );
16
19
  }
17
20
 
18
- function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
21
+ function CardHeader({
22
+ className,
23
+ ...props
24
+ }: React.ComponentProps<"div">): React.JSX.Element {
19
25
  return (
20
26
  <div
21
27
  data-slot="card-header"
@@ -28,7 +34,10 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
28
34
  );
29
35
  }
30
36
 
31
- function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
37
+ function CardTitle({
38
+ className,
39
+ ...props
40
+ }: React.ComponentProps<"div">): React.JSX.Element {
32
41
  return (
33
42
  <div
34
43
  data-slot="card-title"
@@ -38,7 +47,10 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
38
47
  );
39
48
  }
40
49
 
41
- function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
50
+ function CardDescription({
51
+ className,
52
+ ...props
53
+ }: React.ComponentProps<"div">): React.JSX.Element {
42
54
  return (
43
55
  <div
44
56
  data-slot="card-description"
@@ -48,7 +60,10 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
48
60
  );
49
61
  }
50
62
 
51
- function CardAction({ className, ...props }: React.ComponentProps<"div">) {
63
+ function CardAction({
64
+ className,
65
+ ...props
66
+ }: React.ComponentProps<"div">): React.JSX.Element {
52
67
  return (
53
68
  <div
54
69
  data-slot="card-action"
@@ -61,7 +76,10 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
61
76
  );
62
77
  }
63
78
 
64
- function CardContent({ className, ...props }: React.ComponentProps<"div">) {
79
+ function CardContent({
80
+ className,
81
+ ...props
82
+ }: React.ComponentProps<"div">): React.JSX.Element {
65
83
  return (
66
84
  <div
67
85
  data-slot="card-content"
@@ -71,7 +89,10 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
71
89
  );
72
90
  }
73
91
 
74
- function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
92
+ function CardFooter({
93
+ className,
94
+ ...props
95
+ }: React.ComponentProps<"div">): React.JSX.Element {
75
96
  return (
76
97
  <div
77
98
  data-slot="card-footer"
@@ -18,7 +18,7 @@ export function CheckboxWrapper({
18
18
  label,
19
19
  valuePath,
20
20
  defaultChecked,
21
- }: CheckboxWrapperProps) {
21
+ }: CheckboxWrapperProps): React.JSX.Element {
22
22
  const id = React.useId();
23
23
 
24
24
  return (
@@ -9,7 +9,7 @@ import { cn } from "@/lib/utils";
9
9
  function Checkbox({
10
10
  className,
11
11
  ...props
12
- }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
12
+ }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element {
13
13
  return (
14
14
  <CheckboxPrimitive.Root
15
15
  data-slot="checkbox"
@@ -25,7 +25,7 @@ export function DataTable({
25
25
  rows,
26
26
  className,
27
27
  ...props
28
- }: DataTableProps) {
28
+ }: DataTableProps): React.JSX.Element {
29
29
  return (
30
30
  <div className={cn(className)} {...props}>
31
31
  <Table>
@@ -9,32 +9,32 @@ import { Button } from "@/components/ui/button";
9
9
 
10
10
  function Dialog({
11
11
  ...props
12
- }: React.ComponentProps<typeof DialogPrimitive.Root>) {
12
+ }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element {
13
13
  return <DialogPrimitive.Root data-slot="dialog" {...props} />;
14
14
  }
15
15
 
16
16
  function DialogTrigger({
17
17
  ...props
18
- }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
18
+ }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element {
19
19
  return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
20
20
  }
21
21
 
22
22
  function DialogPortal({
23
23
  ...props
24
- }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
24
+ }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element {
25
25
  return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
26
26
  }
27
27
 
28
28
  function DialogClose({
29
29
  ...props
30
- }: React.ComponentProps<typeof DialogPrimitive.Close>) {
30
+ }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element {
31
31
  return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
32
32
  }
33
33
 
34
34
  function DialogOverlay({
35
35
  className,
36
36
  ...props
37
- }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
37
+ }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element {
38
38
  return (
39
39
  <DialogPrimitive.Overlay
40
40
  data-slot="dialog-overlay"
@@ -54,7 +54,7 @@ function DialogContent({
54
54
  ...props
55
55
  }: React.ComponentProps<typeof DialogPrimitive.Content> & {
56
56
  showCloseButton?: boolean;
57
- }) {
57
+ }): React.JSX.Element {
58
58
  return (
59
59
  <DialogPortal data-slot="dialog-portal">
60
60
  <DialogOverlay />
@@ -81,7 +81,10 @@ function DialogContent({
81
81
  );
82
82
  }
83
83
 
84
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
84
+ function DialogHeader({
85
+ className,
86
+ ...props
87
+ }: React.ComponentProps<"div">): React.JSX.Element {
85
88
  return (
86
89
  <div
87
90
  data-slot="dialog-header"
@@ -98,7 +101,7 @@ function DialogFooter({
98
101
  ...props
99
102
  }: React.ComponentProps<"div"> & {
100
103
  showCloseButton?: boolean;
101
- }) {
104
+ }): React.JSX.Element {
102
105
  return (
103
106
  <div
104
107
  data-slot="dialog-footer"
@@ -121,7 +124,7 @@ function DialogFooter({
121
124
  function DialogTitle({
122
125
  className,
123
126
  ...props
124
- }: React.ComponentProps<typeof DialogPrimitive.Title>) {
127
+ }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element {
125
128
  return (
126
129
  <DialogPrimitive.Title
127
130
  data-slot="dialog-title"
@@ -134,7 +137,9 @@ function DialogTitle({
134
137
  function DialogDescription({
135
138
  className,
136
139
  ...props
137
- }: React.ComponentProps<typeof DialogPrimitive.Description>) {
140
+ }: React.ComponentProps<
141
+ typeof DialogPrimitive.Description
142
+ >): React.JSX.Element {
138
143
  return (
139
144
  <DialogPrimitive.Description
140
145
  data-slot="dialog-description"
@@ -8,13 +8,15 @@ import { cn } from "@/lib/utils";
8
8
 
9
9
  function DropdownMenu({
10
10
  ...props
11
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
11
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element {
12
12
  return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
13
13
  }
14
14
 
15
15
  function DropdownMenuPortal({
16
16
  ...props
17
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
17
+ }: React.ComponentProps<
18
+ typeof DropdownMenuPrimitive.Portal
19
+ >): React.JSX.Element {
18
20
  return (
19
21
  <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
20
22
  );
@@ -22,7 +24,9 @@ function DropdownMenuPortal({
22
24
 
23
25
  function DropdownMenuTrigger({
24
26
  ...props
25
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
27
+ }: React.ComponentProps<
28
+ typeof DropdownMenuPrimitive.Trigger
29
+ >): React.JSX.Element {
26
30
  return (
27
31
  <DropdownMenuPrimitive.Trigger
28
32
  data-slot="dropdown-menu-trigger"
@@ -35,7 +39,9 @@ function DropdownMenuContent({
35
39
  className,
36
40
  sideOffset = 4,
37
41
  ...props
38
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
42
+ }: React.ComponentProps<
43
+ typeof DropdownMenuPrimitive.Content
44
+ >): React.JSX.Element {
39
45
  return (
40
46
  <DropdownMenuPrimitive.Portal>
41
47
  <DropdownMenuPrimitive.Content
@@ -53,7 +59,9 @@ function DropdownMenuContent({
53
59
 
54
60
  function DropdownMenuGroup({
55
61
  ...props
56
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
62
+ }: React.ComponentProps<
63
+ typeof DropdownMenuPrimitive.Group
64
+ >): React.JSX.Element {
57
65
  return (
58
66
  <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
59
67
  );
@@ -67,7 +75,7 @@ function DropdownMenuItem({
67
75
  }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
68
76
  inset?: boolean;
69
77
  variant?: "default" | "destructive";
70
- }) {
78
+ }): React.JSX.Element {
71
79
  return (
72
80
  <DropdownMenuPrimitive.Item
73
81
  data-slot="dropdown-menu-item"
@@ -87,7 +95,9 @@ function DropdownMenuCheckboxItem({
87
95
  children,
88
96
  checked,
89
97
  ...props
90
- }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
98
+ }: React.ComponentProps<
99
+ typeof DropdownMenuPrimitive.CheckboxItem
100
+ >): React.JSX.Element {
91
101
  return (
92
102
  <DropdownMenuPrimitive.CheckboxItem
93
103
  data-slot="dropdown-menu-checkbox-item"
@@ -110,7 +120,9 @@ function DropdownMenuCheckboxItem({
110
120
 
111
121
  function DropdownMenuRadioGroup({
112
122
  ...props
113
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
123
+ }: React.ComponentProps<
124
+ typeof DropdownMenuPrimitive.RadioGroup
125
+ >): React.JSX.Element {
114
126
  return (
115
127
  <DropdownMenuPrimitive.RadioGroup
116
128
  data-slot="dropdown-menu-radio-group"
@@ -123,7 +135,9 @@ function DropdownMenuRadioItem({
123
135
  className,
124
136
  children,
125
137
  ...props
126
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
138
+ }: React.ComponentProps<
139
+ typeof DropdownMenuPrimitive.RadioItem
140
+ >): React.JSX.Element {
127
141
  return (
128
142
  <DropdownMenuPrimitive.RadioItem
129
143
  data-slot="dropdown-menu-radio-item"
@@ -149,7 +163,7 @@ function DropdownMenuLabel({
149
163
  ...props
150
164
  }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
151
165
  inset?: boolean;
152
- }) {
166
+ }): React.JSX.Element {
153
167
  return (
154
168
  <DropdownMenuPrimitive.Label
155
169
  data-slot="dropdown-menu-label"
@@ -166,7 +180,9 @@ function DropdownMenuLabel({
166
180
  function DropdownMenuSeparator({
167
181
  className,
168
182
  ...props
169
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
183
+ }: React.ComponentProps<
184
+ typeof DropdownMenuPrimitive.Separator
185
+ >): React.JSX.Element {
170
186
  return (
171
187
  <DropdownMenuPrimitive.Separator
172
188
  data-slot="dropdown-menu-separator"
@@ -179,7 +195,7 @@ function DropdownMenuSeparator({
179
195
  function DropdownMenuShortcut({
180
196
  className,
181
197
  ...props
182
- }: React.ComponentProps<"span">) {
198
+ }: React.ComponentProps<"span">): React.JSX.Element {
183
199
  return (
184
200
  <span
185
201
  data-slot="dropdown-menu-shortcut"
@@ -194,7 +210,7 @@ function DropdownMenuShortcut({
194
210
 
195
211
  function DropdownMenuSub({
196
212
  ...props
197
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
213
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element {
198
214
  return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
199
215
  }
200
216
 
@@ -205,7 +221,7 @@ function DropdownMenuSubTrigger({
205
221
  ...props
206
222
  }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
207
223
  inset?: boolean;
208
- }) {
224
+ }): React.JSX.Element {
209
225
  return (
210
226
  <DropdownMenuPrimitive.SubTrigger
211
227
  data-slot="dropdown-menu-sub-trigger"
@@ -225,7 +241,9 @@ function DropdownMenuSubTrigger({
225
241
  function DropdownMenuSubContent({
226
242
  className,
227
243
  ...props
228
- }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
244
+ }: React.ComponentProps<
245
+ typeof DropdownMenuPrimitive.SubContent
246
+ >): React.JSX.Element {
229
247
  return (
230
248
  <DropdownMenuPrimitive.SubContent
231
249
  data-slot="dropdown-menu-sub-content"
@@ -17,7 +17,7 @@ export function Grid({
17
17
  gap = "md",
18
18
  className,
19
19
  ...props
20
- }: GridProps) {
20
+ }: GridProps): React.JSX.Element {
21
21
  return (
22
22
  <div
23
23
  data-slot="grid"
@@ -1,43 +1,157 @@
1
1
  // Vercel shadcn primitives
2
- export * from "./accordion";
3
- export * from "./alert";
4
- export * from "./avatar";
5
- export * from "./badge";
6
- export * from "./button";
7
- export * from "./card";
8
- export * from "./checkbox";
9
- export * from "./dialog";
10
- export * from "./dropdown-menu";
11
- export * from "./input";
12
- export * from "./label";
13
- export * from "./pagination";
14
- export * from "./popover";
15
- export * from "./progress";
16
- export * from "./radio-group";
17
- export * from "./select";
18
- export * from "./separator";
19
- export * from "./skeleton";
20
- export * from "./switch";
21
- export * from "./table";
22
- export * from "./tabs";
23
- export * from "./textarea";
24
- export * from "./tooltip";
2
+ export {
3
+ Accordion,
4
+ AccordionContent,
5
+ AccordionItem,
6
+ AccordionTrigger,
7
+ } from "./accordion";
8
+ export { Alert, AlertDescription, AlertTitle } from "./alert";
9
+ export {
10
+ Avatar,
11
+ AvatarBadge,
12
+ AvatarFallback,
13
+ AvatarGroup,
14
+ AvatarGroupCount,
15
+ AvatarImage,
16
+ } from "./avatar";
17
+ export { Badge, badgeVariants } from "./badge";
18
+ export { Button, buttonVariants } from "./button";
19
+ export {
20
+ Card,
21
+ CardAction,
22
+ CardContent,
23
+ CardDescription,
24
+ CardFooter,
25
+ CardHeader,
26
+ CardTitle,
27
+ } from "./card";
28
+ export { Checkbox } from "./checkbox";
29
+ export {
30
+ Dialog,
31
+ DialogClose,
32
+ DialogContent,
33
+ DialogDescription,
34
+ DialogFooter,
35
+ DialogHeader,
36
+ DialogOverlay,
37
+ DialogPortal,
38
+ DialogTitle,
39
+ DialogTrigger,
40
+ } from "./dialog";
41
+ export {
42
+ DropdownMenu,
43
+ DropdownMenuCheckboxItem,
44
+ DropdownMenuContent,
45
+ DropdownMenuGroup,
46
+ DropdownMenuItem,
47
+ DropdownMenuLabel,
48
+ DropdownMenuPortal,
49
+ DropdownMenuRadioGroup,
50
+ DropdownMenuRadioItem,
51
+ DropdownMenuSeparator,
52
+ DropdownMenuShortcut,
53
+ DropdownMenuSub,
54
+ DropdownMenuSubContent,
55
+ DropdownMenuSubTrigger,
56
+ DropdownMenuTrigger,
57
+ } from "./dropdown-menu";
58
+ export { Input } from "./input";
59
+ export { Label } from "./label";
60
+ export {
61
+ Pagination,
62
+ PaginationContent,
63
+ PaginationEllipsis,
64
+ PaginationItem,
65
+ PaginationLink,
66
+ PaginationNext,
67
+ PaginationPrevious,
68
+ } from "./pagination";
69
+ export {
70
+ Popover,
71
+ PopoverAnchor,
72
+ PopoverContent,
73
+ PopoverDescription,
74
+ PopoverHeader,
75
+ PopoverTitle,
76
+ PopoverTrigger,
77
+ } from "./popover";
78
+ export { Progress } from "./progress";
79
+ export { RadioGroup, RadioGroupItem } from "./radio-group";
80
+ export {
81
+ Select,
82
+ SelectContent,
83
+ SelectGroup,
84
+ SelectItem,
85
+ SelectLabel,
86
+ SelectScrollDownButton,
87
+ SelectScrollUpButton,
88
+ SelectSeparator,
89
+ SelectTrigger,
90
+ SelectValue,
91
+ } from "./select";
92
+ export { Separator } from "./separator";
93
+ export { Skeleton } from "./skeleton";
94
+ export { Switch } from "./switch";
95
+ export {
96
+ Table,
97
+ TableBody,
98
+ TableCaption,
99
+ TableCell,
100
+ TableFooter,
101
+ TableHead,
102
+ TableHeader,
103
+ TableRow,
104
+ } from "./table";
105
+ export {
106
+ Tabs,
107
+ TabsContent,
108
+ TabsList,
109
+ TabsTrigger,
110
+ tabsListVariants,
111
+ } from "./tabs";
112
+ export { Textarea } from "./textarea";
113
+ export {
114
+ Tooltip,
115
+ TooltipContent,
116
+ TooltipProvider,
117
+ TooltipTrigger,
118
+ } from "./tooltip";
25
119
 
26
120
  // json-render catalog wrappers
27
- export * from "./accordion-wrapper";
28
- export * from "./action-button";
29
- export * from "./alert-wrapper";
30
- export * from "./avatar-wrapper";
31
- export * from "./button-wrapper";
32
- export * from "./card-wrapper";
33
- export * from "./checkbox-wrapper";
34
- export * from "./data-table";
35
- export * from "./grid";
36
- export * from "./input-wrapper";
37
- export * from "./list";
38
- export * from "./metric";
39
- export * from "./select-wrapper";
40
- export * from "./skeleton-wrapper";
41
- export * from "./stack";
42
- export * from "./tabs-wrapper";
43
- export * from "./text";
121
+ export { AccordionItemWrapper, AccordionWrapper } from "./accordion-wrapper";
122
+ export type {
123
+ AccordionItemWrapperProps,
124
+ AccordionWrapperProps,
125
+ } from "./accordion-wrapper";
126
+ export { ActionButton } from "./action-button";
127
+ export type { ActionButtonProps } from "./action-button";
128
+ export { AlertWrapper } from "./alert-wrapper";
129
+ export type { AlertWrapperProps } from "./alert-wrapper";
130
+ export { AvatarWrapper } from "./avatar-wrapper";
131
+ export type { AvatarWrapperProps } from "./avatar-wrapper";
132
+ export { ButtonWrapper } from "./button-wrapper";
133
+ export type { ButtonWrapperProps } from "./button-wrapper";
134
+ export { CardWrapper } from "./card-wrapper";
135
+ export type { CardWrapperProps } from "./card-wrapper";
136
+ export { CheckboxWrapper } from "./checkbox-wrapper";
137
+ export type { CheckboxWrapperProps } from "./checkbox-wrapper";
138
+ export { DataTable } from "./data-table";
139
+ export type { DataTableProps } from "./data-table";
140
+ export { Grid } from "./grid";
141
+ export type { GridProps } from "./grid";
142
+ export { InputWrapper } from "./input-wrapper";
143
+ export type { InputWrapperProps } from "./input-wrapper";
144
+ export { List } from "./list";
145
+ export type { ListProps } from "./list";
146
+ export { Metric } from "./metric";
147
+ export type { MetricProps } from "./metric";
148
+ export { SelectWrapper } from "./select-wrapper";
149
+ export type { SelectWrapperProps } from "./select-wrapper";
150
+ export { SkeletonWrapper } from "./skeleton-wrapper";
151
+ export type { SkeletonWrapperProps } from "./skeleton-wrapper";
152
+ export { Stack } from "./stack";
153
+ export type { StackProps } from "./stack";
154
+ export { TabContentWrapper, TabsWrapper } from "./tabs-wrapper";
155
+ export type { TabContentWrapperProps, TabsWrapperProps } from "./tabs-wrapper";
156
+ export { Text } from "./text";
157
+ export type { TextProps } from "./text";
@@ -20,7 +20,7 @@ export function InputWrapper({
20
20
  placeholder,
21
21
  type = "text",
22
22
  valuePath,
23
- }: InputWrapperProps) {
23
+ }: InputWrapperProps): React.JSX.Element {
24
24
  const id = React.useId();
25
25
 
26
26
  return (
@@ -2,7 +2,11 @@ import * as React from "react";
2
2
 
3
3
  import { cn } from "@/lib/utils";
4
4
 
5
- function Input({ className, type, ...props }: React.ComponentProps<"input">) {
5
+ function Input({
6
+ className,
7
+ type,
8
+ ...props
9
+ }: React.ComponentProps<"input">): React.JSX.Element {
6
10
  return (
7
11
  <input
8
12
  type={type}
@@ -8,7 +8,7 @@ import { cn } from "@/lib/utils";
8
8
  function Label({
9
9
  className,
10
10
  ...props
11
- }: React.ComponentProps<typeof LabelPrimitive.Root>) {
11
+ }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element {
12
12
  return (
13
13
  <LabelPrimitive.Root
14
14
  data-slot="label"
@@ -7,7 +7,11 @@ export interface ListProps {
7
7
  className?: string;
8
8
  }
9
9
 
10
- export function List({ items, ordered = false, className }: ListProps) {
10
+ export function List({
11
+ items,
12
+ ordered = false,
13
+ className,
14
+ }: ListProps): React.JSX.Element {
11
15
  const listClasses = cn(
12
16
  "space-y-1 pl-4 text-foreground",
13
17
  ordered ? "list-decimal" : "list-disc",
@@ -26,6 +26,7 @@ function formatValue(
26
26
  maximumFractionDigits: 1,
27
27
  }).format(value);
28
28
  case "number":
29
+ case undefined:
29
30
  default:
30
31
  return new Intl.NumberFormat("en-US").format(value);
31
32
  }
@@ -37,7 +38,7 @@ export function Metric({
37
38
  format,
38
39
  className,
39
40
  ...props
40
- }: MetricProps) {
41
+ }: MetricProps): React.JSX.Element {
41
42
  return (
42
43
  <div
43
44
  data-slot="metric"
@@ -8,7 +8,10 @@ import {
8
8
  import { cn } from "@/lib/utils";
9
9
  import { buttonVariants, Button } from "./button";
10
10
 
11
- function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
11
+ function Pagination({
12
+ className,
13
+ ...props
14
+ }: React.ComponentProps<"nav">): React.JSX.Element {
12
15
  return (
13
16
  <nav
14
17
  role="navigation"
@@ -23,7 +26,7 @@ function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
23
26
  function PaginationContent({
24
27
  className,
25
28
  ...props
26
- }: React.ComponentProps<"ul">) {
29
+ }: React.ComponentProps<"ul">): React.JSX.Element {
27
30
  return (
28
31
  <ul
29
32
  data-slot="pagination-content"
@@ -33,7 +36,9 @@ function PaginationContent({
33
36
  );
34
37
  }
35
38
 
36
- function PaginationItem({ ...props }: React.ComponentProps<"li">) {
39
+ function PaginationItem({
40
+ ...props
41
+ }: React.ComponentProps<"li">): React.JSX.Element {
37
42
  return <li data-slot="pagination-item" {...props} />;
38
43
  }
39
44
 
@@ -47,7 +52,7 @@ function PaginationLink({
47
52
  isActive,
48
53
  size = "icon",
49
54
  ...props
50
- }: PaginationLinkProps) {
55
+ }: PaginationLinkProps): React.JSX.Element {
51
56
  return (
52
57
  <a
53
58
  aria-current={isActive ? "page" : undefined}
@@ -68,7 +73,7 @@ function PaginationLink({
68
73
  function PaginationPrevious({
69
74
  className,
70
75
  ...props
71
- }: React.ComponentProps<typeof PaginationLink>) {
76
+ }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element {
72
77
  return (
73
78
  <PaginationLink
74
79
  aria-label="Go to previous page"
@@ -85,7 +90,7 @@ function PaginationPrevious({
85
90
  function PaginationNext({
86
91
  className,
87
92
  ...props
88
- }: React.ComponentProps<typeof PaginationLink>) {
93
+ }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element {
89
94
  return (
90
95
  <PaginationLink
91
96
  aria-label="Go to next page"
@@ -102,7 +107,7 @@ function PaginationNext({
102
107
  function PaginationEllipsis({
103
108
  className,
104
109
  ...props
105
- }: React.ComponentProps<"span">) {
110
+ }: React.ComponentProps<"span">): React.JSX.Element {
106
111
  return (
107
112
  <span
108
113
  aria-hidden