@olwiba/cn 0.1.55 → 0.1.57
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 +86 -1
- package/dist/index.js +190 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -992,6 +992,51 @@ declare const SidebarMenuSubButton: React$1.ForwardRefExoticComponent<Omit<React
|
|
|
992
992
|
|
|
993
993
|
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element;
|
|
994
994
|
|
|
995
|
+
interface NotifyAction {
|
|
996
|
+
label: string;
|
|
997
|
+
onClick: () => void;
|
|
998
|
+
}
|
|
999
|
+
type NotifyVariant = "success" | "info" | "warning" | "error" | "message";
|
|
1000
|
+
interface NotifyOptions {
|
|
1001
|
+
variant?: NotifyVariant;
|
|
1002
|
+
title: string;
|
|
1003
|
+
description?: string;
|
|
1004
|
+
/** Avatar image, replacing the variant icon (e.g. a message from a person). */
|
|
1005
|
+
avatar?: string;
|
|
1006
|
+
/** Primary action (e.g. "Undo"). */
|
|
1007
|
+
action?: NotifyAction;
|
|
1008
|
+
/** Secondary action, rendered beside the primary one (e.g. "Decline"). */
|
|
1009
|
+
secondaryAction?: NotifyAction;
|
|
1010
|
+
/** Overrides the per-variant default below. */
|
|
1011
|
+
duration?: number;
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Fire a toast. Requires `<Toaster />` from this package mounted once.
|
|
1015
|
+
*
|
|
1016
|
+
* Deliberately built on sonner's *native* toast rather than `toast.custom`.
|
|
1017
|
+
* That is the whole point of this function existing here.
|
|
1018
|
+
*
|
|
1019
|
+
* sonner marks a toast `data-styled="false"` whenever it carries its own JSX
|
|
1020
|
+
* (`"data-styled": !Boolean(toast.jsx || toast.unstyled || unstyled)`), and
|
|
1021
|
+
* every rule the Toaster in this package ships — the grid layout, the type
|
|
1022
|
+
* scale, the close button, the success/error tinting, the action button
|
|
1023
|
+
* inversion, the smooth and playful modes — is scoped to
|
|
1024
|
+
* `[data-sonner-toast][data-styled='true']`. So a toast that brings its own
|
|
1025
|
+
* markup opts out of the entire design system and lands looking like a
|
|
1026
|
+
* different product's toast.
|
|
1027
|
+
*
|
|
1028
|
+
* That is exactly what happened: a parallel `notify()` in @olwiba/ui rendered
|
|
1029
|
+
* through `toast.custom`, and after the Toaster here was reworked the two no
|
|
1030
|
+
* longer resembled each other. One trigger, one renderer, one set of styles.
|
|
1031
|
+
*
|
|
1032
|
+
* Every feature of that richer component survives the move. `avatar` maps onto
|
|
1033
|
+
* sonner's `icon` slot, and `secondaryAction` onto `cancel`, so nothing has to
|
|
1034
|
+
* fall back to custom markup.
|
|
1035
|
+
*/
|
|
1036
|
+
declare function notify({ variant, title, description, avatar, action, secondaryAction, duration, }: NotifyOptions): string | number;
|
|
1037
|
+
/** Dismiss a toast by id, or all of them when called with nothing. */
|
|
1038
|
+
declare function dismissNotification(id?: string | number): void;
|
|
1039
|
+
|
|
995
1040
|
type SliderSize = "sm" | "default" | "lg";
|
|
996
1041
|
interface SliderProps extends React$1.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
|
|
997
1042
|
size?: SliderSize;
|
|
@@ -1162,4 +1207,44 @@ interface EnchantedProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
1162
1207
|
}
|
|
1163
1208
|
declare function Enchanted({ children, className, hoverOnly, glintClassName, ...props }: EnchantedProps): React$1.JSX.Element;
|
|
1164
1209
|
|
|
1165
|
-
|
|
1210
|
+
/** Payload handed to the `submit` prop. Matches FeedbackSubmission in feedback/submission.ts. */
|
|
1211
|
+
interface FeedbackSidebarPayload {
|
|
1212
|
+
/** 1-5 answer to "Do you like this?" */
|
|
1213
|
+
rating: number;
|
|
1214
|
+
message: string;
|
|
1215
|
+
/** Page the dialog was opened from, for context in the notification. */
|
|
1216
|
+
page?: string;
|
|
1217
|
+
/** Honeypot - humans never fill this. */
|
|
1218
|
+
website?: string;
|
|
1219
|
+
}
|
|
1220
|
+
interface FeedbackSidebarItemProps {
|
|
1221
|
+
/**
|
|
1222
|
+
* Server fns are compiled per-app by TanStack Start, so the host app wires
|
|
1223
|
+
* its own and passes them in — the component stays app-agnostic.
|
|
1224
|
+
*/
|
|
1225
|
+
getConfig: () => Promise<{
|
|
1226
|
+
enabled: boolean;
|
|
1227
|
+
}>;
|
|
1228
|
+
submit: (payload: FeedbackSidebarPayload) => Promise<{
|
|
1229
|
+
ok: boolean;
|
|
1230
|
+
error?: string;
|
|
1231
|
+
}>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Copy, defaulted to the docs wording this started life as.
|
|
1234
|
+
*
|
|
1235
|
+
* Optional rather than required because the first consumer was a docs site
|
|
1236
|
+
* and every string here read correctly there. The second consumer was a
|
|
1237
|
+
* product, where "Help us make these docs better" is simply wrong — so the
|
|
1238
|
+
* strings become props rather than a second copy of the component.
|
|
1239
|
+
*/
|
|
1240
|
+
emoji?: string;
|
|
1241
|
+
label?: string;
|
|
1242
|
+
title?: string;
|
|
1243
|
+
description?: string;
|
|
1244
|
+
/** Label above the 1-5 row. */
|
|
1245
|
+
ratingLabel?: string;
|
|
1246
|
+
placeholder?: string;
|
|
1247
|
+
}
|
|
1248
|
+
declare function FeedbackSidebarItem({ getConfig, submit, emoji, label, title, description, ratingLabel, placeholder, }: FeedbackSidebarItemProps): React$1.JSX.Element | null;
|
|
1249
|
+
|
|
1250
|
+
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
|
@@ -34,8 +34,8 @@ import { Panel, Group, Separator as Separator$1 } from 'react-resizable-panels';
|
|
|
34
34
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
35
35
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
36
36
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
37
|
+
import { toast, Toaster as Toaster$1 } from 'sonner';
|
|
37
38
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
38
|
-
import { Toaster as Toaster$1 } from 'sonner';
|
|
39
39
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
40
40
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
41
41
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
@@ -5125,6 +5125,43 @@ var SidebarMenuSubButton = React39.forwardRef(({ asChild = false, size = "md", i
|
|
|
5125
5125
|
);
|
|
5126
5126
|
});
|
|
5127
5127
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
5128
|
+
function defaultDuration(variant, hasAction) {
|
|
5129
|
+
if (variant === "error") return 1e4;
|
|
5130
|
+
if (variant === "warning") return 8e3;
|
|
5131
|
+
if (hasAction) return 8e3;
|
|
5132
|
+
return void 0;
|
|
5133
|
+
}
|
|
5134
|
+
function notify({
|
|
5135
|
+
variant = "info",
|
|
5136
|
+
title,
|
|
5137
|
+
description,
|
|
5138
|
+
avatar,
|
|
5139
|
+
action,
|
|
5140
|
+
secondaryAction,
|
|
5141
|
+
duration
|
|
5142
|
+
}) {
|
|
5143
|
+
const fire = variant === "message" ? toast : toast[variant];
|
|
5144
|
+
return fire(title, {
|
|
5145
|
+
description,
|
|
5146
|
+
duration: duration ?? defaultDuration(variant, Boolean(action || secondaryAction)),
|
|
5147
|
+
// An avatar replaces the icon rather than sitting beside it: the toast has
|
|
5148
|
+
// one icon column, and a message from a person is identified by the person,
|
|
5149
|
+
// not by the fact that it is a message.
|
|
5150
|
+
icon: avatar ? /* @__PURE__ */ jsx(
|
|
5151
|
+
"img",
|
|
5152
|
+
{
|
|
5153
|
+
src: avatar,
|
|
5154
|
+
alt: "",
|
|
5155
|
+
className: "size-5 shrink-0 rounded-full object-cover"
|
|
5156
|
+
}
|
|
5157
|
+
) : void 0,
|
|
5158
|
+
action: action ? { label: action.label, onClick: action.onClick } : void 0,
|
|
5159
|
+
cancel: secondaryAction ? { label: secondaryAction.label, onClick: secondaryAction.onClick } : void 0
|
|
5160
|
+
});
|
|
5161
|
+
}
|
|
5162
|
+
function dismissNotification(id) {
|
|
5163
|
+
toast.dismiss(id);
|
|
5164
|
+
}
|
|
5128
5165
|
var sliderTrackSizes = {
|
|
5129
5166
|
sm: "h-1.5",
|
|
5130
5167
|
default: "h-2",
|
|
@@ -7669,7 +7706,158 @@ function Enchanted({ children, className, hoverOnly = false, glintClassName, ...
|
|
|
7669
7706
|
))
|
|
7670
7707
|
] });
|
|
7671
7708
|
}
|
|
7709
|
+
var CONFETTI_PINKS = ["#db2777", "#ec4899", "#f472b6", "#f9a8d4", "#fbcfe8"];
|
|
7710
|
+
function FeedbackSidebarItem({
|
|
7711
|
+
getConfig,
|
|
7712
|
+
submit,
|
|
7713
|
+
emoji = "\u{1F970}",
|
|
7714
|
+
label = "Share feedback",
|
|
7715
|
+
title = "Share feedback",
|
|
7716
|
+
description = "Help us make these docs better.",
|
|
7717
|
+
ratingLabel = "Do you like this?",
|
|
7718
|
+
placeholder = "What can we improve?"
|
|
7719
|
+
}) {
|
|
7720
|
+
const [enabled, setEnabled] = React39.useState(false);
|
|
7721
|
+
const [open, setOpen] = React39.useState(false);
|
|
7722
|
+
const [rating, setRating] = React39.useState(null);
|
|
7723
|
+
const [message, setMessage] = React39.useState("");
|
|
7724
|
+
const [website, setWebsite] = React39.useState("");
|
|
7725
|
+
const [status, setStatus] = React39.useState("idle");
|
|
7726
|
+
const [error, setError] = React39.useState(null);
|
|
7727
|
+
React39.useEffect(() => {
|
|
7728
|
+
let cancelled = false;
|
|
7729
|
+
getConfig().then((config) => {
|
|
7730
|
+
if (!cancelled && config.enabled) setEnabled(true);
|
|
7731
|
+
}).catch(() => {
|
|
7732
|
+
});
|
|
7733
|
+
return () => {
|
|
7734
|
+
cancelled = true;
|
|
7735
|
+
};
|
|
7736
|
+
}, [getConfig]);
|
|
7737
|
+
if (!enabled) return null;
|
|
7738
|
+
const handleOpenChange = (next) => {
|
|
7739
|
+
setOpen(next);
|
|
7740
|
+
if (next) {
|
|
7741
|
+
setStatus("idle");
|
|
7742
|
+
setError(null);
|
|
7743
|
+
}
|
|
7744
|
+
};
|
|
7745
|
+
const handleTriggerClick = () => {
|
|
7746
|
+
fireConfetti({ colors: CONFETTI_PINKS });
|
|
7747
|
+
handleOpenChange(true);
|
|
7748
|
+
};
|
|
7749
|
+
const handleSubmit = async (event) => {
|
|
7750
|
+
event.preventDefault();
|
|
7751
|
+
if (rating === null) {
|
|
7752
|
+
setError("Please pick a rating.");
|
|
7753
|
+
return;
|
|
7754
|
+
}
|
|
7755
|
+
if (message.trim().length < 3) {
|
|
7756
|
+
setError("Please write a short message.");
|
|
7757
|
+
return;
|
|
7758
|
+
}
|
|
7759
|
+
setStatus("sending");
|
|
7760
|
+
setError(null);
|
|
7761
|
+
try {
|
|
7762
|
+
const result = await submit({
|
|
7763
|
+
rating,
|
|
7764
|
+
message,
|
|
7765
|
+
page: window.location.pathname,
|
|
7766
|
+
website
|
|
7767
|
+
});
|
|
7768
|
+
if (result.ok) {
|
|
7769
|
+
setStatus("sent");
|
|
7770
|
+
setMessage("");
|
|
7771
|
+
setRating(null);
|
|
7772
|
+
} else {
|
|
7773
|
+
setStatus("error");
|
|
7774
|
+
setError(result.error ?? "Something went wrong. Please try again.");
|
|
7775
|
+
}
|
|
7776
|
+
} catch {
|
|
7777
|
+
setStatus("error");
|
|
7778
|
+
setError("Something went wrong. Please try again.");
|
|
7779
|
+
}
|
|
7780
|
+
};
|
|
7781
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7782
|
+
/* @__PURE__ */ jsx(Enchanted, { hoverOnly: true, glintClassName: "text-pink-500", children: /* @__PURE__ */ jsxs(
|
|
7783
|
+
"button",
|
|
7784
|
+
{
|
|
7785
|
+
type: "button",
|
|
7786
|
+
onClick: handleTriggerClick,
|
|
7787
|
+
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",
|
|
7788
|
+
children: [
|
|
7789
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: emoji }),
|
|
7790
|
+
label
|
|
7791
|
+
]
|
|
7792
|
+
}
|
|
7793
|
+
) }),
|
|
7794
|
+
/* @__PURE__ */ jsx(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx(DialogContent, { className: "sm:max-w-md", children: status === "sent" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7795
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
7796
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: "Thanks for the feedback!" }),
|
|
7797
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: "Your message has been sent. We appreciate you taking the time." })
|
|
7798
|
+
] }),
|
|
7799
|
+
/* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { onClick: () => setOpen(false), children: "Close" }) })
|
|
7800
|
+
] }) : /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
7801
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
7802
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
7803
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
7804
|
+
] }),
|
|
7805
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
7806
|
+
/* @__PURE__ */ jsx(Label3, { children: ratingLabel }),
|
|
7807
|
+
/* @__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(
|
|
7808
|
+
"button",
|
|
7809
|
+
{
|
|
7810
|
+
type: "button",
|
|
7811
|
+
role: "radio",
|
|
7812
|
+
"aria-checked": rating === value,
|
|
7813
|
+
onClick: () => setRating(value),
|
|
7814
|
+
className: cn(
|
|
7815
|
+
"flex size-9 items-center justify-center rounded-md border text-sm font-medium transition-colors",
|
|
7816
|
+
rating === value ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
7817
|
+
),
|
|
7818
|
+
children: value
|
|
7819
|
+
},
|
|
7820
|
+
value
|
|
7821
|
+
)) })
|
|
7822
|
+
] }),
|
|
7823
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
7824
|
+
/* @__PURE__ */ jsx(Label3, { htmlFor: "feedback-message", children: "Your feedback" }),
|
|
7825
|
+
/* @__PURE__ */ jsx(
|
|
7826
|
+
Textarea,
|
|
7827
|
+
{
|
|
7828
|
+
id: "feedback-message",
|
|
7829
|
+
value: message,
|
|
7830
|
+
onChange: (event) => setMessage(event.target.value),
|
|
7831
|
+
placeholder,
|
|
7832
|
+
rows: 5,
|
|
7833
|
+
maxLength: 2e3,
|
|
7834
|
+
required: true
|
|
7835
|
+
}
|
|
7836
|
+
)
|
|
7837
|
+
] }),
|
|
7838
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute -left-[9999px] top-0", "aria-hidden": "true", children: [
|
|
7839
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "feedback-website", children: "Website" }),
|
|
7840
|
+
/* @__PURE__ */ jsx(
|
|
7841
|
+
"input",
|
|
7842
|
+
{
|
|
7843
|
+
id: "feedback-website",
|
|
7844
|
+
type: "text",
|
|
7845
|
+
tabIndex: -1,
|
|
7846
|
+
autoComplete: "off",
|
|
7847
|
+
value: website,
|
|
7848
|
+
onChange: (event) => setWebsite(event.target.value)
|
|
7849
|
+
}
|
|
7850
|
+
)
|
|
7851
|
+
] }),
|
|
7852
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error }),
|
|
7853
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
7854
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: () => setOpen(false), children: "Cancel" }),
|
|
7855
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", disabled: status === "sending", children: status === "sending" ? "Sending..." : "Send" })
|
|
7856
|
+
] })
|
|
7857
|
+
] }) }) })
|
|
7858
|
+
] });
|
|
7859
|
+
}
|
|
7672
7860
|
|
|
7673
|
-
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, fireConfetti, inputBase, inputPlayfulBacking, navigationMenuTriggerStyle, statusIndicatorDotVariants, toggleVariants, useCopyToClipboard, useFormField, useIsMobile, useResolvedTheme, useSidebar, useUIVariant };
|
|
7861
|
+
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 };
|
|
7674
7862
|
//# sourceMappingURL=index.js.map
|
|
7675
7863
|
//# sourceMappingURL=index.js.map
|