@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.
- package/dist/compat-shims-CO9JXXV4.cjs.map +1 -1
- package/dist/compat-shims-DxtUrORi.js.map +1 -1
- package/dist/compat-shims.d.ts +9 -8
- package/dist/components/Chat/index.d.ts +2 -1
- package/dist/components/ChatHistory.d.ts +1 -1
- package/dist/components/FrontendTools/index.d.ts +1 -1
- package/dist/components/Replay.d.ts +1 -1
- package/dist/components/Replay.stories.d.ts +2 -2
- package/dist/components/ShadowRoot.d.ts +1 -1
- package/dist/components/ShareButton/index.d.ts +1 -1
- package/dist/components/assistant-ui/thinking-indicator.d.ts +8 -0
- package/dist/components/ui/avatar.d.ts +3 -3
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/buttonVariants.d.ts +2 -2
- package/dist/components/ui/calendar.d.ts +2 -1
- package/dist/components/ui/collapsible.d.ts +3 -3
- package/dist/components/ui/dialog.d.ts +10 -10
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/time-range-picker.d.ts +2 -1
- package/dist/components/ui/tool-ui.d.ts +9 -7
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/contexts/ConnectionStatusContext.d.ts +1 -1
- package/dist/contexts/ElementsProvider.d.ts +1 -1
- package/dist/contexts/ToolApprovalContext.d.ts +2 -2
- package/dist/contexts/ToolExecutionContext.d.ts +1 -1
- package/dist/contexts/portal-container.d.ts +1 -1
- package/dist/elements.cjs +1 -1
- package/dist/elements.css +1 -1
- package/dist/elements.js +2 -2
- package/dist/hooks/useDensity.d.ts +1 -1
- package/dist/hooks/useElements.d.ts +2 -1
- package/dist/hooks/useGramThreadListAdapter.d.ts +13 -0
- package/dist/hooks/useRadius.d.ts +1 -1
- package/dist/hooks/useThemeProps.d.ts +1 -1
- package/dist/hooks/useToolApproval.d.ts +2 -1
- package/dist/index-7fTI_vaV.cjs +194 -0
- package/dist/index-7fTI_vaV.cjs.map +1 -0
- package/dist/{index-B5lZrrO2.js → index-Bv-yE4G1.js} +2919 -2806
- package/dist/index-Bv-yE4G1.js.map +1 -0
- package/dist/{index-BFU6NvbL.js → index-BziIHO9O.js} +9621 -9308
- package/dist/index-BziIHO9O.js.map +1 -0
- package/dist/{index-C08dvTEo.cjs → index-CGBkMd0d.cjs} +48 -48
- package/dist/index-CGBkMd0d.cjs.map +1 -0
- package/dist/lib/errorTracking.d.ts +1 -1
- package/dist/lib/tools.d.ts +11 -10
- package/dist/plugins/generative-ui/catalog.d.ts +3 -3
- package/dist/plugins/generative-ui/ui/accordion-wrapper.d.ts +2 -2
- package/dist/plugins/generative-ui/ui/accordion.d.ts +4 -4
- package/dist/plugins/generative-ui/ui/action-button.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/alert-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/alert.d.ts +3 -3
- package/dist/plugins/generative-ui/ui/avatar-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/avatar.d.ts +6 -6
- package/dist/plugins/generative-ui/ui/badge.d.ts +2 -2
- package/dist/plugins/generative-ui/ui/button-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/button.d.ts +3 -3
- package/dist/plugins/generative-ui/ui/card-wrapper.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/card.d.ts +7 -7
- package/dist/plugins/generative-ui/ui/checkbox-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/checkbox.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/data-table.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/dialog.d.ts +10 -10
- package/dist/plugins/generative-ui/ui/dropdown-menu.d.ts +15 -15
- package/dist/plugins/generative-ui/ui/grid.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/index.d.ts +57 -40
- package/dist/plugins/generative-ui/ui/input-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/input.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/label.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/list.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/metric.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/pagination.d.ts +7 -7
- package/dist/plugins/generative-ui/ui/popover.d.ts +7 -7
- package/dist/plugins/generative-ui/ui/progress.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/radio-group.d.ts +2 -2
- package/dist/plugins/generative-ui/ui/select-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/select.d.ts +10 -10
- package/dist/plugins/generative-ui/ui/separator.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/skeleton-wrapper.d.ts +2 -1
- package/dist/plugins/generative-ui/ui/skeleton.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/stack.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/switch.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/table.d.ts +8 -8
- package/dist/plugins/generative-ui/ui/tabs-wrapper.d.ts +2 -2
- package/dist/plugins/generative-ui/ui/tabs.d.ts +4 -4
- package/dist/plugins/generative-ui/ui/text.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/textarea.d.ts +1 -1
- package/dist/plugins/generative-ui/ui/tooltip.d.ts +4 -4
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.js +1 -1
- package/dist/{profiler-BRnyr1GA.cjs → profiler-DuJEf_S6.cjs} +2 -2
- package/dist/{profiler-BRnyr1GA.cjs.map → profiler-DuJEf_S6.cjs.map} +1 -1
- package/dist/{profiler-KLSTpp6I.js → profiler-xLXOPfmj.js} +2 -2
- package/dist/{profiler-KLSTpp6I.js.map → profiler-xLXOPfmj.js.map} +1 -1
- package/dist/react-shim.cjs.map +1 -1
- package/dist/react-shim.d.ts +1 -1
- package/dist/react-shim.js +1 -4
- package/dist/react-shim.js.map +1 -1
- package/dist/server/bun.cjs.map +1 -1
- package/dist/server/bun.js.map +1 -1
- package/dist/server/express.cjs.map +1 -1
- package/dist/server/express.js.map +1 -1
- package/dist/server/fastify.cjs.map +1 -1
- package/dist/server/fastify.js.map +1 -1
- package/dist/server/hono.cjs.map +1 -1
- package/dist/server/hono.js.map +1 -1
- package/dist/server/nextjs.cjs.map +1 -1
- package/dist/server/nextjs.js.map +1 -1
- package/dist/server/tanstack-start.cjs.map +1 -1
- package/dist/server/tanstack-start.js.map +1 -1
- package/dist/{startRecording-CKx-YWbq.cjs → startRecording-C2XF9-Ol.cjs} +2 -2
- package/dist/{startRecording-CKx-YWbq.cjs.map → startRecording-C2XF9-Ol.cjs.map} +1 -1
- package/dist/{startRecording-BfxB1xxR.js → startRecording-qKnXr4lw.js} +2 -2
- package/dist/{startRecording-BfxB1xxR.js.map → startRecording-qKnXr4lw.js.map} +1 -1
- package/dist/types/index.d.ts +29 -3
- package/package.json +8 -11
- package/src/compat-shims.ts +16 -2
- package/src/components/Chat/index.tsx +4 -1
- package/src/components/Chat/stories/FrontendTools.stories.tsx +1 -1
- package/src/components/Chat/stories/ToolApproval.stories.tsx +2 -2
- package/src/components/Chat/stories/Tools.stories.tsx +13 -5
- package/src/components/ChatHistory.tsx +3 -1
- package/src/components/FrontendTools/index.tsx +1 -1
- package/src/components/MessageContent.tsx +1 -0
- package/src/components/Replay.stories.tsx +2 -3
- package/src/components/Replay.tsx +17 -10
- package/src/components/ShadowRoot.tsx +2 -2
- package/src/components/ShareButton/index.tsx +4 -2
- package/src/components/assistant-ui/assistant-modal.tsx +5 -3
- package/src/components/assistant-ui/attachment.tsx +1 -1
- package/src/components/assistant-ui/error-boundary.tsx +1 -1
- package/src/components/assistant-ui/markdown-text.tsx +1 -1
- package/src/components/assistant-ui/thinking-indicator.tsx +175 -0
- package/src/components/assistant-ui/thread.tsx +251 -27
- package/src/components/assistant-ui/tool-fallback.tsx +8 -8
- package/src/components/assistant-ui/tool-group.tsx +4 -13
- package/src/components/assistant-ui/tool-mention-autocomplete.tsx +1 -1
- package/src/components/ui/avatar.tsx +3 -3
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/collapsible.tsx +7 -3
- package/src/components/ui/dialog.tsx +18 -10
- package/src/components/ui/generative-ui.tsx +9 -4
- package/src/components/ui/popover.tsx +4 -4
- package/src/components/ui/skeleton.tsx +4 -1
- package/src/components/ui/time-range-picker.stories.tsx +164 -154
- package/src/components/ui/time-range-picker.tsx +11 -5
- package/src/components/ui/tool-ui.tsx +68 -40
- package/src/components/ui/tooltip.tsx +4 -4
- package/src/contexts/ChatIdContext.tsx +1 -1
- package/src/contexts/ConnectionStatusContext.tsx +6 -5
- package/src/contexts/ElementsProvider.tsx +64 -41
- package/src/contexts/ReplayContext.ts +1 -1
- package/src/contexts/ToolApprovalContext.tsx +5 -1
- package/src/contexts/ToolExecutionContext.tsx +1 -1
- package/src/contexts/portal-container.tsx +1 -1
- package/src/global.css +55 -16
- package/src/hooks/useAuth.ts +2 -1
- package/src/hooks/useDensity.ts +1 -1
- package/src/hooks/useElements.ts +2 -1
- package/src/hooks/useFollowOnSuggestions.ts +3 -6
- package/src/hooks/useGramThreadListAdapter.tsx +50 -3
- package/src/hooks/useMCPTools.ts +2 -2
- package/src/hooks/useModel.ts +1 -3
- package/src/hooks/usePluginComponents.ts +3 -1
- package/src/hooks/useRadius.ts +1 -1
- package/src/hooks/useSession.ts +3 -1
- package/src/hooks/useThemeProps.ts +5 -5
- package/src/hooks/useToolApproval.ts +2 -1
- package/src/lib/cassette.ts +20 -8
- package/src/lib/errorTracking.ts +1 -4
- package/src/lib/messageConverter.test.ts +11 -13
- package/src/lib/messageConverter.ts +13 -4
- package/src/lib/token.ts +2 -5
- package/src/lib/tool-mentions.ts +5 -2
- package/src/lib/tools.byte-cap.test.ts +1 -1
- package/src/lib/tools.test.ts +1 -1
- package/src/lib/tools.ts +15 -5
- package/src/lib/utils.ts +2 -2
- package/src/lib.d.ts +8 -1
- package/src/plugins/chart/chart.test.ts +3 -4
- package/src/plugins/chart/component.tsx +7 -6
- package/src/plugins/chart/ui/area-chart.tsx +1 -1
- package/src/plugins/chart/ui/line-chart.tsx +1 -1
- package/src/plugins/generative-ui/ui/accordion-wrapper.tsx +2 -2
- package/src/plugins/generative-ui/ui/accordion.tsx +4 -4
- package/src/plugins/generative-ui/ui/action-button.tsx +4 -2
- package/src/plugins/generative-ui/ui/alert-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/alert.tsx +7 -3
- package/src/plugins/generative-ui/ui/avatar-wrapper.tsx +5 -1
- package/src/plugins/generative-ui/ui/avatar.tsx +12 -6
- package/src/plugins/generative-ui/ui/badge.tsx +1 -1
- package/src/plugins/generative-ui/ui/button-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/button.tsx +1 -1
- package/src/plugins/generative-ui/ui/card-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/card.tsx +28 -7
- package/src/plugins/generative-ui/ui/checkbox-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/checkbox.tsx +1 -1
- package/src/plugins/generative-ui/ui/data-table.tsx +1 -1
- package/src/plugins/generative-ui/ui/dialog.tsx +15 -10
- package/src/plugins/generative-ui/ui/dropdown-menu.tsx +33 -15
- package/src/plugins/generative-ui/ui/grid.tsx +1 -1
- package/src/plugins/generative-ui/ui/index.ts +154 -40
- package/src/plugins/generative-ui/ui/input-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/input.tsx +5 -1
- package/src/plugins/generative-ui/ui/label.tsx +1 -1
- package/src/plugins/generative-ui/ui/list.tsx +5 -1
- package/src/plugins/generative-ui/ui/metric.tsx +2 -1
- package/src/plugins/generative-ui/ui/pagination.tsx +12 -7
- package/src/plugins/generative-ui/ui/popover.tsx +13 -7
- package/src/plugins/generative-ui/ui/progress.tsx +1 -1
- package/src/plugins/generative-ui/ui/radio-group.tsx +2 -2
- package/src/plugins/generative-ui/ui/select-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/select.tsx +14 -10
- package/src/plugins/generative-ui/ui/separator.tsx +1 -1
- package/src/plugins/generative-ui/ui/skeleton-wrapper.tsx +1 -1
- package/src/plugins/generative-ui/ui/skeleton.tsx +4 -1
- package/src/plugins/generative-ui/ui/stack.tsx +1 -1
- package/src/plugins/generative-ui/ui/switch.tsx +1 -1
- package/src/plugins/generative-ui/ui/table.tsx +29 -8
- package/src/plugins/generative-ui/ui/tabs-wrapper.tsx +5 -2
- package/src/plugins/generative-ui/ui/tabs.tsx +4 -4
- package/src/plugins/generative-ui/ui/text.tsx +1 -1
- package/src/plugins/generative-ui/ui/textarea.tsx +4 -1
- package/src/plugins/generative-ui/ui/tooltip.tsx +4 -4
- package/src/react-shim.ts +9 -4
- package/src/server/bun.ts +1 -1
- package/src/server/express.ts +1 -1
- package/src/server/fastify.ts +1 -1
- package/src/server/hono.ts +1 -1
- package/src/server/nextjs.ts +1 -1
- package/src/server/tanstack-start.ts +1 -1
- package/src/storybook.d.ts +5 -0
- package/src/types/index.ts +39 -3
- package/dist/index-B5lZrrO2.js.map +0 -1
- package/dist/index-BFU6NvbL.js.map +0 -1
- package/dist/index-C08dvTEo.cjs.map +0 -1
- package/dist/index-DzZ1-jQY.cjs +0 -194
- 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({
|
|
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({
|
|
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({
|
|
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({
|
|
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({
|
|
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({
|
|
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({
|
|
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"
|
|
@@ -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"
|
|
@@ -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({
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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"
|
|
@@ -1,43 +1,157 @@
|
|
|
1
1
|
// Vercel shadcn primitives
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
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";
|
|
@@ -2,7 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "@/lib/utils";
|
|
4
4
|
|
|
5
|
-
function 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({
|
|
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({
|
|
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({
|
|
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
|