chore: icon cleanup (#13770)

Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-04-03 23:23:57 +00:00
1 parent 7421cea0da
commit 3f02de8214
294 files changed
+3161 -1715

No files matched your search

@@ -17,7 +17,6 @@ import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { HorizontalTabItemProps, VerticalTabItemProps } from "@calcom/ui";
import { Alert, Button, EmptyScreen, HorizontalTabs } from "@calcom/ui";
import { Calendar } from "@calcom/ui/components/icon";
import { useInViewObserver } from "@lib/hooks/useInViewObserver";
import useMeQuery from "@lib/hooks/useMeQuery";
@@ -241,7 +240,7 @@ export default function Bookings() {
{query.status === "success" && isEmpty && (
<div className="flex items-center justify-center pt-2 xl:pt-0">
<EmptyScreen
Icon={Calendar}
Icon="calendar"
headline={t("no_status_bookings_yet", { status: t(status).toLowerCase() })}
description={t("no_status_bookings_yet_description", {
status: t(status).toLowerCase(),
@@ -45,8 +45,7 @@ import { getIs24hClockFromLocalStorage, isBrowserLocale24h } from "@calcom/lib/t
import { localStorage } from "@calcom/lib/webstorage";
import { BookingStatus } from "@calcom/prisma/enums";
import { bookingMetadataSchema } from "@calcom/prisma/zod-utils";
import { Alert, Badge, Button, EmailInput, HeadSeo, useCalcomTheme } from "@calcom/ui";
import { AlertCircle, Calendar, Check, ChevronLeft, ExternalLink, X } from "@calcom/ui/components/icon";
import { Alert, Badge, Button, EmailInput, HeadSeo, Icon, useCalcomTheme } from "@calcom/ui";
import { timeZone } from "@lib/clock";
@@ -313,7 +312,7 @@ export default function Success(props: PageProps) {
href={allRemainingBookings ? "/bookings/recurring" : "/bookings/upcoming"}
data-testid="back-to-bookings"
className="hover:bg-subtle text-subtle hover:text-default mt-2 inline-flex px-1 py-2 text-sm dark:hover:bg-transparent">
<ChevronLeft className="h-5 w-5 rtl:rotate-180" /> {t("back_to_bookings")}
<Icon name="chevron-left" className="h-5 w-5 rtl:rotate-180" /> {t("back_to_bookings")}
</Link>
</div>
)}
@@ -357,10 +356,12 @@ export default function Success(props: PageProps) {
<img src={giphyImage} alt="Gif from Giphy" />
)}
{!giphyImage && !needsConfirmation && !isCancelled && (
<Check className="h-5 w-5 text-green-600 dark:text-green-400" />
<Icon name="check" className="h-5 w-5 text-green-600 dark:text-green-400" />
)}
{needsConfirmation && !isCancelled && <Calendar className="text-emphasis h-5 w-5" />}
{isCancelled && <X className="h-5 w-5 text-red-600 dark:text-red-200" />}
{needsConfirmation && !isCancelled && (
<Icon name="calendar" className="text-emphasis h-5 w-5" />
)}
{isCancelled && <Icon name="x" className="h-5 w-5 text-red-600 dark:text-red-200" />}
</div>
<div className="mb-8 mt-6 text-center last:mb-0">
<h3
@@ -784,7 +785,7 @@ export default function Success(props: PageProps) {
</span>
</div>
}
CustomIcon={AlertCircle}
CustomIcon="circle-alert"
customIconColor="text-attention dark:text-orange-200"
/>
)}
@@ -813,7 +814,7 @@ const DisplayLocation = ({
className={classNames("text-default flex items-center gap-2", className)}
rel="noreferrer">
{providerName || "Link"}
<ExternalLink className="text-default inline h-4 w-4" />
<Icon name="external-link" className="text-default inline h-4 w-4" />
</a>
) : (
<p className={className}>{locationToDisplay}</p>
@@ -50,6 +50,7 @@ import {
EmptyScreen,
HeadSeo,
HorizontalTabs,
Icon,
Label,
showToast,
Skeleton,
@@ -58,20 +59,6 @@ import {
ArrowButton,
UserAvatarGroup,
} from "@calcom/ui";
import {
Clipboard,
Code,
Copy,
Edit,
Edit2,
ExternalLink,
Link as LinkIcon,
MoreHorizontal,
Trash,
Upload,
Users,
VenetianMask,
} from "@calcom/ui/components/icon";
import type { AppProps } from "@lib/app-providers";
import useMeQuery from "@lib/hooks/useMeQuery";
@@ -476,7 +463,7 @@ export const EventTypeList = ({
target="_blank"
variant="icon"
href={calLink}
StartIcon={ExternalLink}
StartIcon="external-link"
/>
</Tooltip>
@@ -484,7 +471,7 @@ export const EventTypeList = ({
<Button
color="secondary"
variant="icon"
StartIcon={LinkIcon}
StartIcon="link"
onClick={() => {
showToast(t("link_copied"), "success");
navigator.clipboard.writeText(calLink);
@@ -497,7 +484,7 @@ export const EventTypeList = ({
<Button
color="secondary"
variant="icon"
StartIcon={VenetianMask}
StartIcon="venetian-mask"
onClick={() => {
showToast(t("private_link_copied"), "success");
navigator.clipboard.writeText(placeholderHashedLink);
@@ -513,7 +500,7 @@ export const EventTypeList = ({
type="button"
variant="icon"
color="secondary"
StartIcon={MoreHorizontal}
StartIcon="ellipsis"
className="ltr:radix-state-open:rounded-r-md rtl:radix-state-open:rounded-l-md"
/>
</DropdownMenuTrigger>
@@ -523,7 +510,7 @@ export const EventTypeList = ({
<DropdownItem
type="button"
data-testid={`event-type-edit-${type.id}`}
StartIcon={Edit2}
StartIcon="pencil"
onClick={() => router.push(`/event-types/${type.id}`)}>
{t("edit")}
</DropdownItem>
@@ -535,7 +522,7 @@ export const EventTypeList = ({
<DropdownItem
type="button"
data-testid={`event-type-duplicate-${type.id}`}
StartIcon={Copy}
StartIcon="copy"
onClick={() => openDuplicateModal(type, group)}>
{t("duplicate")}
</DropdownItem>
@@ -548,7 +535,7 @@ export const EventTypeList = ({
namespace=""
as={DropdownItem}
type="button"
StartIcon={Code}
StartIcon="code"
className="w-full rounded-none"
embedUrl={encodeURIComponent(embedLink)}
eventId={type.id}>
@@ -569,7 +556,7 @@ export const EventTypeList = ({
setDeleteDialogTypeId(type.id);
setDeleteDialogSchedulingType(type.schedulingType);
}}
StartIcon={Trash}
StartIcon="trash"
className="w-full rounded-none">
{t("delete")}
</DropdownItem>
@@ -586,7 +573,7 @@ export const EventTypeList = ({
<div className="min-w-9 mx-5 flex sm:hidden">
<Dropdown>
<DropdownMenuTrigger asChild data-testid={`event-type-options-${type.id}`}>
<Button type="button" variant="icon" color="secondary" StartIcon={MoreHorizontal} />
<Button type="button" variant="icon" color="secondary" StartIcon="ellipsis" />
</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuContent>
@@ -596,7 +583,7 @@ export const EventTypeList = ({
<DropdownItem
href={calLink}
target="_blank"
StartIcon={ExternalLink}
StartIcon="external-link"
className="w-full rounded-none">
{t("preview")}
</DropdownItem>
@@ -608,7 +595,7 @@ export const EventTypeList = ({
navigator.clipboard.writeText(calLink);
showToast(t("link_copied"), "success");
}}
StartIcon={Clipboard}
StartIcon="clipboard"
className="w-full rounded-none text-left">
{t("copy_link")}
</DropdownItem>
@@ -629,7 +616,7 @@ export const EventTypeList = ({
.then(() => showToast(t("link_shared"), "success"))
.catch(() => showToast(t("failed"), "error"));
}}
StartIcon={Upload}
StartIcon="upload"
className="w-full rounded-none">
{t("share")}
</DropdownItem>
@@ -639,7 +626,7 @@ export const EventTypeList = ({
<DropdownMenuItem className="outline-none">
<DropdownItem
onClick={() => router.push(`/event-types/${type.id}`)}
StartIcon={Edit}
StartIcon="pencil"
className="w-full rounded-none">
{t("edit")}
</DropdownItem>
@@ -649,7 +636,7 @@ export const EventTypeList = ({
<DropdownMenuItem className="outline-none">
<DropdownItem
onClick={() => openDuplicateModal(type, group)}
StartIcon={Copy}
StartIcon="copy"
data-testid={`event-type-duplicate-${type.id}`}>
{t("duplicate")}
</DropdownItem>
@@ -667,7 +654,7 @@ export const EventTypeList = ({
setDeleteDialogTypeId(type.id);
setDeleteDialogSchedulingType(type.schedulingType);
}}
StartIcon={Trash}
StartIcon="trash"
className="w-full rounded-none">
{t("delete")}
</DropdownItem>
@@ -768,7 +755,7 @@ const EventTypeListHeading = ({
<span className="text-subtle relative -top-px me-2 ms-2 text-xs">
<Link href={`/settings/teams/${teamId}/members`}>
<Badge variant="gray">
<Users className="-mt-px mr-1 inline h-3 w-3" />
<Icon name="users" className="-mt-px mr-1 inline h-3 w-3" />
{membershipCount}
</Badge>
</Link>
@@ -796,7 +783,7 @@ const CreateFirstEventTypeView = ({ slug }: { slug: string }) => {
return (
<EmptyScreen
Icon={LinkIcon}
Icon="link"
headline={t("new_event_type_heading")}
description={t("new_event_type_description")}
className="mb-16"
@@ -17,8 +17,7 @@ import EmptyPage from "@calcom/features/eventtypes/components/EmptyPage";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
import useTheme from "@calcom/lib/hooks/useTheme";
import { HeadSeo, UnpublishedEntity, UserAvatar } from "@calcom/ui";
import { ArrowRight, Verified } from "@calcom/ui/components/icon";
import { HeadSeo, Icon, UnpublishedEntity, UserAvatar } from "@calcom/ui";
import { type getServerSideProps } from "./users-public-view.getServerSideProps";
@@ -121,10 +120,16 @@ export function UserPage(props: InferGetServerSidePropsType<typeof getServerSide
<h1 className="font-cal text-emphasis my-1 text-3xl" data-testid="name-title">
{profile.name}
{!isOrg && user.verified && (
<Verified className=" mx-1 -mt-1 inline h-6 w-6 fill-blue-500 text-white dark:text-black" />
<Icon
name="badge-check"
className=" mx-1 -mt-1 inline h-6 w-6 fill-blue-500 text-white dark:text-black"
/>
)}
{isOrg && (
<Verified className=" mx-1 -mt-1 inline h-6 w-6 fill-yellow-500 text-white dark:text-black" />
<Icon
name="badge-check"
className=" mx-1 -mt-1 inline h-6 w-6 fill-yellow-500 text-white dark:text-black"
/>
)}
</h1>
{!isBioEmpty && (
@@ -153,7 +158,10 @@ export function UserPage(props: InferGetServerSidePropsType<typeof getServerSide
key={type.id}
style={{ display: "flex", ...eventTypeListItemEmbedStyles }}
className="bg-default border-subtle dark:bg-muted dark:hover:bg-emphasis hover:bg-muted group relative border-b first:rounded-t-md last:rounded-b-md last:border-b-0">
<ArrowRight className="text-emphasis absolute right-4 top-4 h-4 w-4 opacity-0 transition-opacity group-hover:opacity-100" />
<Icon
name="arrow-right"
className="text-emphasis absolute right-4 top-4 h-4 w-4 opacity-0 transition-opacity group-hover:opacity-100"
/>
{/* Don't prefetch till the time we drop the amount of javascript in [user][type] page which is impacting score for [user] page */}
<div className="block w-full p-5">
<Link
@@ -3,8 +3,7 @@
import dayjs from "@calcom/dayjs";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { detectBrowserTimeFormat } from "@calcom/lib/timeFormat";
import { Button, HeadSeo } from "@calcom/ui";
import { ArrowRight, Calendar, X } from "@calcom/ui/components/icon";
import { Button, HeadSeo, Icon } from "@calcom/ui";
import { type PageProps } from "./videos-meeting-ended-single-view.getServerSideProps";
@@ -28,7 +27,7 @@ export default function MeetingUnavailable(props: PageProps) {
aria-labelledby="modal-headline">
<div>
<div className="bg-error mx-auto flex h-12 w-12 items-center justify-center rounded-full">
<X className="h-6 w-6 text-red-600" />
<Icon name="x" className="h-6 w-6 text-red-600" />
</div>
<div className="mt-3 text-center sm:mt-5">
<h3 className="text-emphasis text-lg font-medium leading-6" id="modal-headline">
@@ -40,14 +39,14 @@ export default function MeetingUnavailable(props: PageProps) {
{props.booking.title}
</h2>
<p className="text-subtle text-center">
<Calendar className="-mt-1 mr-1 inline-block h-4 w-4" />
<Icon name="calendar" className="-mt-1 mr-1 inline-block h-4 w-4" />
{dayjs(props.booking.startTime).format(`${detectBrowserTimeFormat}, dddd DD MMMM YYYY`)}
</p>
</div>
</div>
<div className="mt-5 text-center sm:mt-6">
<div className="mt-5">
<Button data-testid="return-home" href="/event-types" EndIcon={ArrowRight}>
<Button data-testid="return-home" href="/event-types" EndIcon="arrow-right">
{t("go_back")}
</Button>
</div>
@@ -3,8 +3,7 @@
import dayjs from "@calcom/dayjs";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { detectBrowserTimeFormat } from "@calcom/lib/timeFormat";
import { Button, HeadSeo, EmptyScreen } from "@calcom/ui";
import { ArrowRight, Calendar, Clock } from "@calcom/ui/components/icon";
import { Button, HeadSeo, Icon, EmptyScreen } from "@calcom/ui";
import { type PageProps } from "./videos-meeting-not-started-single-view.getServerSideProps";
@@ -15,19 +14,19 @@ export default function MeetingNotStarted(props: PageProps) {
<HeadSeo title={t("this_meeting_has_not_started_yet")} description={props.booking.title} />
<main className="mx-auto my-24 max-w-3xl">
<EmptyScreen
Icon={Clock}
Icon="clock"
headline={t("this_meeting_has_not_started_yet")}
description={
<>
<h2 className="mb-2 text-center font-medium">{props.booking.title}</h2>
<p className="text-subtle text-center">
<Calendar className="-mt-1 mr-1 inline-block h-4 w-4" />
<Icon name="calendar" className="-mt-1 mr-1 inline-block h-4 w-4" />
{dayjs(props.booking.startTime).format(`${detectBrowserTimeFormat}, dddd DD MMMM YYYY`)}
</p>
</>
}
buttonRaw={
<Button data-testid="return-home" href="/event-types" EndIcon={ArrowRight}>
<Button data-testid="return-home" href="/event-types" EndIcon="arrow-right">
{t("go_back")}
</Button>
}
@@ -2,7 +2,6 @@
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, EmptyScreen, HeadSeo } from "@calcom/ui";
import { X, ArrowRight } from "@calcom/ui/components/icon";
export default function NoMeetingFound() {
const { t } = useLocale();
@@ -12,11 +11,11 @@ export default function NoMeetingFound() {
<HeadSeo title={t("no_meeting_found")} description={t("no_meeting_found")} />
<main className="mx-auto my-24 max-w-3xl">
<EmptyScreen
Icon={X}
Icon="x"
headline={t("no_meeting_found")}
description={t("no_meeting_found_description")}
buttonRaw={
<Button data-testid="return-home" href="/event-types" EndIcon={ArrowRight}>
<Button data-testid="return-home" href="/event-types" EndIcon="arrow-right">
{t("go_back_home")}
</Button>
}
@@ -10,7 +10,7 @@ import { APP_NAME, SEO_IMG_OGIMG_VIDEO, WEBSITE_URL } from "@calcom/lib/constant
import { formatToLocalizedDate, formatToLocalizedTime } from "@calcom/lib/date-fns";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
import { ChevronRight } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import { type PageProps } from "./videos-single-view.getServerSideProps";
@@ -231,7 +231,8 @@ export function VideoMeetingInfo(props: VideoMeetingInfo) {
aria-label={`${open ? "close" : "open"} booking description sidebar`}
className="h-20 w-6 rounded-r-md border border-l-0 border-gray-300/20 bg-black/60 text-white shadow-sm backdrop-blur-lg"
onClick={() => setOpen(!open)}>
<ChevronRight
<Icon
name="chevron-right"
aria-hidden
className={classNames(open && "rotate-180", "w-5 transition-all duration-300 ease-in-out")}
/>