@vllnt/ui 0.1.3 → 0.1.6
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/components/accordion/accordion.js +172 -0
- package/dist/components/accordion/index.js +12 -0
- package/dist/components/alert/alert.js +53 -0
- package/dist/components/alert/index.js +7 -0
- package/dist/components/alert-dialog/alert-dialog.js +117 -0
- package/dist/components/alert-dialog/index.js +26 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +6 -0
- package/dist/components/aspect-ratio/index.js +4 -0
- package/dist/components/avatar/avatar.js +43 -0
- package/dist/components/avatar/index.js +6 -0
- package/dist/components/badge/badge.js +26 -0
- package/dist/components/badge/index.js +5 -0
- package/dist/components/blog-card/blog-card.js +50 -0
- package/dist/components/blog-card/index.js +5 -0
- package/dist/components/breadcrumb/breadcrumb.js +65 -0
- package/dist/components/breadcrumb/index.js +4 -0
- package/dist/components/button/button.js +48 -0
- package/dist/components/button/index.js +5 -0
- package/dist/components/calendar/calendar.js +71 -0
- package/dist/components/calendar/index.js +4 -0
- package/dist/components/callout/callout.js +59 -0
- package/dist/components/callout/index.js +4 -0
- package/dist/components/card/card.js +64 -0
- package/dist/components/card/index.js +16 -0
- package/dist/components/carousel/carousel.js +235 -0
- package/dist/components/carousel/index.js +14 -0
- package/dist/components/category-filter/category-filter.js +34 -0
- package/dist/components/category-filter/index.js +4 -0
- package/dist/components/chart/area-chart.js +99 -0
- package/dist/components/chart/bar-chart.js +80 -0
- package/dist/components/chart/index.js +3 -0
- package/dist/components/chart/line-chart.js +97 -0
- package/dist/components/checkbox/checkbox.js +28 -0
- package/dist/components/checkbox/index.js +4 -0
- package/dist/components/checklist/checklist.js +181 -0
- package/dist/components/checklist/index.js +6 -0
- package/dist/components/code-block/code-block.js +123 -0
- package/dist/components/code-block/index.js +4 -0
- package/dist/components/code-playground/code-playground.js +86 -0
- package/dist/components/code-playground/index.js +8 -0
- package/dist/components/collapsible/collapsible.js +10 -0
- package/dist/components/collapsible/index.js +10 -0
- package/dist/components/command/command.js +123 -0
- package/dist/components/command/index.js +22 -0
- package/dist/components/comparison/comparison.js +109 -0
- package/dist/components/comparison/index.js +8 -0
- package/dist/components/completion-dialog/completion-dialog.js +173 -0
- package/dist/components/completion-dialog/index.js +6 -0
- package/dist/components/content-intro/content-intro.js +144 -0
- package/dist/components/content-intro/index.js +6 -0
- package/dist/components/context-menu/context-menu.js +154 -0
- package/dist/components/context-menu/index.js +34 -0
- package/dist/components/cookie-consent/cookie-consent.js +171 -0
- package/dist/components/cookie-consent/index.js +8 -0
- package/dist/components/dialog/dialog.js +105 -0
- package/dist/components/dialog/index.js +24 -0
- package/dist/components/drawer/drawer.js +102 -0
- package/dist/components/drawer/index.js +24 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +151 -0
- package/dist/components/dropdown-menu/index.js +34 -0
- package/dist/components/exercise/exercise.js +112 -0
- package/dist/components/exercise/index.js +4 -0
- package/dist/components/faq/faq.js +56 -0
- package/dist/components/faq/index.js +5 -0
- package/dist/components/filter-bar/filter-bar.js +244 -0
- package/dist/components/filter-bar/index.js +6 -0
- package/dist/components/floating-action-button/floating-action-button.js +35 -0
- package/dist/components/floating-action-button/index.js +6 -0
- package/dist/components/flow-diagram/flow-canvas.js +109 -0
- package/dist/components/flow-diagram/flow-controls.js +140 -0
- package/dist/components/flow-diagram/flow-diagram.js +114 -0
- package/dist/components/flow-diagram/flow-error-boundary.js +63 -0
- package/dist/components/flow-diagram/flow-fullscreen.js +58 -0
- package/dist/components/flow-diagram/index.js +12 -0
- package/dist/components/flow-diagram/types.js +0 -0
- package/dist/components/flow-diagram/use-flow-diagram.js +141 -0
- package/dist/components/hover-card/hover-card.js +26 -0
- package/dist/components/hover-card/index.js +6 -0
- package/dist/components/index.js +633 -0
- package/dist/components/inline-input/index.js +4 -0
- package/dist/components/inline-input/inline-input.js +42 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/input/input.js +23 -0
- package/dist/components/input-otp/index.js +12 -0
- package/dist/components/input-otp/input-otp.js +54 -0
- package/dist/components/key-concept/index.js +8 -0
- package/dist/components/key-concept/key-concept.js +79 -0
- package/dist/components/keyboard-shortcuts-help/index.js +6 -0
- package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +121 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/label.js +21 -0
- package/dist/components/lang-provider/index.js +4 -0
- package/dist/components/lang-provider/lang-provider.js +18 -0
- package/dist/components/learning-objectives/index.js +10 -0
- package/dist/components/learning-objectives/learning-objectives.js +76 -0
- package/dist/components/mdx-content/index.js +4 -0
- package/dist/components/mdx-content/mdx-content.js +140 -0
- package/dist/components/menubar/index.js +36 -0
- package/dist/components/menubar/menubar.js +183 -0
- package/dist/components/model-selector/index.js +6 -0
- package/dist/components/model-selector/model-selector.js +374 -0
- package/dist/components/navbar-saas/index.js +6 -0
- package/dist/components/navbar-saas/navbar-saas.js +68 -0
- package/dist/components/navbar-saas/use-mobile.js +19 -0
- package/dist/components/navigation-menu/index.js +22 -0
- package/dist/components/navigation-menu/navigation-menu.js +108 -0
- package/dist/components/pagination/index.js +4 -0
- package/dist/components/pagination/pagination.js +44 -0
- package/dist/components/popover/index.js +12 -0
- package/dist/components/popover/popover.js +28 -0
- package/dist/components/pro-tip/index.js +8 -0
- package/dist/components/pro-tip/pro-tip.js +139 -0
- package/dist/components/profile-section/index.js +4 -0
- package/dist/components/profile-section/profile-section.js +45 -0
- package/dist/components/progress-bar/index.js +4 -0
- package/dist/components/progress-bar/progress-bar.js +56 -0
- package/dist/components/progress-card/index.js +6 -0
- package/dist/components/progress-card/progress-card.js +68 -0
- package/dist/components/quiz/index.js +4 -0
- package/dist/components/quiz/quiz.js +210 -0
- package/dist/components/radio-group/index.js +5 -0
- package/dist/components/radio-group/radio-group.js +36 -0
- package/dist/components/resizable/index.js +10 -0
- package/dist/components/resizable/resizable.js +39 -0
- package/dist/components/scroll-area/index.js +5 -0
- package/dist/components/scroll-area/scroll-area.js +39 -0
- package/dist/components/search-bar/index.js +4 -0
- package/dist/components/search-bar/search-bar.js +120 -0
- package/dist/components/search-dialog/index.js +4 -0
- package/dist/components/search-dialog/search-dialog.js +102 -0
- package/dist/components/select/index.js +24 -0
- package/dist/components/select/select.js +125 -0
- package/dist/components/separator/index.js +4 -0
- package/dist/components/separator/separator.js +25 -0
- package/dist/components/share-dialog/index.js +6 -0
- package/dist/components/share-dialog/share-dialog.js +121 -0
- package/dist/components/share-section/index.js +6 -0
- package/dist/components/share-section/share-section.js +57 -0
- package/dist/components/sheet/index.js +24 -0
- package/dist/components/sheet/sheet.js +116 -0
- package/dist/components/sidebar/index.js +4 -0
- package/dist/components/sidebar/sidebar.js +188 -0
- package/dist/components/sidebar-provider/index.js +5 -0
- package/dist/components/sidebar-provider/sidebar-provider.js +25 -0
- package/dist/components/sidebar-toggle/index.js +4 -0
- package/dist/components/sidebar-toggle/sidebar-toggle.js +36 -0
- package/dist/components/skeleton/index.js +4 -0
- package/dist/components/skeleton/skeleton.js +17 -0
- package/dist/components/slider/index.js +4 -0
- package/dist/components/slider/slider.js +24 -0
- package/dist/components/slideshow/index.js +6 -0
- package/dist/components/slideshow/slideshow.js +442 -0
- package/dist/components/social-fab/index.js +6 -0
- package/dist/components/social-fab/social-fab.js +211 -0
- package/dist/components/social-fab/use-social-fab.js +111 -0
- package/dist/components/spinner/index.js +4 -0
- package/dist/components/spinner/spinner.js +23 -0
- package/dist/components/step-by-step/index.js +8 -0
- package/dist/components/step-by-step/step-by-step.js +194 -0
- package/dist/components/step-navigation/index.js +4 -0
- package/dist/components/step-navigation/step-navigation.js +119 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/switch.js +28 -0
- package/dist/components/table/index.js +20 -0
- package/dist/components/table/table.js +87 -0
- package/dist/components/table-of-contents/index.js +4 -0
- package/dist/components/table-of-contents/table-of-contents.js +71 -0
- package/dist/components/table-of-contents-panel/index.js +6 -0
- package/dist/components/table-of-contents-panel/table-of-contents-panel.js +202 -0
- package/dist/components/tabs/index.js +12 -0
- package/dist/components/tabs/tabs.js +84 -0
- package/dist/components/terminal/index.js +8 -0
- package/dist/components/terminal/terminal.js +119 -0
- package/dist/components/textarea/index.js +4 -0
- package/dist/components/textarea/textarea.js +22 -0
- package/dist/components/theme-provider/index.js +4 -0
- package/dist/components/theme-provider/theme-provider.js +11 -0
- package/dist/components/theme-toggle/index.js +4 -0
- package/dist/components/theme-toggle/theme-toggle.js +172 -0
- package/dist/components/thinking-block/index.js +4 -0
- package/dist/components/thinking-block/thinking-block.js +52 -0
- package/dist/components/tldr-section/index.js +4 -0
- package/dist/components/tldr-section/tldr-section.js +92 -0
- package/dist/components/toast/index.js +18 -0
- package/dist/components/toast/toast.js +84 -0
- package/dist/components/toast/toaster.js +38 -0
- package/dist/components/toggle/index.js +5 -0
- package/dist/components/toggle/toggle.js +39 -0
- package/dist/components/toggle-group/index.js +5 -0
- package/dist/components/toggle-group/toggle-group.js +46 -0
- package/dist/components/tooltip/index.js +12 -0
- package/dist/components/tooltip/tooltip.js +27 -0
- package/dist/components/truncated-text/index.js +4 -0
- package/dist/components/truncated-text/truncated-text.js +25 -0
- package/dist/components/tutorial-card/index.js +6 -0
- package/dist/components/tutorial-card/tutorial-card.js +75 -0
- package/dist/components/tutorial-complete/index.js +6 -0
- package/dist/components/tutorial-complete/tutorial-complete.js +134 -0
- package/dist/components/tutorial-filters/index.js +6 -0
- package/dist/components/tutorial-filters/tutorial-filters.js +205 -0
- package/dist/components/tutorial-intro-content/index.js +6 -0
- package/dist/components/tutorial-intro-content/tutorial-intro-content.js +141 -0
- package/dist/components/tutorial-mdx/index.js +8 -0
- package/dist/components/tutorial-mdx/tutorial-mdx.js +219 -0
- package/dist/components/video-embed/index.js +4 -0
- package/dist/components/video-embed/video-embed.js +77 -0
- package/dist/index.js +12 -8557
- package/dist/lib/types.js +11 -0
- package/dist/lib/use-debounce.js +17 -0
- package/dist/lib/utils.js +8 -0
- package/dist/tailwind-preset.d.ts +5 -0
- package/dist/tailwind-preset.js +9 -10
- package/dist/types/content.js +0 -0
- package/dist/types/index.js +0 -0
- package/package.json +1 -1
- package/dist/chunk-XRV5RSYH.js +0 -569
- package/dist/flow-diagram-N3EHM6VB.js +0 -2
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
5
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
|
+
const ContextMenu = ContextMenuPrimitive.Root;
|
|
8
|
+
const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
9
|
+
const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
10
|
+
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
11
|
+
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
12
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
13
|
+
const ContextMenuSubTrigger = forwardRef(({ children, className, inset, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
14
|
+
ContextMenuPrimitive.SubTrigger,
|
|
15
|
+
{
|
|
16
|
+
className: cn(
|
|
17
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
18
|
+
inset && "pl-8",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
ref,
|
|
22
|
+
...props,
|
|
23
|
+
children: [
|
|
24
|
+
children,
|
|
25
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
30
|
+
const ContextMenuSubContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
31
|
+
ContextMenuPrimitive.SubContent,
|
|
32
|
+
{
|
|
33
|
+
className: cn(
|
|
34
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
35
|
+
className
|
|
36
|
+
),
|
|
37
|
+
ref,
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
));
|
|
41
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
42
|
+
const ContextMenuContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
43
|
+
ContextMenuPrimitive.Content,
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
ref,
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
) }));
|
|
53
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
54
|
+
const ContextMenuItem = forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55
|
+
ContextMenuPrimitive.Item,
|
|
56
|
+
{
|
|
57
|
+
className: cn(
|
|
58
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
59
|
+
inset && "pl-8",
|
|
60
|
+
className
|
|
61
|
+
),
|
|
62
|
+
ref,
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
));
|
|
66
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
67
|
+
const ContextMenuCheckboxItem = forwardRef(({ checked, children, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
68
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
69
|
+
{
|
|
70
|
+
checked,
|
|
71
|
+
className: cn(
|
|
72
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
ref,
|
|
76
|
+
...props,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
79
|
+
children
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
));
|
|
83
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
84
|
+
const ContextMenuRadioItem = forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
85
|
+
ContextMenuPrimitive.RadioItem,
|
|
86
|
+
{
|
|
87
|
+
className: cn(
|
|
88
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
89
|
+
className
|
|
90
|
+
),
|
|
91
|
+
ref,
|
|
92
|
+
...props,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
95
|
+
children
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
));
|
|
99
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
100
|
+
const ContextMenuLabel = forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
101
|
+
ContextMenuPrimitive.Label,
|
|
102
|
+
{
|
|
103
|
+
className: cn(
|
|
104
|
+
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
105
|
+
inset && "pl-8",
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
ref,
|
|
109
|
+
...props
|
|
110
|
+
}
|
|
111
|
+
));
|
|
112
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
113
|
+
const ContextMenuSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
114
|
+
ContextMenuPrimitive.Separator,
|
|
115
|
+
{
|
|
116
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
117
|
+
ref,
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
));
|
|
121
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
122
|
+
const ContextMenuShortcut = ({
|
|
123
|
+
className,
|
|
124
|
+
...props
|
|
125
|
+
}) => {
|
|
126
|
+
return /* @__PURE__ */ jsx(
|
|
127
|
+
"span",
|
|
128
|
+
{
|
|
129
|
+
className: cn(
|
|
130
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
131
|
+
className
|
|
132
|
+
),
|
|
133
|
+
...props
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
138
|
+
export {
|
|
139
|
+
ContextMenu,
|
|
140
|
+
ContextMenuCheckboxItem,
|
|
141
|
+
ContextMenuContent,
|
|
142
|
+
ContextMenuGroup,
|
|
143
|
+
ContextMenuItem,
|
|
144
|
+
ContextMenuLabel,
|
|
145
|
+
ContextMenuPortal,
|
|
146
|
+
ContextMenuRadioGroup,
|
|
147
|
+
ContextMenuRadioItem,
|
|
148
|
+
ContextMenuSeparator,
|
|
149
|
+
ContextMenuShortcut,
|
|
150
|
+
ContextMenuSub,
|
|
151
|
+
ContextMenuSubContent,
|
|
152
|
+
ContextMenuSubTrigger,
|
|
153
|
+
ContextMenuTrigger
|
|
154
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContextMenu,
|
|
3
|
+
ContextMenuCheckboxItem,
|
|
4
|
+
ContextMenuContent,
|
|
5
|
+
ContextMenuGroup,
|
|
6
|
+
ContextMenuItem,
|
|
7
|
+
ContextMenuLabel,
|
|
8
|
+
ContextMenuPortal,
|
|
9
|
+
ContextMenuRadioGroup,
|
|
10
|
+
ContextMenuRadioItem,
|
|
11
|
+
ContextMenuSeparator,
|
|
12
|
+
ContextMenuShortcut,
|
|
13
|
+
ContextMenuSub,
|
|
14
|
+
ContextMenuSubContent,
|
|
15
|
+
ContextMenuSubTrigger,
|
|
16
|
+
ContextMenuTrigger
|
|
17
|
+
} from "./context-menu";
|
|
18
|
+
export {
|
|
19
|
+
ContextMenu,
|
|
20
|
+
ContextMenuCheckboxItem,
|
|
21
|
+
ContextMenuContent,
|
|
22
|
+
ContextMenuGroup,
|
|
23
|
+
ContextMenuItem,
|
|
24
|
+
ContextMenuLabel,
|
|
25
|
+
ContextMenuPortal,
|
|
26
|
+
ContextMenuRadioGroup,
|
|
27
|
+
ContextMenuRadioItem,
|
|
28
|
+
ContextMenuSeparator,
|
|
29
|
+
ContextMenuShortcut,
|
|
30
|
+
ContextMenuSub,
|
|
31
|
+
ContextMenuSubContent,
|
|
32
|
+
ContextMenuSubTrigger,
|
|
33
|
+
ContextMenuTrigger
|
|
34
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { X } from "lucide-react";
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
|
+
import { Button } from "../button/button";
|
|
8
|
+
const cookieConsentVariants = cva(
|
|
9
|
+
// Base: safe-area-inset for notched devices
|
|
10
|
+
// Desktop: compact single-line layout, height matches button
|
|
11
|
+
"fixed z-50 rounded-lg border bg-background shadow-lg transition-all duration-300 max-w-[calc(100vw-2rem)] p-4 sm:py-1.5 sm:px-3",
|
|
12
|
+
{
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
position: "bottom-left"
|
|
15
|
+
},
|
|
16
|
+
variants: {
|
|
17
|
+
position: {
|
|
18
|
+
// Mobile: 16px (1rem) from edges, respects safe area
|
|
19
|
+
// Desktop: 16px from edges
|
|
20
|
+
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2 mb-safe",
|
|
21
|
+
"bottom-left": "bottom-4 left-4 right-4 sm:right-auto mb-safe ml-safe",
|
|
22
|
+
"bottom-right": "bottom-4 right-4 left-4 sm:left-auto mb-safe mr-safe"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const CookieConsent = forwardRef(
|
|
28
|
+
({
|
|
29
|
+
acceptText = "Accept",
|
|
30
|
+
className,
|
|
31
|
+
declineText,
|
|
32
|
+
message = "This site uses cookies to improve your experience.",
|
|
33
|
+
onAccept,
|
|
34
|
+
onDecline,
|
|
35
|
+
onOpenChange,
|
|
36
|
+
open = true,
|
|
37
|
+
position,
|
|
38
|
+
settingsHref,
|
|
39
|
+
settingsText = "Learn more",
|
|
40
|
+
showCloseButton = false,
|
|
41
|
+
...props
|
|
42
|
+
}, reference) => {
|
|
43
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
44
|
+
const [isAnimatingOut, setIsAnimatingOut] = useState(false);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (open) {
|
|
47
|
+
const timer = setTimeout(() => {
|
|
48
|
+
setIsVisible(true);
|
|
49
|
+
}, 50);
|
|
50
|
+
return () => {
|
|
51
|
+
clearTimeout(timer);
|
|
52
|
+
};
|
|
53
|
+
} else {
|
|
54
|
+
setIsVisible(false);
|
|
55
|
+
}
|
|
56
|
+
}, [open]);
|
|
57
|
+
const handleClose = useCallback(() => {
|
|
58
|
+
setIsAnimatingOut(true);
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
setIsAnimatingOut(false);
|
|
61
|
+
onOpenChange?.(false);
|
|
62
|
+
}, 200);
|
|
63
|
+
}, [onOpenChange]);
|
|
64
|
+
const handleAccept = useCallback(() => {
|
|
65
|
+
onAccept?.();
|
|
66
|
+
handleClose();
|
|
67
|
+
}, [onAccept, handleClose]);
|
|
68
|
+
const handleDecline = useCallback(() => {
|
|
69
|
+
onDecline?.();
|
|
70
|
+
handleClose();
|
|
71
|
+
}, [onDecline, handleClose]);
|
|
72
|
+
if (!open && !isAnimatingOut) return null;
|
|
73
|
+
return /* @__PURE__ */ jsxs(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
"aria-label": "Cookie consent",
|
|
77
|
+
"aria-live": "polite",
|
|
78
|
+
className: cn(
|
|
79
|
+
cookieConsentVariants({ position }),
|
|
80
|
+
// Animation states
|
|
81
|
+
isVisible && !isAnimatingOut ? "translate-y-0 opacity-100" : "translate-y-4 opacity-0",
|
|
82
|
+
className
|
|
83
|
+
),
|
|
84
|
+
ref: reference,
|
|
85
|
+
role: "dialog",
|
|
86
|
+
...props,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:hidden", children: [
|
|
89
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: message }),
|
|
90
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
91
|
+
settingsHref ? /* @__PURE__ */ jsx(
|
|
92
|
+
"a",
|
|
93
|
+
{
|
|
94
|
+
className: "text-sm text-muted-foreground underline underline-offset-4 hover:text-foreground",
|
|
95
|
+
href: settingsHref,
|
|
96
|
+
children: settingsText
|
|
97
|
+
}
|
|
98
|
+
) : null,
|
|
99
|
+
declineText ? /* @__PURE__ */ jsx(
|
|
100
|
+
Button,
|
|
101
|
+
{
|
|
102
|
+
onClick: handleDecline,
|
|
103
|
+
size: "sm",
|
|
104
|
+
type: "button",
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
children: declineText
|
|
107
|
+
}
|
|
108
|
+
) : null,
|
|
109
|
+
/* @__PURE__ */ jsx(
|
|
110
|
+
Button,
|
|
111
|
+
{
|
|
112
|
+
onClick: handleAccept,
|
|
113
|
+
size: "sm",
|
|
114
|
+
type: "button",
|
|
115
|
+
variant: "default",
|
|
116
|
+
children: acceptText
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ jsxs("div", { className: "hidden sm:flex sm:items-center sm:gap-3", children: [
|
|
122
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: message }),
|
|
123
|
+
settingsHref ? /* @__PURE__ */ jsx(
|
|
124
|
+
"a",
|
|
125
|
+
{
|
|
126
|
+
className: "text-sm text-muted-foreground underline underline-offset-4 hover:text-foreground whitespace-nowrap",
|
|
127
|
+
href: settingsHref,
|
|
128
|
+
children: settingsText
|
|
129
|
+
}
|
|
130
|
+
) : null,
|
|
131
|
+
declineText ? /* @__PURE__ */ jsx(
|
|
132
|
+
Button,
|
|
133
|
+
{
|
|
134
|
+
className: "h-7 px-3 text-xs",
|
|
135
|
+
onClick: handleDecline,
|
|
136
|
+
type: "button",
|
|
137
|
+
variant: "ghost",
|
|
138
|
+
children: declineText
|
|
139
|
+
}
|
|
140
|
+
) : null,
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
Button,
|
|
143
|
+
{
|
|
144
|
+
className: "h-7 px-3 text-xs",
|
|
145
|
+
onClick: handleAccept,
|
|
146
|
+
type: "button",
|
|
147
|
+
variant: "default",
|
|
148
|
+
children: acceptText
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }),
|
|
152
|
+
showCloseButton ? /* @__PURE__ */ jsx(
|
|
153
|
+
"button",
|
|
154
|
+
{
|
|
155
|
+
"aria-label": "Close cookie consent",
|
|
156
|
+
className: "absolute -right-2 -top-2 rounded-full border bg-background p-1 text-muted-foreground hover:text-foreground",
|
|
157
|
+
onClick: handleClose,
|
|
158
|
+
type: "button",
|
|
159
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
160
|
+
}
|
|
161
|
+
) : null
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
CookieConsent.displayName = "CookieConsent";
|
|
168
|
+
export {
|
|
169
|
+
CookieConsent,
|
|
170
|
+
cookieConsentVariants
|
|
171
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
+
import { X } from "lucide-react";
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
|
+
const Dialog = DialogPrimitive.Root;
|
|
8
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
9
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
10
|
+
const DialogClose = DialogPrimitive.Close;
|
|
11
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsx(
|
|
12
|
+
DialogPrimitive.Overlay,
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
ref: reference,
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
23
|
+
const DialogContent = React.forwardRef(({ children, className, ...props }, reference) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
25
|
+
/* @__PURE__ */ jsxs(
|
|
26
|
+
DialogPrimitive.Content,
|
|
27
|
+
{
|
|
28
|
+
className: cn(
|
|
29
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
ref: reference,
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
children,
|
|
36
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
38
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
39
|
+
] })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }));
|
|
44
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
45
|
+
const DialogHeader = ({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}) => /* @__PURE__ */ jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: cn(
|
|
52
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
...props
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
DialogHeader.displayName = "DialogHeader";
|
|
59
|
+
const DialogFooter = ({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}) => /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: cn(
|
|
66
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
DialogFooter.displayName = "DialogFooter";
|
|
73
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsx(
|
|
74
|
+
DialogPrimitive.Title,
|
|
75
|
+
{
|
|
76
|
+
className: cn(
|
|
77
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
ref: reference,
|
|
81
|
+
...props
|
|
82
|
+
}
|
|
83
|
+
));
|
|
84
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
85
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsx(
|
|
86
|
+
DialogPrimitive.Description,
|
|
87
|
+
{
|
|
88
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
89
|
+
ref: reference,
|
|
90
|
+
...props
|
|
91
|
+
}
|
|
92
|
+
));
|
|
93
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
94
|
+
export {
|
|
95
|
+
Dialog,
|
|
96
|
+
DialogClose,
|
|
97
|
+
DialogContent,
|
|
98
|
+
DialogDescription,
|
|
99
|
+
DialogFooter,
|
|
100
|
+
DialogHeader,
|
|
101
|
+
DialogOverlay,
|
|
102
|
+
DialogPortal,
|
|
103
|
+
DialogTitle,
|
|
104
|
+
DialogTrigger
|
|
105
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Dialog,
|
|
3
|
+
DialogClose,
|
|
4
|
+
DialogContent,
|
|
5
|
+
DialogDescription,
|
|
6
|
+
DialogFooter,
|
|
7
|
+
DialogHeader,
|
|
8
|
+
DialogOverlay,
|
|
9
|
+
DialogPortal,
|
|
10
|
+
DialogTitle,
|
|
11
|
+
DialogTrigger
|
|
12
|
+
} from "./dialog";
|
|
13
|
+
export {
|
|
14
|
+
Dialog,
|
|
15
|
+
DialogClose,
|
|
16
|
+
DialogContent,
|
|
17
|
+
DialogDescription,
|
|
18
|
+
DialogFooter,
|
|
19
|
+
DialogHeader,
|
|
20
|
+
DialogOverlay,
|
|
21
|
+
DialogPortal,
|
|
22
|
+
DialogTitle,
|
|
23
|
+
DialogTrigger
|
|
24
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
const Drawer = ({
|
|
7
|
+
shouldScaleBackground = true,
|
|
8
|
+
...props
|
|
9
|
+
}) => /* @__PURE__ */ jsx(
|
|
10
|
+
DrawerPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
shouldScaleBackground,
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
Drawer.displayName = "Drawer";
|
|
17
|
+
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
18
|
+
const DrawerPortal = DrawerPrimitive.Portal;
|
|
19
|
+
const DrawerClose = DrawerPrimitive.Close;
|
|
20
|
+
const DrawerOverlay = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
21
|
+
DrawerPrimitive.Overlay,
|
|
22
|
+
{
|
|
23
|
+
className: cn("fixed inset-0 z-50 bg-black/80", className),
|
|
24
|
+
ref,
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
29
|
+
const DrawerContent = forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
31
|
+
/* @__PURE__ */ jsxs(
|
|
32
|
+
DrawerPrimitive.Content,
|
|
33
|
+
{
|
|
34
|
+
className: cn(
|
|
35
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
ref,
|
|
39
|
+
...props,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
42
|
+
children
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }));
|
|
47
|
+
DrawerContent.displayName = "DrawerContent";
|
|
48
|
+
const DrawerHeader = ({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}) => /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
55
|
+
...props
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
59
|
+
const DrawerFooter = ({
|
|
60
|
+
className,
|
|
61
|
+
...props
|
|
62
|
+
}) => /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
66
|
+
...props
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
70
|
+
const DrawerTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71
|
+
DrawerPrimitive.Title,
|
|
72
|
+
{
|
|
73
|
+
className: cn(
|
|
74
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
ref,
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
));
|
|
81
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
82
|
+
const DrawerDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
83
|
+
DrawerPrimitive.Description,
|
|
84
|
+
{
|
|
85
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
86
|
+
ref,
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
91
|
+
export {
|
|
92
|
+
Drawer,
|
|
93
|
+
DrawerClose,
|
|
94
|
+
DrawerContent,
|
|
95
|
+
DrawerDescription,
|
|
96
|
+
DrawerFooter,
|
|
97
|
+
DrawerHeader,
|
|
98
|
+
DrawerOverlay,
|
|
99
|
+
DrawerPortal,
|
|
100
|
+
DrawerTitle,
|
|
101
|
+
DrawerTrigger
|
|
102
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Drawer,
|
|
3
|
+
DrawerClose,
|
|
4
|
+
DrawerContent,
|
|
5
|
+
DrawerDescription,
|
|
6
|
+
DrawerFooter,
|
|
7
|
+
DrawerHeader,
|
|
8
|
+
DrawerOverlay,
|
|
9
|
+
DrawerPortal,
|
|
10
|
+
DrawerTitle,
|
|
11
|
+
DrawerTrigger
|
|
12
|
+
} from "./drawer";
|
|
13
|
+
export {
|
|
14
|
+
Drawer,
|
|
15
|
+
DrawerClose,
|
|
16
|
+
DrawerContent,
|
|
17
|
+
DrawerDescription,
|
|
18
|
+
DrawerFooter,
|
|
19
|
+
DrawerHeader,
|
|
20
|
+
DrawerOverlay,
|
|
21
|
+
DrawerPortal,
|
|
22
|
+
DrawerTitle,
|
|
23
|
+
DrawerTrigger
|
|
24
|
+
};
|