alert-dialog-01
import {
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
export function AlertDialogDemo() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
Delete Designali Project
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<Trash2Icon />
</AlertDialogMedia>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete your
Designali project and remove all associated component assets from our servers.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Delete Project
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}alert-dialog-02
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
export function AlertDialogDemo() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
Delete Designali Account
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone. This will permanently delete your
Designali account and remove all associated component data from our servers.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Delete Account
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}alert-dialog-03
import {
FileX as FileXIcon,
PenLine as PenLineIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function DiscardDraftDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<PenLineIcon data-icon="inline-start" />
Discard draft
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia>
<FileXIcon />
</AlertDialogMedia>
<AlertDialogTitle>Discard this draft?</AlertDialogTitle>
<AlertDialogDescription>
Your note to the Designali studio will be lost. This can't be
recovered.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Keep editing</AlertDialogCancel>
<AlertDialogAction variant="destructive">Discard</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-04
import {
LogOut as LogOutIcon,
MonitorSmartphone as MonitorSmartphoneIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function SignOutAllDevices() {
return (
<div className="flex w-full max-w-md items-center gap-3 border p-4">
<div className="flex size-9 shrink-0 items-center justify-center bg-muted">
<MonitorSmartphoneIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Designali sessions</p>
<p className="text-xs text-muted-foreground">4 devices are signed in to designali.com</p>
</div>
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" size="sm" />}>
Sign out all
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<LogOutIcon />
</AlertDialogMedia>
<AlertDialogTitle>Sign out of all devices?</AlertDialogTitle>
<AlertDialogDescription>
You'll stay signed in here, but every other browser and phone
will need to log in again.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Sign out everywhere</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-05
import {
DoorOpen as DoorOpenIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function LeaveWorkspaceDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
<DoorOpenIcon data-icon="inline-start" />
Leave workspace
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<DoorOpenIcon />
</AlertDialogMedia>
<AlertDialogTitle>Leave the Designali studio workspace?</AlertDialogTitle>
<AlertDialogDescription>
You will lose access to 12 client projects and 3 shared Figma boards. An admin
will need to invite you again.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Stay</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Leave workspace
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-06
import {
KeyRound as KeyRoundIcon,
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function RevokeApiKeyIconTrigger() {
return (
<div className="flex w-full max-w-md items-center gap-3 border p-4">
<div className="flex size-9 shrink-0 items-center justify-center bg-muted">
<KeyRoundIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">designali.com API key</p>
<p className="text-xs text-muted-foreground">
dsgn_demo_...4f9a - created Mar 2
</p>
</div>
<AlertDialog>
<AlertDialogTrigger
render={
<Button variant="ghost" size="icon-sm" aria-label="Revoke key" />
}
>
<Trash2Icon />
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogTitle>Revoke API key?</AlertDialogTitle>
<AlertDialogDescription>
Requests signed with this key will fail immediately.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">Revoke</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-07
import {
CreditCard as CreditCardIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function CancelSubscriptionDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="link" />}>
Cancel subscription
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<CreditCardIcon />
</AlertDialogMedia>
<AlertDialogTitle>Cancel your Designali Pro plan?</AlertDialogTitle>
<AlertDialogDescription>
You'll keep Pro templates and blocks until June 30. After that
your account moves to the Free plan.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Keep Pro</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Cancel plan
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-08
import {
Archive as ArchiveIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ArchiveChannelDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="secondary" />}>
<ArchiveIcon data-icon="inline-start" />
Archive #blocks-launch
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<ArchiveIcon />
</AlertDialogMedia>
<AlertDialogTitle>Archive this channel?</AlertDialogTitle>
<AlertDialogDescription>
Members can still search its history, but no one will be able to
post new messages.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>
<ArchiveIcon data-icon="inline-start" />
Archive channel
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-09
import {
CloudOff as CloudOffIcon,
Globe as GlobeIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function UnpublishSiteDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<GlobeIcon data-icon="inline-start" />
Unpublish site
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<CloudOffIcon />
</AlertDialogMedia>
<AlertDialogTitle>Take design-agency.designali.com offline?</AlertDialogTitle>
<AlertDialogDescription>
Visitors will see a placeholder page until you publish again. Your
content and settings are kept.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">Unpublish</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-10
import {
Database as DatabaseIcon,
Eraser as EraserIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ClearBuildCacheDialog() {
return (
<div className="flex w-full max-w-md items-center gap-3 border p-4">
<div className="flex size-9 shrink-0 items-center justify-center bg-muted">
<DatabaseIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Build cache</p>
<p className="text-xs text-muted-foreground">1.8 GB across 42 designali.com builds</p>
</div>
<AlertDialog>
<AlertDialogTrigger render={<Button variant="secondary" size="sm" />}>
Clear
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<EraserIcon />
</AlertDialogMedia>
<AlertDialogTitle>Clear build cache?</AlertDialogTitle>
<AlertDialogDescription>
The next deployment will rebuild from scratch and may take a few
extra minutes.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Clear cache and redeploy</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-11
import {
PhoneOff as PhoneOffIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function EndMeetingForAll() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
<PhoneOffIcon data-icon="inline-start" />
End call
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<PhoneOffIcon />
</AlertDialogMedia>
<AlertDialogTitle>End the Designali client call for all?</AlertDialogTitle>
<AlertDialogDescription>
All 9 participants will be disconnected.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
End for all
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-12
import {
ShieldCheck as ShieldCheckIcon,
ShieldOff as ShieldOffIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function DisableTwoFactorDialog() {
return (
<div className="flex w-full max-w-md items-center gap-3 border p-4">
<div className="flex size-9 shrink-0 items-center justify-center bg-muted">
<ShieldCheckIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Two-factor authentication</p>
<p className="text-xs text-muted-foreground">
Enabled with an authenticator app
</p>
</div>
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" size="sm" />}>
Disable
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-primary/10 text-primary dark:text-primary">
<ShieldOffIcon />
</AlertDialogMedia>
<AlertDialogTitle>
Turn off two-factor authentication?
</AlertDialogTitle>
<AlertDialogDescription>
Your account will be protected by your password only. We strongly
recommend keeping 2FA on.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Keep 2FA</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Turn off
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-13
import {
Eye as EyeIcon,
LockOpen as LockOpenIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function MakeRepositoryPublic() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<EyeIcon data-icon="inline-start" />
Change visibility
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<LockOpenIcon />
</AlertDialogMedia>
<AlertDialogTitle>Make designali-blocks public?</AlertDialogTitle>
<AlertDialogDescription>
Anyone on the internet will be able to see this repository,
including its full commit history.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>I understand, make public</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-14
import {
Folder as FolderIcon,
FolderX as FolderXIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function DeleteFolderDialog() {
return (
<div className="flex w-full max-w-md items-center gap-3 border p-4">
<div className="flex size-9 shrink-0 items-center justify-center bg-muted">
<FolderIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Designali brand assets</p>
<p className="text-xs text-muted-foreground">38 files - 214 MB</p>
</div>
<AlertDialog>
<AlertDialogTrigger
render={
<Button variant="ghost" size="icon-sm" aria-label="Delete folder" />
}
>
<FolderXIcon />
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<FolderXIcon />
</AlertDialogMedia>
<AlertDialogTitle>
Delete "Designali brand assets"?
</AlertDialogTitle>
<AlertDialogDescription>
The folder and its 38 files will move to Trash and be permanently
removed after 30 days.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Move to Trash
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-15
import {
Map as MapIcon,
X as XIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ExitOnboardingDialog() {
return (
<AlertDialog>
<AlertDialogTrigger
render={
<Button variant="outline" size="icon" aria-label="Exit setup" />
}
>
<XIcon />
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia>
<MapIcon />
</AlertDialogMedia>
<AlertDialogTitle>Skip setup for now?</AlertDialogTitle>
<AlertDialogDescription>
You can finish setting up your Designali account anytime from Settings.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Continue setup</AlertDialogCancel>
<AlertDialogAction variant="secondary">Skip</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-16
import {
Banknote as BanknoteIcon,
Send as SendIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ConfirmPayoutDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button />}>
<BanknoteIcon data-icon="inline-start" />
Send payout
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-primary/10 text-primary dark:text-primary">
<BanknoteIcon />
</AlertDialogMedia>
<AlertDialogTitle>Send $2,480.00 to Ali Imam?</AlertDialogTitle>
<AlertDialogDescription>
Funds will arrive in the account ending 4421 within 1-2 business
days.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>
<SendIcon data-icon="inline-start" />
Send payout
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-17
import {
History as HistoryIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function RestoreVersionDialog() {
return (
<div className="flex w-full max-w-md items-center gap-3 border p-4">
<div className="flex size-9 shrink-0 items-center justify-center bg-muted">
<HistoryIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Design Agency template — Version 14</p>
<p className="text-xs text-muted-foreground">
Edited by Ali Imam - 2 days ago
</p>
</div>
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" size="sm" />}>
Restore
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<HistoryIcon />
</AlertDialogMedia>
<AlertDialogTitle>Restore version 14?</AlertDialogTitle>
<AlertDialogDescription>
The current document will be saved as a new version first, so
nothing is lost.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Restore this version</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-18
import {
Ban as BanIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function BlockUserDialog() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="ghost" />}>
<BanIcon data-icon="inline-start" />
Block @spam.bot
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<BanIcon />
</AlertDialogMedia>
<AlertDialogTitle>Block @spam.bot?</AlertDialogTitle>
<AlertDialogDescription>
They won't be able to message you or see your posts.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">Block</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-19
import {
GitBranch as GitBranchIcon,
TriangleAlert as TriangleAlertIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ForcePushWarning() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
<GitBranchIcon data-icon="inline-start" />
Force push
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-primary/10 text-primary dark:text-primary">
<TriangleAlertIcon />
</AlertDialogMedia>
<AlertDialogTitle>Force push designali.com to main?</AlertDialogTitle>
<AlertDialogDescription>
This rewrites history on a shared branch. 3 teammates have commits
that will be overwritten.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Abort</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Force push anyway
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-20
"use client"
import * as React from "react"
import {
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Field, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
const projectName = "designali-portfolio"
export function TypeToConfirmDelete() {
const [value, setValue] = React.useState("")
const matches = value === projectName
return (
<AlertDialog onOpenChange={(open) => !open && setValue("")}>
<AlertDialogTrigger render={<Button variant="destructive" />}>
<Trash2Icon data-icon="inline-start" />
Delete project
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete {projectName}?</AlertDialogTitle>
<AlertDialogDescription>
This permanently removes the project, its 18 deployments and all
environment variables.
</AlertDialogDescription>
</AlertDialogHeader>
<Field>
<FieldLabel htmlFor="confirm-project">
Type{" "}
<span className="font-sans text-foreground">{projectName}</span> to
confirm
</FieldLabel>
<Input
id="confirm-project"
value={value}
onChange={(event) => setValue(event.target.value)}
autoComplete="off"
aria-invalid={value.length > 0 && !matches}
/>
</Field>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive" disabled={!matches}>
Delete project
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-21
"use client"
import * as React from "react"
import {
Webhook as WebhookIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Spinner } from "@/components/ui/spinner"
export function AsyncConfirmWithSpinner() {
const [open, setOpen] = React.useState(false)
const [pending, setPending] = React.useState(false)
const [deleted, setDeleted] = React.useState(false)
function handleConfirm() {
setPending(true)
setTimeout(() => {
setPending(false)
setDeleted(true)
setOpen(false)
}, 1500)
}
return (
<div className="flex flex-col items-center gap-3">
<AlertDialog
open={open}
onOpenChange={(next) => !pending && setOpen(next)}
>
<AlertDialogTrigger
render={<Button variant="outline" disabled={deleted} />}
>
{deleted ? "Webhook deleted" : "Delete webhook"}
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<WebhookIcon />
</AlertDialogMedia>
<AlertDialogTitle>Delete webhook endpoint?</AlertDialogTitle>
<AlertDialogDescription>
Events will no longer be sent to https://www.designali.com/api/hooks/orders.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel disabled={pending}>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
onClick={handleConfirm}
disabled={pending}
>
{pending && <Spinner data-icon="inline-start" />}
{pending ? "Deleting..." : "Delete"}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
{deleted && (
<Button variant="link" size="sm" onClick={() => setDeleted(false)}>
Reset demo
</Button>
)}
</div>
)
}
alert-dialog-22
"use client"
import * as React from "react"
import {
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import { Field, FieldLabel } from "@/components/ui/field"
export function DontAskAgainCheckbox() {
const [open, setOpen] = React.useState(false)
const [skip, setSkip] = React.useState(false)
const [remember, setRemember] = React.useState(false)
const [moved, setMoved] = React.useState(0)
function moveToTrash() {
setMoved((count) => count + 1)
setOpen(false)
if (remember) setSkip(true)
}
return (
<div className="flex flex-col items-center gap-2">
<Button
variant="outline"
onClick={() => (skip ? moveToTrash() : setOpen(true))}
>
<Trash2Icon data-icon="inline-start" />
Move to Trash
</Button>
<p className="text-xs text-muted-foreground">
{moved} item{moved === 1 ? "" : "s"} moved{" "}
{skip && "- confirmation skipped"}
</p>
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogTitle>Move to Trash?</AlertDialogTitle>
<AlertDialogDescription>
You can restore it from Trash for 30 days.
</AlertDialogDescription>
</AlertDialogHeader>
<Field orientation="horizontal">
<Checkbox
id="dont-ask"
checked={remember}
onCheckedChange={(checked) => setRemember(checked === true)}
/>
<FieldLabel htmlFor="dont-ask" className="font-normal">
Don't ask me again
</FieldLabel>
</Field>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction onClick={moveToTrash}>Move</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-23
import {
File as FileIcon,
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
const files = [
{ name: "designali-roadmap.pdf", size: "2.4 MB" },
{ name: "designali-logo-v4.svg", size: "84 KB" },
{ name: "client-brief.docx", size: "312 KB" },
{ name: "template-pricing.xlsx", size: "1.1 MB" },
]
export function BulkDeleteSelectedFiles() {
return (
<div className="flex w-full max-w-sm items-center justify-between gap-3 border bg-muted/40 px-3 py-2">
<span className="text-sm">{files.length} files selected</span>
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" size="sm" />}>
<Trash2Icon data-icon="inline-start" />
Delete
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete {files.length} files?</AlertDialogTitle>
<AlertDialogDescription>
These files will be permanently deleted for everyone.
</AlertDialogDescription>
</AlertDialogHeader>
<ul className="divide-y border text-sm">
{files.map((file) => (
<li key={file.name} className="flex items-center gap-2 px-3 py-2">
<FileIcon className="size-4 text-muted-foreground" />
<span className="min-w-0 flex-1 truncate">{file.name}</span>
<span className="text-xs text-muted-foreground">
{file.size}
</span>
</li>
))}
</ul>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Delete files
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-24
"use client"
import * as React from "react"
import {
Copy as CopyIcon,
Ellipsis as EllipsisIcon,
Pencil as PencilIcon,
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
export function DropdownMenuDeleteAction() {
const [open, setOpen] = React.useState(false)
return (
<div className="flex w-full max-w-sm items-center justify-between border p-3">
<div>
<p className="text-sm font-medium">Designali blocks launch newsletter</p>
<p className="text-xs text-muted-foreground">Scheduled for Apr 14</p>
</div>
<DropdownMenu>
<DropdownMenuTrigger
render={
<Button
variant="ghost"
size="icon-sm"
aria-label="Newsletter actions"
/>
}
>
<EllipsisIcon />
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem>
<PencilIcon />
Edit
</DropdownMenuItem>
<DropdownMenuItem>
<CopyIcon />
Duplicate
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem variant="destructive" onClick={() => setOpen(true)}>
<Trash2Icon />
Delete
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogTitle>Delete newsletter?</AlertDialogTitle>
<AlertDialogDescription>
The scheduled send to 4,210 Designali subscribers will be cancelled.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
onClick={() => setOpen(false)}
>
Delete
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-25
import {
UserMinus as UserMinusIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
export function RemoveTeamMemberAvatar() {
return (
<div className="flex w-full max-w-sm items-center gap-3 border p-3">
<Avatar>
<AvatarFallback>SK</AvatarFallback>
</Avatar>
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Sara Khan</p>
<p className="truncate text-xs text-muted-foreground">
sara@designali.com
</p>
</div>
<Badge variant="secondary">Editor</Badge>
<AlertDialog>
<AlertDialogTrigger
render={
<Button
variant="ghost"
size="icon-sm"
aria-label="Remove Sara Khan"
/>
}
>
<UserMinusIcon />
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-transparent">
<Avatar size="lg">
<AvatarFallback>SK</AvatarFallback>
</Avatar>
</AlertDialogMedia>
<AlertDialogTitle>Remove Sara from the Designali studio?</AlertDialogTitle>
<AlertDialogDescription>
Sara will lose access immediately. Files she owns will be
transferred to you.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Remove member
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-26
"use client"
import * as React from "react"
import {
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table"
const initialInvoices = [
{ id: "INV-1042", client: "Designali client — Brand identity", amount: "$1,250.00" },
{ id: "INV-1043", client: "Designali client — UI/UX", amount: "$860.00" },
{ id: "INV-1044", client: "Designali client — Next.js site", amount: "$3,400.00" },
]
export function TableRowDeleteConfirm() {
const [invoices, setInvoices] = React.useState(initialInvoices)
return (
<div className="w-full max-w-md border">
<Table>
<TableHeader>
<TableRow>
<TableHead>Invoice</TableHead>
<TableHead>Client</TableHead>
<TableHead className="text-end">Amount</TableHead>
<TableHead className="w-10" />
</TableRow>
</TableHeader>
<TableBody>
{invoices.map((invoice) => (
<TableRow key={invoice.id}>
<TableCell className="font-sans text-xs">{invoice.id}</TableCell>
<TableCell>{invoice.client}</TableCell>
<TableCell className="text-end">{invoice.amount}</TableCell>
<TableCell>
<AlertDialog>
<AlertDialogTrigger
render={
<Button
variant="ghost"
size="icon-xs"
aria-label={"Delete " + invoice.id}
/>
}
>
<Trash2Icon />
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogTitle>Void {invoice.id}?</AlertDialogTitle>
<AlertDialogDescription>
{invoice.client} will be notified that this invoice is
no longer due.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
onClick={() =>
setInvoices((list) =>
list.filter((item) => item.id !== invoice.id)
)
}
>
Void
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</TableCell>
</TableRow>
))}
{invoices.length === 0 && (
<TableRow>
<TableCell
colSpan={4}
className="py-6 text-center text-muted-foreground"
>
No open invoices.
</TableCell>
</TableRow>
)}
</TableBody>
</Table>
</div>
)
}
alert-dialog-27
import {
CircleArrowDown as ArrowDownCircleIcon,
X as XIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
const losing = [
"All 460+ Designali blocks",
"240+ landing pages",
"Premium templates and Figma files",
"Priority support",
]
export function PlanDowngradeFeatureLoss() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
Downgrade to Starter
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<ArrowDownCircleIcon />
</AlertDialogMedia>
<AlertDialogTitle>Downgrade to Starter?</AlertDialogTitle>
<AlertDialogDescription>
Your Designali Business plan ends on your next billing date, July 1.
</AlertDialogDescription>
</AlertDialogHeader>
<div className="flex flex-col gap-2 border bg-muted/40 p-3">
<div className="flex items-center justify-between text-xs">
<span className="font-medium">You'll lose access to</span>
<Badge variant="destructive">{losing.length} features</Badge>
</div>
<ul className="flex flex-col gap-1.5 text-xs text-muted-foreground">
{losing.map((feature) => (
<li key={feature} className="flex items-center gap-2">
<XIcon className="size-3.5 text-destructive" />
{feature}
</li>
))}
</ul>
</div>
<AlertDialogFooter>
<AlertDialogCancel>Keep Business</AlertDialogCancel>
<AlertDialogAction variant="destructive">Downgrade</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-28
"use client"
import * as React from "react"
import {
Timer as TimerIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Progress } from "@/components/ui/progress"
export function SessionTimeoutCountdown() {
const [open, setOpen] = React.useState(false)
const [seconds, setSeconds] = React.useState(60)
React.useEffect(() => {
if (!open) return
const timer = setInterval(() => {
setSeconds((value) => (value > 0 ? value - 1 : 0))
}, 1000)
return () => clearInterval(timer)
}, [open])
function show() {
setSeconds(60)
setOpen(true)
}
return (
<>
<Button variant="outline" onClick={show}>
<TimerIcon data-icon="inline-start" />
Simulate idle timeout
</Button>
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<TimerIcon />
</AlertDialogMedia>
<AlertDialogTitle>Your designali.com session is about to expire</AlertDialogTitle>
<AlertDialogDescription>
For your security, you'll be signed out in{" "}
<span className="font-sans font-medium text-foreground tabular-nums">
0:{String(seconds).padStart(2, "0")}
</span>
.
</AlertDialogDescription>
</AlertDialogHeader>
<Progress value={(seconds / 60) * 100} />
<AlertDialogFooter>
<AlertDialogCancel>Sign out</AlertDialogCancel>
<AlertDialogAction onClick={() => setOpen(false)}>
Stay signed in
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</>
)
}
alert-dialog-29
"use client"
import * as React from "react"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import {
Field,
FieldContent,
FieldDescription,
FieldLabel,
} from "@/components/ui/field"
import {
RadioGroup,
RadioGroupItem,
} from "@/components/ui/radio-group"
export function DeleteUserReassignChoice() {
const [choice, setChoice] = React.useState("transfer")
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
Offboard Sara Khan
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Offboard Sara Khan?</AlertDialogTitle>
<AlertDialogDescription>
Sara owns 27 Figma files and 4 client projects. Choose what happens to
them.
</AlertDialogDescription>
</AlertDialogHeader>
<RadioGroup
value={choice}
onValueChange={(value) => setChoice(value as string)}
>
<Field orientation="horizontal">
<RadioGroupItem value="transfer" id="offboard-transfer" />
<FieldContent>
<FieldLabel htmlFor="offboard-transfer">
Transfer to me
</FieldLabel>
<FieldDescription>
Keep everything and become the new owner.
</FieldDescription>
</FieldContent>
</Field>
<Field orientation="horizontal">
<RadioGroupItem value="delete" id="offboard-delete" />
<FieldContent>
<FieldLabel htmlFor="offboard-delete">
Delete all content
</FieldLabel>
<FieldDescription>
Permanently remove her files and projects.
</FieldDescription>
</FieldContent>
</Field>
</RadioGroup>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
{choice === "delete"
? "Offboard and delete"
: "Offboard and transfer"}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-30
"use client"
import * as React from "react"
import {
Landmark as LandmarkIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import {
InputOTP,
InputOTPGroup,
InputOTPSeparator,
InputOTPSlot,
} from "@/components/ui/input-otp"
export function WireTransferOtpConfirm() {
const [code, setCode] = React.useState("")
return (
<AlertDialog onOpenChange={(open) => !open && setCode("")}>
<AlertDialogTrigger render={<Button />}>
<LandmarkIcon data-icon="inline-start" />
Confirm studio payment
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Send $18,000.00?</AlertDialogTitle>
<AlertDialogDescription>
Enter the code we sent to your phone ending in 07 to authorize this
transfer to the Designali studio account.
</AlertDialogDescription>
</AlertDialogHeader>
<div className="flex justify-center">
<InputOTP maxLength={6} value={code} onChange={setCode}>
<InputOTPGroup>
<InputOTPSlot index={0} />
<InputOTPSlot index={1} />
<InputOTPSlot index={2} />
</InputOTPGroup>
<InputOTPSeparator />
<InputOTPGroup>
<InputOTPSlot index={3} />
<InputOTPSlot index={4} />
<InputOTPSlot index={5} />
</InputOTPGroup>
</InputOTP>
</div>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction disabled={code.length < 6}>
Authorize transfer
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-31
"use client"
import * as React from "react"
import {
UserX as UserXIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Field, FieldError, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function PasswordReauthDelete() {
const [password, setPassword] = React.useState("")
const [error, setError] = React.useState("")
function handleDelete() {
if (password.length < 8) {
setError("That password doesn't look right. Try again.")
return
}
setError("")
}
return (
<AlertDialog
onOpenChange={(open) => {
if (!open) {
setPassword("")
setError("")
}
}}
>
<AlertDialogTrigger render={<Button variant="destructive" />}>
Delete account
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<UserXIcon />
</AlertDialogMedia>
<AlertDialogTitle>Delete your Designali account?</AlertDialogTitle>
<AlertDialogDescription>
Your downloads, licenses and data will be erased within 14 days. Confirm with your
password.
</AlertDialogDescription>
</AlertDialogHeader>
<Field data-invalid={Boolean(error)}>
<FieldLabel htmlFor="reauth-password">Current password</FieldLabel>
<Input
id="reauth-password"
type="password"
value={password}
aria-invalid={Boolean(error)}
onChange={(event) => setPassword(event.target.value)}
/>
{error && <FieldError>{error}</FieldError>}
</Field>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
onClick={handleDelete}
disabled={!password}
>
Delete account
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-32
"use client"
import * as React from "react"
import {
Archive as ArchiveIcon,
Undo2 as Undo2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ArchiveWithUndo() {
const [archived, setArchived] = React.useState(false)
if (archived) {
return (
<div className="flex w-full max-w-sm items-center justify-between gap-3 border bg-muted/40 px-3 py-2 text-sm">
<span className="flex items-center gap-2">
<ArchiveIcon className="size-4 text-muted-foreground" />
"Website refresh" archived
</span>
<Button variant="link" size="sm" onClick={() => setArchived(false)}>
<Undo2Icon data-icon="inline-start" />
Undo
</Button>
</div>
)
}
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<ArchiveIcon data-icon="inline-start" />
Archive project
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogTitle>
Archive "designali.com refresh"?
</AlertDialogTitle>
<AlertDialogDescription>
It will be hidden from the sidebar for all members.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction onClick={() => setArchived(true)}>
Archive
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-33
import {
BellRing as BellRingIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function StackedFullWidthFooter() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button />}>
Enable notifications
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader className="place-items-center text-center sm:group-data-[size=default]/alert-dialog-content:place-items-center sm:group-data-[size=default]/alert-dialog-content:text-center">
<AlertDialogMedia className="size-12 rounded-full">
<BellRingIcon />
</AlertDialogMedia>
<AlertDialogTitle>Stay in the loop</AlertDialogTitle>
<AlertDialogDescription>
Get notified when Designali drops new blocks, templates and icon
packs.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className="sm:flex-col-reverse sm:justify-stretch">
<AlertDialogCancel variant="ghost" className="w-full">
Not now
</AlertDialogCancel>
<AlertDialogAction className="w-full">
Allow notifications
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-34
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Kbd, KbdGroup } from "@/components/ui/kbd"
export function KeyboardShortcutHints() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
Close tab
<KbdGroup className="ms-1">
<Kbd>Ctrl</Kbd>
<Kbd>W</Kbd>
</KbdGroup>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Close with unsaved changes?</AlertDialogTitle>
<AlertDialogDescription>
"designali-homepage-copy.md" has edits that haven't been
saved.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>
Cancel <Kbd className="ms-1">Esc</Kbd>
</AlertDialogCancel>
<AlertDialogAction variant="destructive" autoFocus>
Close anyway <Kbd className="ms-1">Enter</Kbd>
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-35
"use client"
import * as React from "react"
import {
ScrollText as ScrollTextIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Checkbox } from "@/components/ui/checkbox"
import { Field, FieldLabel } from "@/components/ui/field"
import { ScrollArea } from "@/components/ui/scroll-area"
const changes = [
"Designali templates and blocks can be used in unlimited client projects.",
"Data for deleted designali.com accounts is kept for 30 days.",
"Studio services are billed per project, separately from plans.",
"You can export your full account data at any time from Settings.",
"The full terms live at designali.com/docs/legal/terms.",
]
export function TermsAcceptanceScroll() {
const [agreed, setAgreed] = React.useState(false)
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<ScrollTextIcon data-icon="inline-start" />
Review updated terms
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>
We've updated the Designali Terms of Service
</AlertDialogTitle>
<AlertDialogDescription>
Please review the summary below. The changes take effect on May 1.
</AlertDialogDescription>
</AlertDialogHeader>
<ScrollArea className="h-32 border">
<ol className="flex list-decimal flex-col gap-2 p-3 ps-7 text-xs text-muted-foreground">
{changes.map((change) => (
<li key={change}>{change}</li>
))}
</ol>
</ScrollArea>
<Field orientation="horizontal">
<Checkbox
id="agree-terms"
checked={agreed}
onCheckedChange={(checked) => setAgreed(checked === true)}
/>
<FieldLabel htmlFor="agree-terms" className="font-normal">
I have read and agree to the updated terms
</FieldLabel>
</Field>
<AlertDialogFooter>
<AlertDialogCancel>Remind me later</AlertDialogCancel>
<AlertDialogAction disabled={!agreed}>Accept</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-36
import {
FileVideoCamera as FileVideoIcon,
CloudUpload as UploadCloudIcon,
X as XIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Progress } from "@/components/ui/progress"
export function StopUploadProgress() {
return (
<div className="flex w-full max-w-sm flex-col gap-3 border p-4">
<div className="flex items-center gap-3">
<div className="flex size-9 items-center justify-center bg-muted">
<FileVideoIcon className="size-4" />
</div>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium">
designali-cgi-showreel.mp4
</p>
<p className="text-xs text-muted-foreground">
1.2 GB of 1.9 GB - 2 min left
</p>
</div>
<AlertDialog>
<AlertDialogTrigger
render={
<Button variant="ghost" size="icon-sm" aria-label="Stop upload" />
}
>
<XIcon />
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia>
<UploadCloudIcon />
</AlertDialogMedia>
<AlertDialogTitle>Stop uploading?</AlertDialogTitle>
<AlertDialogDescription>
63% is uploaded. You'll need to start over.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Keep going</AlertDialogCancel>
<AlertDialogAction variant="destructive">Stop</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
<Progress value={63} />
</div>
)
}
alert-dialog-37
import {
ServerOff as ServerOffIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
const impact = [
{ label: "Deployments", value: "126" },
{ label: "Domains", value: "3" },
{ label: "Env variables", value: "42" },
{ label: "Cron jobs", value: "5" },
]
export function EnvironmentImpactSummary() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="destructive" />}>
<ServerOffIcon data-icon="inline-start" />
Delete staging
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete the designali.com staging environment?</AlertDialogTitle>
<AlertDialogDescription>
The following resources will be destroyed and cannot be restored.
</AlertDialogDescription>
</AlertDialogHeader>
<div className="grid grid-cols-2 gap-px border bg-border">
{impact.map((item) => (
<div key={item.label} className="bg-popover p-3">
<p className="text-lg font-semibold tabular-nums">{item.value}</p>
<p className="text-xs text-muted-foreground">{item.label}</p>
</div>
))}
</div>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Delete environment
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-38
import {
CircleAlert as CircleAlertIcon,
CircleCheck as CircleCheckIcon,
Rocket as RocketIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
const checks = [
{ label: "All 248 tests passed", ok: true },
{ label: "Changelog updated", ok: true },
{ label: "2 open issues tagged for this release", ok: false },
]
export function PublishReleaseChecklist() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button />}>
<RocketIcon data-icon="inline-start" />
Publish v2.4.0
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Publish @designali/icons v2.4.0 to npm?</AlertDialogTitle>
<AlertDialogDescription>
Published versions can be deprecated but never overwritten.
</AlertDialogDescription>
</AlertDialogHeader>
<ul className="flex flex-col gap-2 text-sm">
{checks.map((check) => (
<li key={check.label} className="flex items-center gap-2">
{check.ok ? (
<CircleCheckIcon className="size-4 text-primary dark:text-primary" />
) : (
<CircleAlertIcon className="size-4 text-primary dark:text-primary" />
)}
<span className={cn(!check.ok && "text-muted-foreground")}>
{check.label}
</span>
</li>
))}
</ul>
<AlertDialogFooter>
<AlertDialogCancel>Not yet</AlertDialogCancel>
<AlertDialogAction>Publish release</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-39
"use client"
import * as React from "react"
import {
Construction as ConstructionIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import { Switch } from "@/components/ui/switch"
export function SwitchToggleConfirmation() {
const [enabled, setEnabled] = React.useState(false)
const [open, setOpen] = React.useState(false)
return (
<div className="flex w-full max-w-sm items-center justify-between gap-4 border p-4">
<div>
<p className="text-sm font-medium">Maintenance mode</p>
<p className="text-xs text-muted-foreground">
{enabled ? "Visitors see a maintenance page" : "designali.com is live"}
</p>
</div>
<Switch
checked={enabled}
onCheckedChange={(checked) =>
checked ? setOpen(true) : setEnabled(false)
}
aria-label="Maintenance mode"
/>
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-primary/10 text-primary dark:text-primary">
<ConstructionIcon />
</AlertDialogMedia>
<AlertDialogTitle>Turn on maintenance mode?</AlertDialogTitle>
<AlertDialogDescription>
Customers won't be able to browse or buy Designali templates
until you turn it off.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
onClick={() => {
setEnabled(true)
setOpen(false)
}}
>
Turn on
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-40
"use client"
import * as React from "react"
import {
ArrowLeft as ArrowLeftIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field"
import { Input } from "@/components/ui/input"
export function UnsavedChangesThreeActions() {
const [name, setName] = React.useState("Acme Field Ops")
const [saved, setSaved] = React.useState("Acme Field Ops")
const [open, setOpen] = React.useState(false)
const dirty = name !== saved
return (
<div className="flex w-full max-w-sm flex-col gap-3 border p-4">
<Field>
<FieldLabel htmlFor="team-name">Team name</FieldLabel>
<Input
id="team-name"
value={name}
onChange={(event) => setName(event.target.value)}
/>
<FieldDescription>
{dirty ? "You have unsaved changes." : "All changes saved."}
</FieldDescription>
</Field>
<Button
variant="outline"
onClick={() => (dirty ? setOpen(true) : undefined)}
>
<ArrowLeftIcon data-icon="inline-start" />
Back to teams
</Button>
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Save changes before leaving?</AlertDialogTitle>
<AlertDialogDescription>
Your edits to this Designali team will be lost if you don't save them.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel variant="ghost" className="sm:me-auto">
Cancel
</AlertDialogCancel>
<AlertDialogAction
variant="outline"
onClick={() => {
setName(saved)
setOpen(false)
}}
>
Discard
</AlertDialogAction>
<AlertDialogAction
onClick={() => {
setSaved(name)
setOpen(false)
}}
>
Save
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)
}
alert-dialog-41
import {
CircleX as CircleXIcon,
RefreshCw as RefreshCwIcon,
RefreshCwOff as RefreshCwOffIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function SyncErrorRetry() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<RefreshCwOffIcon data-icon="inline-start" />
Sync failed
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<CircleXIcon />
</AlertDialogMedia>
<AlertDialogTitle>Couldn't sync your Figma files</AlertDialogTitle>
<AlertDialogDescription>
The provider rejected our request. Check your connection or{" "}
<a href="#">reconnect the account</a>.
</AlertDialogDescription>
</AlertDialogHeader>
<pre className="overflow-x-auto bg-muted p-3 font-mono text-xs text-muted-foreground">
ERR_TOKEN_EXPIRED (401){"\n"}request_id: 7f3a-91c2-bb04
</pre>
<AlertDialogFooter>
<AlertDialogCancel>Dismiss</AlertDialogCancel>
<AlertDialogAction>
<RefreshCwIcon data-icon="inline-start" />
Try again
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-42
import {
ArrowRight as ArrowRightIcon,
AtSign as AtSignIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function EmailChangeConfirm() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="secondary" />}>
<AtSignIcon data-icon="inline-start" />
Update email
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Change your sign-in email?</AlertDialogTitle>
<AlertDialogDescription>
We'll send a verification link to the new address. Until then,
keep using your current one.
</AlertDialogDescription>
</AlertDialogHeader>
<div className="flex flex-col gap-2 border p-3 text-sm sm:flex-row sm:items-center">
<span className="min-w-0 truncate text-muted-foreground line-through">
ali@example.com
</span>
<ArrowRightIcon className="size-4 shrink-0 rotate-90 text-muted-foreground sm:rotate-0" />
<span className="min-w-0 truncate font-medium">
ali@designali.com
</span>
</div>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Send verification</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-43
"use client"
import * as React from "react"
import {
CalendarX as CalendarXIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field"
import { Switch } from "@/components/ui/switch"
import { Textarea } from "@/components/ui/textarea"
export function CancelEventNotifyGuests() {
const [notify, setNotify] = React.useState(true)
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<CalendarXIcon data-icon="inline-start" />
Cancel event
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>
Cancel "Designali client kickoff"?
</AlertDialogTitle>
<AlertDialogDescription>
Thu, Sep 12 - 10:00-11:30 AM - 12 guests
</AlertDialogDescription>
</AlertDialogHeader>
<FieldGroup className="gap-4">
<Field orientation="horizontal">
<FieldLabel htmlFor="notify-guests" className="flex-1">
Email guests about the cancellation
</FieldLabel>
<Switch
id="notify-guests"
checked={notify}
onCheckedChange={setNotify}
/>
</Field>
{notify && (
<Field>
<FieldLabel htmlFor="cancel-note">Message (optional)</FieldLabel>
<Textarea
id="cancel-note"
placeholder="We'll reschedule after the Figma review."
className="min-h-16"
/>
</Field>
)}
</FieldGroup>
<AlertDialogFooter>
<AlertDialogCancel>Keep event</AlertDialogCancel>
<AlertDialogAction variant="destructive">
{notify ? "Cancel and notify" : "Cancel event"}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-44
"use client"
import * as React from "react"
import {
ShoppingCart as ShoppingCartIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function CartRemoveItem() {
const [removed, setRemoved] = React.useState(false)
return (
<div className="flex w-full max-w-sm flex-col gap-3 border p-4">
{removed ? (
<p className="py-4 text-center text-sm text-muted-foreground">
Your cart is empty.
</p>
) : (
<div className="flex items-center gap-3">
<div className="size-14 shrink-0 bg-linear-to-br from-chart-1 to-primary" />
<div className="min-w-0 flex-1">
<p className="text-sm font-medium">Design Agency template</p>
<p className="text-xs text-muted-foreground">Next.js - Personal license</p>
<p className="mt-1 text-sm font-semibold">$64.00</p>
</div>
<AlertDialog>
<AlertDialogTrigger render={<Button variant="ghost" size="sm" />}>
Remove
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogMedia>
<ShoppingCartIcon />
</AlertDialogMedia>
<AlertDialogTitle>Remove from cart?</AlertDialogTitle>
<AlertDialogDescription>
Launch pricing ends soon.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Keep</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
onClick={() => setRemoved(true)}
>
Remove
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
)}
<Button disabled={removed} className="w-full">
Checkout
</Button>
</div>
)
}
alert-dialog-45
import {
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function ChatDeleteMessageScope() {
return (
<div className="flex w-full max-w-sm flex-col items-end gap-1">
<div className="group flex items-center gap-1">
<AlertDialog>
<AlertDialogTrigger
render={
<Button
variant="ghost"
size="icon-xs"
aria-label="Delete message"
className="opacity-60 group-hover:opacity-100"
/>
}
>
<Trash2Icon />
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete message?</AlertDialogTitle>
<AlertDialogDescription>
Deleting for everyone removes it from Ali's chat too.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="outline">
Delete for me
</AlertDialogAction>
<AlertDialogAction variant="destructive">
Delete for everyone
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
<div className="max-w-60 bg-primary px-3 py-2 text-sm text-primary-foreground">
Sending the Figma file now, can you double-check the hero section?
</div>
</div>
<span className="text-[10px] text-muted-foreground">
Delivered - 9:41 AM
</span>
</div>
)
}
alert-dialog-46
"use client"
import * as React from "react"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
export function DecisionResultTracking() {
const [open, setOpen] = React.useState(false)
const [result, setResult] = React.useState<
"none" | "confirmed" | "dismissed"
>("none")
return (
<div className="flex flex-col items-center gap-3">
<AlertDialog
open={open}
onOpenChange={(next) => {
setOpen(next)
if (!next && result !== "confirmed") setResult("dismissed")
}}
>
<AlertDialogTrigger
render={
<Button variant="outline" onClick={() => setResult("none")} />
}
>
Reset analytics data
</AlertDialogTrigger>
<AlertDialogContent size="sm">
<AlertDialogHeader>
<AlertDialogTitle>Reset analytics?</AlertDialogTitle>
<AlertDialogDescription>
designali.com page views and events from the last 90 days will be cleared.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
onClick={() => {
setResult("confirmed")
setOpen(false)
}}
>
Reset
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
<Badge variant={result === "confirmed" ? "destructive" : "secondary"}>
Last decision: {result === "none" ? "pending" : result}
</Badge>
</div>
)
}
alert-dialog-47
import {
Trash2 as Trash2Icon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
export function EmptyTrashCountBadge() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<Trash2Icon data-icon="inline-start" />
Empty Trash
<Badge variant="secondary" className="ms-1">
57
</Badge>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<Trash2Icon />
</AlertDialogMedia>
<AlertDialogTitle>Permanently delete 57 items?</AlertDialogTitle>
<AlertDialogDescription>
This frees up 3.6 GB of Designali assets. Items in Trash can't be recovered once
deleted.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive">
Empty Trash
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-48
import {
GlobeLock as GlobeLockIcon,
MapPin as MapPinIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
export function DescriptionWithLearnMoreLink() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="outline" />}>
<MapPinIcon data-icon="inline-start" />
Move data to EU region
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogMedia>
<GlobeLockIcon />
</AlertDialogMedia>
<AlertDialogTitle>Migrate your Designali workspace to the EU?</AlertDialogTitle>
<AlertDialogDescription>
Migration runs overnight and the workspace is read-only for up to 2
hours. <a href="#">Learn how data residency works</a>.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Not now</AlertDialogCancel>
<AlertDialogAction>Schedule migration</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-49
"use client"
import * as React from "react"
import {
Crown as CrownIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Field, FieldLabel } from "@/components/ui/field"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
const admins = [
{ value: null, label: "Choose an admin" },
{ value: "ali", label: "Ali Imam" },
{ value: "sara", label: "Sara Khan" },
{ value: "zaid", label: "Zaid Ahmed" },
]
export function TransferOwnershipSelect() {
const [owner, setOwner] = React.useState<string | null>(null)
return (
<AlertDialog onOpenChange={(open) => !open && setOwner(null)}>
<AlertDialogTrigger render={<Button variant="outline" />}>
<CrownIcon data-icon="inline-start" />
Transfer ownership
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Transfer Designali workspace ownership</AlertDialogTitle>
<AlertDialogDescription>
The new owner gets full billing and admin control. You'll
become an admin.
</AlertDialogDescription>
</AlertDialogHeader>
<Field>
<FieldLabel>New owner</FieldLabel>
<Select
items={admins}
value={owner}
onValueChange={(value) => setOwner(value as string | null)}
>
<SelectTrigger className="w-full">
<SelectValue />
</SelectTrigger>
<SelectContent>
{admins
.filter((admin) => admin.value)
.map((admin) => (
<SelectItem key={admin.value} value={admin.value}>
{admin.label}
</SelectItem>
))}
</SelectContent>
</Select>
</Field>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction disabled={!owner}>Transfer</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
alert-dialog-50
import {
Receipt as ReceiptIcon,
} from "@designali/icons"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Separator } from "@/components/ui/separator"
const lines = [
{ label: "Design Agency template", value: "$89.00" },
{ label: "Extended license", value: "$6.50" },
{ label: "Tax", value: "$7.64" },
]
export function RefundOrderAmount() {
return (
<AlertDialog>
<AlertDialogTrigger render={<Button variant="secondary" />}>
<ReceiptIcon data-icon="inline-start" />
Refund order #5821
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Issue a full refund?</AlertDialogTitle>
<AlertDialogDescription>
The designali.com customer will be refunded to their original payment
method.
</AlertDialogDescription>
</AlertDialogHeader>
<dl className="flex flex-col gap-1.5 border p-3 text-sm">
{lines.map((line) => (
<div key={line.label} className="flex justify-between">
<dt className="text-muted-foreground">{line.label}</dt>
<dd className="tabular-nums">{line.value}</dd>
</div>
))}
<Separator className="my-1" />
<div className="flex justify-between font-medium">
<dt>Refund total</dt>
<dd className="tabular-nums">$103.14</dd>
</div>
</dl>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Refund $103.14</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Calendar
- Card
- Carousel
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Dialog
- Drawer
- Dropdown Menu
- Field
- Hover Card
- Input
- Input OTP
- Label
- Menubar
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip