@olwiba/cn 0.1.56 → 0.1.58

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/index.d.ts CHANGED
@@ -1184,19 +1184,34 @@ declare function fireConfetti(options?: ConfettiOptions): void;
1184
1184
  * Reads the user's stored theme preference from localStorage and applies the
1185
1185
  * `.dark` class to <html> before first paint, preventing a flash of the wrong theme.
1186
1186
  *
1187
- * Defaults to dark mode if no preference is stored.
1187
+ * The `.dark` class this writes is the theme's source of truth. Code that needs
1188
+ * the theme as a value rather than as a `dark:` variant should call
1189
+ * `useResolvedTheme`, which observes this class.
1188
1190
  *
1189
- * The `.dark` class this writes is the theme's source of truth — nothing here
1190
- * reads `prefers-color-scheme`. Code that needs the theme as a value rather than
1191
- * as a `dark:` variant should call `useResolvedTheme`, which observes this class.
1191
+ * `defaultTheme` decides what a visitor with no stored preference gets:
1192
+ *
1193
+ * dark the historic behaviour, and still the default here so no existing
1194
+ * consumer changes without asking for it
1195
+ * light start light regardless of the device
1196
+ * system follow `prefers-color-scheme`
1197
+ *
1198
+ * Worth stating plainly, because the comment this replaces claimed otherwise:
1199
+ * nothing here consulted `prefers-color-scheme`, so every first-time visitor
1200
+ * got a dark app whatever their device was set to. User testing read that as
1201
+ * "the product is too dark" when it was really "the product ignored me".
1192
1202
  *
1193
1203
  * Usage (in your root layout / document shell):
1194
1204
  * <head>
1195
- * <ThemeScript />
1205
+ * <ThemeScript defaultTheme="light" />
1196
1206
  * ...
1197
1207
  * </head>
1198
1208
  */
1199
- declare function ThemeScript(): React$1.JSX.Element;
1209
+ type ThemeScriptDefault = 'light' | 'dark' | 'system';
1210
+ interface ThemeScriptProps {
1211
+ /** What a visitor with no stored preference gets. @default "dark" */
1212
+ defaultTheme?: ThemeScriptDefault;
1213
+ }
1214
+ declare function ThemeScript({ defaultTheme }?: ThemeScriptProps): React$1.JSX.Element;
1200
1215
 
1201
1216
  interface EnchantedProps extends React$1.HTMLAttributes<HTMLDivElement> {
1202
1217
  children: React$1.ReactNode;
@@ -1207,4 +1222,44 @@ interface EnchantedProps extends React$1.HTMLAttributes<HTMLDivElement> {
1207
1222
  }
1208
1223
  declare function Enchanted({ children, className, hoverOnly, glintClassName, ...props }: EnchantedProps): React$1.JSX.Element;
1209
1224
 
1210
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AsciiText, type AsciiTextProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ConfettiOptions, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogPresentation, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Enchanted, type EnchantedProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, type KbdProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NotifyAction, type NotifyOptions, type NotifyVariant, NumberInput, type NumberInputProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Spinner, StatusIndicator, type StatusIndicatorProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeScript, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UIVariant, UIVariantProvider, badgeVariants, buttonGroupVariants, buttonVariants, cn, dismissNotification, fireConfetti, inputBase, inputPlayfulBacking, navigationMenuTriggerStyle, notify, statusIndicatorDotVariants, toggleVariants, useCopyToClipboard, useFormField, useIsMobile, useResolvedTheme, useSidebar, useUIVariant };
1225
+ /** Payload handed to the `submit` prop. Matches FeedbackSubmission in feedback/submission.ts. */
1226
+ interface FeedbackSidebarPayload {
1227
+ /** 1-5 answer to "Do you like this?" */
1228
+ rating: number;
1229
+ message: string;
1230
+ /** Page the dialog was opened from, for context in the notification. */
1231
+ page?: string;
1232
+ /** Honeypot - humans never fill this. */
1233
+ website?: string;
1234
+ }
1235
+ interface FeedbackSidebarItemProps {
1236
+ /**
1237
+ * Server fns are compiled per-app by TanStack Start, so the host app wires
1238
+ * its own and passes them in — the component stays app-agnostic.
1239
+ */
1240
+ getConfig: () => Promise<{
1241
+ enabled: boolean;
1242
+ }>;
1243
+ submit: (payload: FeedbackSidebarPayload) => Promise<{
1244
+ ok: boolean;
1245
+ error?: string;
1246
+ }>;
1247
+ /**
1248
+ * Copy, defaulted to the docs wording this started life as.
1249
+ *
1250
+ * Optional rather than required because the first consumer was a docs site
1251
+ * and every string here read correctly there. The second consumer was a
1252
+ * product, where "Help us make these docs better" is simply wrong — so the
1253
+ * strings become props rather than a second copy of the component.
1254
+ */
1255
+ emoji?: string;
1256
+ label?: string;
1257
+ title?: string;
1258
+ description?: string;
1259
+ /** Label above the 1-5 row. */
1260
+ ratingLabel?: string;
1261
+ placeholder?: string;
1262
+ }
1263
+ declare function FeedbackSidebarItem({ getConfig, submit, emoji, label, title, description, ratingLabel, placeholder, }: FeedbackSidebarItemProps): React$1.JSX.Element | null;
1264
+
1265
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AsciiText, type AsciiTextProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ConfettiOptions, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogPresentation, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Enchanted, type EnchantedProps, FeedbackSidebarItem, type FeedbackSidebarItemProps, type FeedbackSidebarPayload, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, type KbdProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NotifyAction, type NotifyOptions, type NotifyVariant, NumberInput, type NumberInputProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Spinner, StatusIndicator, type StatusIndicatorProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeScript, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UIVariant, UIVariantProvider, badgeVariants, buttonGroupVariants, buttonVariants, cn, dismissNotification, fireConfetti, inputBase, inputPlayfulBacking, navigationMenuTriggerStyle, notify, statusIndicatorDotVariants, toggleVariants, useCopyToClipboard, useFormField, useIsMobile, useResolvedTheme, useSidebar, useUIVariant };
package/dist/index.js CHANGED
@@ -7666,9 +7666,12 @@ function fireConfetti(options) {
7666
7666
  confetti({ ...base, particleCount: side, angle: 60, origin: { x: 0, y: 1 } });
7667
7667
  confetti({ ...base, particleCount: side, angle: 120, origin: { x: 1, y: 1 } });
7668
7668
  }
7669
- var script = `(function(){try{var t=localStorage.getItem('theme');document.documentElement.classList.toggle('dark',t!=='light')}catch(e){}})()`;
7670
- function ThemeScript() {
7671
- return /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: script } });
7669
+ function buildScript(defaultTheme) {
7670
+ const fallback = defaultTheme === "system" ? "window.matchMedia('(prefers-color-scheme: dark)').matches" : defaultTheme === "dark" ? "true" : "false";
7671
+ return `(function(){try{var t=localStorage.getItem('theme');var d=t==='dark'||t==='light'?t==='dark':${fallback};document.documentElement.classList.toggle('dark',d)}catch(e){}})()`;
7672
+ }
7673
+ function ThemeScript({ defaultTheme = "dark" } = {}) {
7674
+ return /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: buildScript(defaultTheme) } });
7672
7675
  }
7673
7676
  var GLINTS = [
7674
7677
  // perimeter
@@ -7706,7 +7709,158 @@ function Enchanted({ children, className, hoverOnly = false, glintClassName, ...
7706
7709
  ))
7707
7710
  ] });
7708
7711
  }
7712
+ var CONFETTI_PINKS = ["#db2777", "#ec4899", "#f472b6", "#f9a8d4", "#fbcfe8"];
7713
+ function FeedbackSidebarItem({
7714
+ getConfig,
7715
+ submit,
7716
+ emoji = "\u{1F970}",
7717
+ label = "Share feedback",
7718
+ title = "Share feedback",
7719
+ description = "Help us make these docs better.",
7720
+ ratingLabel = "Do you like this?",
7721
+ placeholder = "What can we improve?"
7722
+ }) {
7723
+ const [enabled, setEnabled] = React39.useState(false);
7724
+ const [open, setOpen] = React39.useState(false);
7725
+ const [rating, setRating] = React39.useState(null);
7726
+ const [message, setMessage] = React39.useState("");
7727
+ const [website, setWebsite] = React39.useState("");
7728
+ const [status, setStatus] = React39.useState("idle");
7729
+ const [error, setError] = React39.useState(null);
7730
+ React39.useEffect(() => {
7731
+ let cancelled = false;
7732
+ getConfig().then((config) => {
7733
+ if (!cancelled && config.enabled) setEnabled(true);
7734
+ }).catch(() => {
7735
+ });
7736
+ return () => {
7737
+ cancelled = true;
7738
+ };
7739
+ }, [getConfig]);
7740
+ if (!enabled) return null;
7741
+ const handleOpenChange = (next) => {
7742
+ setOpen(next);
7743
+ if (next) {
7744
+ setStatus("idle");
7745
+ setError(null);
7746
+ }
7747
+ };
7748
+ const handleTriggerClick = () => {
7749
+ fireConfetti({ colors: CONFETTI_PINKS });
7750
+ handleOpenChange(true);
7751
+ };
7752
+ const handleSubmit = async (event) => {
7753
+ event.preventDefault();
7754
+ if (rating === null) {
7755
+ setError("Please pick a rating.");
7756
+ return;
7757
+ }
7758
+ if (message.trim().length < 3) {
7759
+ setError("Please write a short message.");
7760
+ return;
7761
+ }
7762
+ setStatus("sending");
7763
+ setError(null);
7764
+ try {
7765
+ const result = await submit({
7766
+ rating,
7767
+ message,
7768
+ page: window.location.pathname,
7769
+ website
7770
+ });
7771
+ if (result.ok) {
7772
+ setStatus("sent");
7773
+ setMessage("");
7774
+ setRating(null);
7775
+ } else {
7776
+ setStatus("error");
7777
+ setError(result.error ?? "Something went wrong. Please try again.");
7778
+ }
7779
+ } catch {
7780
+ setStatus("error");
7781
+ setError("Something went wrong. Please try again.");
7782
+ }
7783
+ };
7784
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7785
+ /* @__PURE__ */ jsx(Enchanted, { hoverOnly: true, glintClassName: "text-pink-500", children: /* @__PURE__ */ jsxs(
7786
+ "button",
7787
+ {
7788
+ type: "button",
7789
+ onClick: handleTriggerClick,
7790
+ className: "flex h-8 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm text-muted-foreground outline-hidden transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2",
7791
+ children: [
7792
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: emoji }),
7793
+ label
7794
+ ]
7795
+ }
7796
+ ) }),
7797
+ /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx(DialogContent, { className: "sm:max-w-md", children: status === "sent" ? /* @__PURE__ */ jsxs(Fragment, { children: [
7798
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
7799
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Thanks for the feedback!" }),
7800
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Your message has been sent. We appreciate you taking the time." })
7801
+ ] }),
7802
+ /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { onClick: () => setOpen(false), children: "Close" }) })
7803
+ ] }) : /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
7804
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
7805
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
7806
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
7807
+ ] }),
7808
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
7809
+ /* @__PURE__ */ jsx(Label3, { children: ratingLabel }),
7810
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5", role: "radiogroup", "aria-label": `${ratingLabel} 1 to 5`, children: [1, 2, 3, 4, 5].map((value) => /* @__PURE__ */ jsx(
7811
+ "button",
7812
+ {
7813
+ type: "button",
7814
+ role: "radio",
7815
+ "aria-checked": rating === value,
7816
+ onClick: () => setRating(value),
7817
+ className: cn(
7818
+ "flex size-9 items-center justify-center rounded-md border text-sm font-medium transition-colors",
7819
+ rating === value ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background text-muted-foreground hover:bg-accent hover:text-accent-foreground"
7820
+ ),
7821
+ children: value
7822
+ },
7823
+ value
7824
+ )) })
7825
+ ] }),
7826
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
7827
+ /* @__PURE__ */ jsx(Label3, { htmlFor: "feedback-message", children: "Your feedback" }),
7828
+ /* @__PURE__ */ jsx(
7829
+ Textarea,
7830
+ {
7831
+ id: "feedback-message",
7832
+ value: message,
7833
+ onChange: (event) => setMessage(event.target.value),
7834
+ placeholder,
7835
+ rows: 5,
7836
+ maxLength: 2e3,
7837
+ required: true
7838
+ }
7839
+ )
7840
+ ] }),
7841
+ /* @__PURE__ */ jsxs("div", { className: "absolute -left-[9999px] top-0", "aria-hidden": "true", children: [
7842
+ /* @__PURE__ */ jsx("label", { htmlFor: "feedback-website", children: "Website" }),
7843
+ /* @__PURE__ */ jsx(
7844
+ "input",
7845
+ {
7846
+ id: "feedback-website",
7847
+ type: "text",
7848
+ tabIndex: -1,
7849
+ autoComplete: "off",
7850
+ value: website,
7851
+ onChange: (event) => setWebsite(event.target.value)
7852
+ }
7853
+ )
7854
+ ] }),
7855
+ error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error }),
7856
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
7857
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: () => setOpen(false), children: "Cancel" }),
7858
+ /* @__PURE__ */ jsx(Button, { type: "submit", disabled: status === "sending", children: status === "sending" ? "Sending..." : "Send" })
7859
+ ] })
7860
+ ] }) }) })
7861
+ ] });
7862
+ }
7709
7863
 
7710
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AsciiText, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Enchanted, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item4 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeScript, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UIVariantProvider, badgeVariants, buttonGroupVariants, buttonVariants, cn, dismissNotification, fireConfetti, inputBase, inputPlayfulBacking, navigationMenuTriggerStyle, notify, statusIndicatorDotVariants, toggleVariants, useCopyToClipboard, useFormField, useIsMobile, useResolvedTheme, useSidebar, useUIVariant };
7864
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AsciiText, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Enchanted, FeedbackSidebarItem, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item4 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeScript, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UIVariantProvider, badgeVariants, buttonGroupVariants, buttonVariants, cn, dismissNotification, fireConfetti, inputBase, inputPlayfulBacking, navigationMenuTriggerStyle, notify, statusIndicatorDotVariants, toggleVariants, useCopyToClipboard, useFormField, useIsMobile, useResolvedTheme, useSidebar, useUIVariant };
7711
7865
  //# sourceMappingURL=index.js.map
7712
7866
  //# sourceMappingURL=index.js.map