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

+3 -4
View File
@@ -5,8 +5,7 @@ import { useTranslation } from "react-i18next";
import { useAppContextWithSchema } from "@calcom/app-store/EventTypeAppContext";
import { classNames } from "@calcom/lib";
import type { RouterOutputs } from "@calcom/trpc/react";
import { Switch, Badge, Avatar, Button } from "@calcom/ui";
import { Settings } from "@calcom/ui/components/icon";
import { Switch, Badge, Avatar, Button, Icon } from "@calcom/ui";
import type { CredentialOwner } from "../types";
import OmniInstallAppButton from "./OmniInstallAppButton";
@@ -128,7 +127,7 @@ export default function AppCard({
<div className="relative p-4 pt-5 text-sm [&_input]:mb-0 [&_input]:leading-4">
{!hideSettingsIcon && (
<Link href={`/apps/${app.slug}/setup`} className="absolute right-4 top-4">
<Settings className="text-default h-4 w-4" aria-hidden="true" />
<Icon name="settings" className="text-default h-4 w-4" aria-hidden="true" />
</Link>
)}
{children}
@@ -137,7 +136,7 @@ export default function AppCard({
<div className="flex h-64 w-full flex-col items-center justify-center gap-4 ">
<p>{t("this_app_is_not_setup_already")}</p>
<Link href={`/apps/${app.slug}/setup`}>
<Button StartIcon={Settings}>{t("setup")}</Button>
<Button StartIcon="settings">{t("setup")}</Button>
</Link>
</div>
)
@@ -3,7 +3,6 @@ import useApp from "@calcom/lib/hooks/useApp";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, showToast } from "@calcom/ui";
import { Plus } from "@calcom/ui/components/icon";
import useAddAppMutation from "../_utils/useAddAppMutation";
import { InstallAppButton } from "../components";
@@ -74,7 +73,7 @@ export default function OmniInstallAppButton({
loading={mutation.isPending}
color="secondary"
className="[@media(max-width:260px)]:w-full [@media(max-width:260px)]:justify-center"
StartIcon={Plus}
StartIcon="plus"
{...props}>
{t("add")}
</Button>
+10 -20
View File
@@ -1,16 +1,6 @@
import { WEBAPP_URL } from "@calcom/lib/constants";
import type { AppCategories } from "@calcom/prisma/enums";
import type { LucideIcon } from "@calcom/ui/components/icon";
import {
Calendar,
Video,
CreditCard,
Share2,
BarChart,
Grid,
Mail,
Contact,
} from "@calcom/ui/components/icon";
import type { IconName } from "@calcom/ui";
function getHref(baseURL: string, category: string, useQueryParam: boolean) {
const baseUrlParsed = new URL(baseURL, WEBAPP_URL);
@@ -21,7 +11,7 @@ function getHref(baseURL: string, category: string, useQueryParam: boolean) {
type AppCategoryEntry = {
name: AppCategories;
href: string;
icon: LucideIcon;
icon: IconName;
};
const getAppCategories = (baseURL: string, useQueryParam: boolean): AppCategoryEntry[] => {
@@ -31,42 +21,42 @@ const getAppCategories = (baseURL: string, useQueryParam: boolean): AppCategoryE
{
name: "analytics",
href: getHref(baseURL, "analytics", useQueryParam),
icon: BarChart,
icon: "bar-chart",
},
{
name: "automation",
href: getHref(baseURL, "automation", useQueryParam),
icon: Share2,
icon: "share-2",
},
{
name: "calendar",
href: getHref(baseURL, "calendar", useQueryParam),
icon: Calendar,
icon: "calendar",
},
{
name: "conferencing",
href: getHref(baseURL, "conferencing", useQueryParam),
icon: Video,
icon: "video",
},
{
name: "crm",
href: getHref(baseURL, "crm", useQueryParam),
icon: Contact,
icon: "contact",
},
{
name: "messaging",
href: getHref(baseURL, "messaging", useQueryParam),
icon: Mail,
icon: "mail",
},
{
name: "payment",
href: getHref(baseURL, "payment", useQueryParam),
icon: CreditCard,
icon: "credit-card",
},
{
name: "other",
href: getHref(baseURL, "other", useQueryParam),
icon: Grid,
icon: "grid-3x3",
},
];
};
@@ -9,9 +9,7 @@ import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useCopy } from "@calcom/lib/hooks/useCopy";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc";
import { Button } from "@calcom/ui";
import { showToast } from "@calcom/ui";
import { ClipboardCheck, Clipboard } from "@calcom/ui/components/icon";
import { Button, showToast } from "@calcom/ui";
import { Spinner } from "@calcom/ui/components/icon/Spinner";
interface IAlbyPaymentComponentProps {
@@ -99,7 +97,7 @@ export const AlbyPaymentComponent = (props: IAlbyPaymentComponentProps) => {
color="secondary"
onClick={() => copyToClipboard(paymentRequest)}
className="text-subtle rounded-md"
StartIcon={isCopied ? ClipboardCheck : Clipboard}>
StartIcon={isCopied ? "clipboard-check" : "clipboard"}>
Copy Invoice
</Button>
<Link target="_blank" href="https://getalby.com" className="link mt-4 text-sm underline">
@@ -8,7 +8,7 @@ import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc";
import { Badge, Button, showToast } from "@calcom/ui";
import { Info } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import { albyCredentialKeysSchema } from "../../lib/albyCredentialKeysSchema";
@@ -169,9 +169,9 @@ function AlbySetupPage(props: IAlbySetupProps) {
{/* TODO: remove when invoices are generated using user identifier */}
<div className="mt-4 rounded bg-blue-50 p-3 text-sm text-blue-700 dark:bg-blue-950 dark:text-blue-300">
<Info className="mb-0.5 inline-flex h-4 w-4" /> Your Alby lightning address will be used to
generate invoices. If you update your lightning address, please disconnect and setup the Alby
app again.
<Icon name="info" className="mb-0.5 inline-flex h-4 w-4" /> Your Alby lightning address will be
used to generate invoices. If you update your lightning address, please disconnect and setup the
Alby app again.
</div>
<Link href="/apps/alby">
<Button color="secondary">Go to App Store Listing</Button>
@@ -7,7 +7,6 @@ import z from "zod";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Form, showToast, TextField } from "@calcom/ui";
import { Check, X } from "@calcom/ui/components/icon";
const formSchema = z.object({
api_key: z.string(),
@@ -107,7 +106,7 @@ export default function CloseComSetup() {
type="submit"
loading={testLoading}
disabled={testPassed === true}
StartIcon={testPassed !== undefined ? (testPassed ? Check : X) : undefined}
StartIcon={testPassed === undefined ? undefined : testPassed ? "check" : "x"}
className={
testPassed !== undefined
? testPassed
+4 -4
View File
@@ -11,7 +11,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import type { App } from "@calcom/types/App";
import { AlertCircle, ArrowRight, Check } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import { InstallAppButtonMap } from "./apps.browser.generated";
import type { InstallAppButtonProps } from "./types";
@@ -121,7 +121,7 @@ export const AppDependencyComponent = ({
<div className="items-start space-x-2.5">
<div className="flex items-start">
<div>
<Check className="mr-2 mt-1 font-semibold" />
<Icon name="check" className="mr-2 mt-1 font-semibold" />
</div>
<div>
<span className="font-semibold">
@@ -144,7 +144,7 @@ export const AppDependencyComponent = ({
<div className="items-start space-x-2.5">
<div className="text-info flex items-start">
<div>
<AlertCircle className="mr-2 mt-1 font-semibold" />
<Icon name="circle-alert" className="mr-2 mt-1 font-semibold" />
</div>
<div>
<span className="font-semibold">
@@ -160,7 +160,7 @@ export const AppDependencyComponent = ({
<span className="mr-1">
{t("connect_app", { dependencyName: dependency.name })}
</span>
<ArrowRight />
<Icon name="arrow-right" />
</Link>
</>
</div>
@@ -3,10 +3,8 @@ import { useState } from "react";
import classNames from "@calcom/lib/classNames";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { SVGComponent } from "@calcom/types/SVGComponent";
import { Alert, Button, Dialog, DialogClose, DialogContent, DialogFooter, Input } from "@calcom/ui";
import { Link, Search } from "@calcom/ui/components/icon";
import type { LucideIcon } from "@calcom/ui/components/icon";
import type { IconName } from "@calcom/ui";
import { Alert, Button, Dialog, DialogClose, DialogContent, DialogFooter, Icon, Input } from "@calcom/ui";
interface ISearchDialog {
isOpenDialog: boolean;
@@ -86,7 +84,7 @@ export const SearchDialog = (props: ISearchDialog) => {
return null;
};
const renderTab = (Icon: SVGComponent | LucideIcon, text: string, mode: Mode) => (
const renderTab = (iconName: IconName, text: string, mode: Mode) => (
<div
className={classNames(
"flex cursor-pointer items-center border-b-2 p-2 text-sm ",
@@ -97,7 +95,7 @@ export const SearchDialog = (props: ISearchDialog) => {
setGifImage("");
setSelectedMode(mode);
}}>
<Icon className="h-4 w-4 ltr:mr-2 rtl:ml-2" />
<Icon name={iconName} className="h-4 w-4 ltr:mr-2 rtl:ml-2" />
{text}
</div>
);
@@ -120,8 +118,8 @@ export const SearchDialog = (props: ISearchDialog) => {
</h3>
<p className="text-subtle mb-3 text-sm font-light">{t("find_gif_spice_confirmation")}</p>
<div className="border-emphasis flex items-center border-b border-solid">
{renderTab(Search, t("search_giphy"), MODE_SEARCH)}
{renderTab(Link, t("add_link_from_giphy"), MODE_URL)}
{renderTab("search", t("search_giphy"), MODE_SEARCH)}
{renderTab("link", t("add_link_from_giphy"), MODE_URL)}
</div>
<form
className="flex w-full justify-center space-x-2 space-y-2 rtl:space-x-reverse"
@@ -2,7 +2,6 @@ import { useState } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui";
import { Edit, Plus, X } from "@calcom/ui/components/icon";
import { SearchDialog } from "./SearchDialog";
@@ -28,7 +27,7 @@ export default function SelectGifInput(props: ISelectGifInput) {
<Button
color="minimal"
type="button"
StartIcon={Edit}
StartIcon="pencil"
onClick={() => setShowDialog(true)}
disabled={props.disabled}>
Change
@@ -37,7 +36,7 @@ export default function SelectGifInput(props: ISelectGifInput) {
<Button
color="minimal"
type="button"
StartIcon={Plus}
StartIcon="plus"
onClick={() => setShowDialog(true)}
disabled={props.disabled}>
Add from Giphy
@@ -48,7 +47,7 @@ export default function SelectGifInput(props: ISelectGifInput) {
<Button
color="destructive"
type="button"
StartIcon={X}
StartIcon="x"
onClick={() => {
setSelectedGif("");
props.onChange("");
@@ -2,7 +2,7 @@ import Link from "next/link";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { AlertCircle, ArrowRight, Check } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean; appName: string }) => {
const { t } = useLocale();
@@ -12,7 +12,7 @@ const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean
<div className="items-start space-x-2.5">
<div className="flex items-start">
<div>
<Check className="mr-2 mt-1 font-semibold" />
<Icon name="check" className="mr-2 mt-1 font-semibold" />
</div>
<div>
<span className="font-semibold">{t("google_calendar_is_connected")}</span>
@@ -30,7 +30,7 @@ const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean
<div className="items-start space-x-2.5">
<div className="flex items-start">
<div>
<AlertCircle className="mr-2 mt-1 font-semibold" />
<Icon name="circle-alert" className="mr-2 mt-1 font-semibold" />
</div>
<div>
<span className="font-semibold">{t("this_app_requires_google_calendar", { appName })}</span>
@@ -41,7 +41,7 @@ const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean
href={`${WEBAPP_URL}/apps/google-calendar`}
className="text-info flex items-center underline">
<span className="mr-1">{t("connect_google_calendar")}</span>
<ArrowRight />
<Icon name="arrow-right" />
</Link>
</>
</div>
@@ -5,7 +5,7 @@ import { Toaster } from "react-hot-toast";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Alert, Button, Form, TextField } from "@calcom/ui";
import { Plus, Trash } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
export default function ICSFeedSetup() {
const { t } = useLocale();
@@ -75,7 +75,7 @@ export default function ICSFeedSetup() {
type="button"
className="mb-2 h-min text-sm"
onClick={() => setUrls((urls) => urls.filter((_, ii) => i !== ii))}>
<Trash size={16} />
<Icon name="trash" size={16} />
</button>
) : null}
</div>
@@ -88,7 +88,7 @@ export default function ICSFeedSetup() {
onClick={() => {
setUrls((urls) => urls.concat(""));
}}>
{t("add")} <Plus size={16} />
{t("add")} <Icon name="plus" size={16} />
</button>
{errorMessage && (
@@ -6,8 +6,7 @@ import { Toaster } from "react-hot-toast";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, Tooltip, showToast } from "@calcom/ui";
import { Clipboard } from "@calcom/ui/components/icon";
import { Button, Icon, showToast, Tooltip } from "@calcom/ui";
import type { getServerSideProps } from "./_getServerSideProps";
@@ -164,7 +163,7 @@ const CopyApiKey = ({ apiKey }: { apiKey: string }) => {
}}
type="button"
className="mt-4 text-base sm:mt-0 sm:rounded-l-none">
<Clipboard className="h-4 w-4 ltr:mr-2 rtl:ml-2" />
<Icon name="clipboard" className="h-4 w-4 ltr:mr-2 rtl:ml-2" />
{t("copy")}
</Button>
</Tooltip>
@@ -1,4 +1,3 @@
import { AlertCircleIcon } from "lucide-react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useState } from "react";
@@ -7,6 +6,7 @@ import { Toaster } from "react-hot-toast";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc";
import { Button, showToast, TextField } from "@calcom/ui";
import { Icon } from "@calcom/ui";
export default function PayPalSetup() {
const [newClientId, setNewClientId] = useState("");
@@ -88,7 +88,7 @@ export default function PayPalSetup() {
</p>
<p className="text-lgf text-default mt-5 inline-flex font-bold">
<AlertCircleIcon className="mr-2 mt-1 h-4 w-4" /> Important requirements:
<Icon name="circle-alert" className="mr-2 mt-1 h-4 w-4" /> Important requirements:
</p>
<ul className="text-default ml-1 mt-2 list-disc pl-2">
<li>Paypal Business account</li>
@@ -140,7 +140,7 @@ export default function PayPalSetup() {
<li>You should be all setup after this.</li>
</ol>
<p className="text-default mt-5 inline-flex font-bold">
<AlertCircleIcon className="mr-2 mt-1 h-4 w-4" />
<Icon name="circle-alert" className="mr-2 mt-1 h-4 w-4" />
Reminder:
</p>
<p className="text-default mt-2">
@@ -33,7 +33,6 @@ import {
TextAreaField,
TextField,
} from "@calcom/ui";
import { MoreHorizontal } from "@calcom/ui/components/icon";
import getFieldIdentifier from "../lib/getFieldIdentifier";
import type { SerializableForm } from "../types/types";
@@ -174,7 +173,7 @@ export const FormActionsDropdown = ({
variant="icon"
color="secondary"
className={classNames("radix-state-open:rounded-r-md", disabled && "opacity-30")}
StartIcon={MoreHorizontal}
StartIcon="ellipsis"
/>
</DropdownMenuTrigger>
<DropdownMenuContent>{children}</DropdownMenuContent>
@@ -31,14 +31,6 @@ import {
Tooltip,
VerticalDivider,
} from "@calcom/ui";
import {
ExternalLink,
Link as LinkIcon,
Download,
Code,
Trash,
MessageCircle,
} from "@calcom/ui/components/icon";
import { getAbsoluteEventTypeRedirectUrl } from "../getEventTypeRedirectUrl";
import { RoutingPages } from "../lib/RoutingPages";
@@ -90,7 +82,7 @@ const Actions = ({
type="button"
rel="noreferrer"
action="preview"
StartIcon={ExternalLink}
StartIcon="external-link"
/>
</Tooltip>
<FormAction
@@ -99,7 +91,7 @@ const Actions = ({
color="secondary"
variant="icon"
type="button"
StartIcon={LinkIcon}
StartIcon="link"
tooltip={t("copy_link_to_form")}
/>
@@ -111,7 +103,7 @@ const Actions = ({
color="secondary"
variant="icon"
type="button"
StartIcon={Download}
StartIcon="download"
/>
</Tooltip>
<FormAction
@@ -119,7 +111,7 @@ const Actions = ({
action="embed"
color="secondary"
variant="icon"
StartIcon={Code}
StartIcon="code"
tooltip={t("embed")}
/>
<DropdownMenuSeparator />
@@ -128,7 +120,7 @@ const Actions = ({
action="_delete"
// className="mr-3"
variant="icon"
StartIcon={Trash}
StartIcon="trash"
color="secondary"
type="button"
tooltip={t("delete")}
@@ -141,7 +133,7 @@ const Actions = ({
action="copyRedirectUrl"
color="minimal"
type="button"
StartIcon={LinkIcon}>
StartIcon="link">
{t("Copy Typeform Redirect Url")}
</FormAction>
</FormActionsDropdown>
@@ -157,7 +149,7 @@ const Actions = ({
type="button"
rel="noreferrer"
action="preview"
StartIcon={ExternalLink}>
StartIcon="external-link">
{t("preview")}
</FormAction>
<FormAction
@@ -166,7 +158,7 @@ const Actions = ({
routingForm={form}
color="minimal"
type="button"
StartIcon={LinkIcon}>
StartIcon="link">
{t("copy_link_to_form")}
</FormAction>
<FormAction
@@ -175,7 +167,7 @@ const Actions = ({
className="w-full"
color="minimal"
type="button"
StartIcon={Download}>
StartIcon="download">
{t("download_responses")}
</FormAction>
<FormAction
@@ -184,7 +176,7 @@ const Actions = ({
color="minimal"
type="button"
className="w-full"
StartIcon={Code}>
StartIcon="code">
{t("embed")}
</FormAction>
{typeformApp ? (
@@ -194,7 +186,7 @@ const Actions = ({
action="copyRedirectUrl"
color="minimal"
type="button"
StartIcon={LinkIcon}>
StartIcon="link">
{t("Copy Typeform Redirect Url")}
</FormAction>
) : null}
@@ -205,7 +197,7 @@ const Actions = ({
className="w-full"
type="button"
color="destructive"
StartIcon={Trash}>
StartIcon="trash">
{t("delete")}
</FormAction>
<div className="block sm:hidden">
@@ -495,7 +487,7 @@ function SingleForm({ form, appUrl, Page, enrichedWithUserProfileForm }: SingleF
className="mt-2 px-4 py-3"
severity="neutral"
title={t("no_responses_yet")}
CustomIcon={MessageCircle}
CustomIcon="message-circle"
/>
</>
)}
@@ -9,7 +9,7 @@ import type {
} from "react-awesome-query-builder";
import { Button as CalButton, TextField, TextArea } from "@calcom/ui";
import { Trash, Plus } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
const Select = dynamic(
async () => (await import("@calcom/ui")).SelectWithValidation
@@ -214,7 +214,7 @@ function Button({ config, type, label, onClick, readonly }: ButtonProps) {
if (type === "delRule" || type == "delGroup") {
return (
<button className="ml-5">
<Trash className="text-subtle m-0 h-4 w-4" onClick={onClick} />
<Icon name="trash" className="text-subtle m-0 h-4 w-4" onClick={onClick} />
</button>
);
}
@@ -228,7 +228,7 @@ function Button({ config, type, label, onClick, readonly }: ButtonProps) {
}
return (
<CalButton
StartIcon={Plus}
StartIcon="plus"
data-testid={dataTestId}
type="button"
color="secondary"
@@ -3,8 +3,7 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import { useEffect, useState } from "react";
import type { UseFormReturn } from "react-hook-form";
import { useWatch } from "react-hook-form";
import { Controller, useFieldArray } from "react-hook-form";
import { Controller, useFieldArray, useWatch } from "react-hook-form";
import { v4 as uuidv4 } from "uuid";
import Shell from "@calcom/features/shell/Shell";
@@ -15,12 +14,12 @@ import {
Button,
EmptyScreen,
FormCard,
Icon,
Label,
SelectField,
Skeleton,
TextField,
} from "@calcom/ui";
import { Plus, FileText, X, ArrowUp, ArrowDown } from "@calcom/ui/components/icon";
import type { inferSSRProps } from "@lib/types/inferSSRProps";
@@ -270,7 +269,7 @@ function Field({
type="button"
onClick={() => move(index, -1)}
className="bg-default text-muted hover:text-emphasis invisible flex h-6 w-6 scale-0 items-center justify-center rounded-md border p-1 transition-all hover:border-transparent hover:shadow group-hover:visible group-hover:scale-100 ">
<ArrowUp />
<Icon name="arrow-up" />
</button>
) : null}
{options.length && index !== options.length - 1 ? (
@@ -278,7 +277,7 @@ function Field({
type="button"
onClick={() => move(index, 1)}
className="bg-default text-muted hover:text-emphasis invisible flex h-6 w-6 scale-0 items-center justify-center rounded-md border p-1 transition-all hover:border-transparent hover:shadow group-hover:visible group-hover:scale-100 ">
<ArrowDown />
<Icon name="arrow-down" />
</button>
) : null}
</div>
@@ -298,7 +297,7 @@ function Field({
type="button"
onClick={() => handleRemoveOptions(index)}
aria-label={t("remove")}>
<X className="h-4 w-4" />
<Icon name="x" className="h-4 w-4" />
</button>
}
/>
@@ -311,7 +310,7 @@ function Field({
data-testid="add-attribute"
className="border-none"
type="button"
StartIcon={Plus}
StartIcon="plus"
color="secondary"
onClick={handleAddOptions}>
Add an option
@@ -425,7 +424,7 @@ const FormEdit = ({
<Button
data-testid="add-field"
type="button"
StartIcon={Plus}
StartIcon="plus"
color="secondary"
onClick={addField}>
Add field
@@ -437,7 +436,7 @@ const FormEdit = ({
) : (
<div className="bg-default w-full">
<EmptyScreen
Icon={FileText}
Icon="file-text"
headline="Create your first field"
description="Fields are the form fields that the booker would see."
buttonRaw={
@@ -19,33 +19,17 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
import { trpc } from "@calcom/trpc/react";
import {
ArrowButton,
Badge,
Button,
ButtonGroup,
CreateButtonWithTeamsList,
EmptyScreen,
Icon,
List,
ListLinkItem,
Tooltip,
ArrowButton,
} from "@calcom/ui";
import {
BarChart,
CheckCircle,
Code,
Copy,
Download,
Edit,
ExternalLink,
FileText,
GitMerge,
Link as LinkIcon,
Mail,
Menu,
MessageCircle,
Shuffle,
Trash,
} from "@calcom/ui/components/icon";
import type { inferSSRProps } from "@lib/types/inferSSRProps";
@@ -110,32 +94,32 @@ export default function RoutingForms({
const forms = queryRes.data?.filtered;
const features = [
{
icon: <FileText className="h-5 w-5 text-orange-500" />,
icon: <Icon name="file-text" className="h-5 w-5 text-orange-500" />,
title: t("create_your_first_form"),
description: t("create_your_first_form_description"),
},
{
icon: <Shuffle className="h-5 w-5 text-lime-500" />,
icon: <Icon name="shuffle" className="h-5 w-5 text-lime-500" />,
title: t("create_your_first_route"),
description: t("route_to_the_right_person"),
},
{
icon: <BarChart className="h-5 w-5 text-blue-500" />,
icon: <Icon name="bar-chart" className="h-5 w-5 text-blue-500" />,
title: t("reporting"),
description: t("reporting_feature"),
},
{
icon: <CheckCircle className="h-5 w-5 text-teal-500" />,
icon: <Icon name="circle-check" className="h-5 w-5 text-teal-500" />,
title: t("test_routing_form"),
description: t("test_preview_description"),
},
{
icon: <Mail className="h-5 w-5 text-yellow-500" />,
icon: <Icon name="mail" className="h-5 w-5 text-yellow-500" />,
title: t("routing_forms_send_email_owner"),
description: t("routing_forms_send_email_owner_description"),
},
{
icon: <Download className="h-5 w-5 text-violet-500" />,
icon: <Icon name="download" className="h-5 w-5 text-violet-500" />,
title: t("download_responses"),
description: t("download_responses_description"),
},
@@ -199,7 +183,7 @@ export default function RoutingForms({
queryRes={queryRes}
emptyScreen={
<EmptyScreen
Icon={GitMerge}
Icon="git-merge"
headline={t("create_your_first_form")}
description={t("create_your_first_form_description")}
buttonRaw={<NewFormButton />}
@@ -207,7 +191,7 @@ export default function RoutingForms({
}
noResultsScreen={
<EmptyScreen
Icon={GitMerge}
Icon="git-merge"
headline={t("no_results_for_filter")}
description={t("change_filter_common")}
/>
@@ -265,7 +249,7 @@ export default function RoutingForms({
action="preview"
routingForm={form}
target="_blank"
StartIcon={ExternalLink}
StartIcon="external-link"
color="secondary"
variant="icon"
/>
@@ -275,7 +259,7 @@ export default function RoutingForms({
action="copyLink"
color="secondary"
variant="icon"
StartIcon={LinkIcon}
StartIcon="link"
tooltip={t("copy_link_to_form")}
/>
<FormAction
@@ -283,7 +267,7 @@ export default function RoutingForms({
action="embed"
color="secondary"
variant="icon"
StartIcon={Code}
StartIcon="code"
tooltip={t("embed")}
/>
<FormActionsDropdown disabled={readOnly}>
@@ -292,14 +276,14 @@ export default function RoutingForms({
routingForm={form}
color="minimal"
className="!flex"
StartIcon={Edit}>
StartIcon="pencil">
{t("edit")}
</FormAction>
<FormAction
action="download"
routingForm={form}
color="minimal"
StartIcon={Download}>
StartIcon="download">
{t("download_responses")}
</FormAction>
<FormAction
@@ -307,7 +291,7 @@ export default function RoutingForms({
routingForm={form}
color="minimal"
className="w-full"
StartIcon={Copy}>
StartIcon="copy">
{t("duplicate")}
</FormAction>
{typeformApp?.isInstalled ? (
@@ -317,7 +301,7 @@ export default function RoutingForms({
action="copyRedirectUrl"
color="minimal"
type="button"
StartIcon={LinkIcon}>
StartIcon="link">
{t("Copy Typeform Redirect Url")}
</FormAction>
) : null}
@@ -326,7 +310,7 @@ export default function RoutingForms({
routingForm={form}
color="destructive"
className="w-full"
StartIcon={Trash}>
StartIcon="trash">
{t("delete")}
</FormAction>
</FormActionsDropdown>
@@ -334,13 +318,13 @@ export default function RoutingForms({
</>
}>
<div className="flex flex-wrap gap-1">
<Badge variant="gray" startIcon={Menu}>
<Badge variant="gray" startIcon="menu">
{fields.length} {fields.length === 1 ? "field" : "fields"}
</Badge>
<Badge variant="gray" startIcon={GitMerge}>
<Badge variant="gray" startIcon="git-merge">
{userRoutes.length} {userRoutes.length === 1 ? "route" : "routes"}
</Badge>
<Badge variant="gray" startIcon={MessageCircle}>
<Badge variant="gray" startIcon="message-circle">
{form._count.responses}{" "}
{form._count.responses === 1 ? "response" : "responses"}
</Badge>
@@ -7,7 +7,6 @@ import z from "zod";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Form, showToast, TextField } from "@calcom/ui";
import { Check, X } from "@calcom/ui/components/icon";
const formSchema = z.object({
api_key: z.string(),
@@ -102,7 +101,7 @@ export default function SendgridSetup() {
type="submit"
loading={testLoading}
disabled={testPassed === true}
StartIcon={testPassed !== undefined ? (testPassed ? Check : X) : undefined}
StartIcon={testPassed === undefined ? undefined : testPassed ? "check" : "x"}
className={
testPassed !== undefined
? testPassed
@@ -2,7 +2,7 @@ import { useAppContextWithSchema } from "@calcom/app-store/EventTypeAppContext";
import AppCard from "@calcom/app-store/_components/AppCard";
import useIsAppEnabled from "@calcom/app-store/_utils/useIsAppEnabled";
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
import { Sunrise, Sunset } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import type { appDataSchema } from "../zod";
@@ -27,8 +27,10 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
teamId={eventType.team?.id || undefined}>
<div className="mt-2 text-sm">
<div className="flex">
<span className="ltr:mr-2 rtl:ml-2">{isSunrise ? <Sunrise /> : <Sunset />}</span>I am an AppCard for
Event with Title: {eventType.title}
<span className="ltr:mr-2 rtl:ml-2">
<Icon name={isSunrise ? "sunrise" : "sunset"} />
</span>
I am an AppCard for Event with Title: {eventType.title}
</div>{" "}
<div className="mt-2">
Edit <span className="italic">packages/app-store/{app.slug}/EventTypeAppCardInterface.tsx</span> to
@@ -1,8 +1,7 @@
import Link from "next/link";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui";
import { ExternalLink } from "@calcom/ui/components/icon";
import { Button, Icon } from "@calcom/ui";
export default function HowToUse() {
const { t } = useLocale();
@@ -31,7 +30,11 @@ export default function HowToUse() {
href="/api/app-store/typeform/copy-typeform-redirect-url.png"
target="_blank"
className="text-subtle inline-flex items-baseline text-base">
<ExternalLink className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
<Icon
name="external-link"
className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2"
aria-hidden="true"
/>
Click &quot;Copy Typeform Redirect URL&quot;
</Link>
</li>
@@ -42,7 +45,11 @@ export default function HowToUse() {
href="https://www.typeform.com/help/a/end-screens-and-redirects-360051791392/#h_01G0CFXF21W2EQ8PXKSB4KSC8P"
target="_blank"
className="text-subtle inline-flex items-baseline text-base">
<ExternalLink className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
<Icon
name="external-link"
className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2"
aria-hidden="true"
/>
Redirect to your typeform
</Link>
</li>
@@ -52,7 +59,11 @@ export default function HowToUse() {
href="https://www.typeform.com/help/a/use-recall-information-to-reference-typeform-answers-variables-and-more-360052320011/"
target="_blank"
className="text-subtle inline-flex items-baseline text-base">
<ExternalLink className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
<Icon
name="external-link"
className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2"
aria-hidden="true"
/>
Recall Information in Typeform
</Link>{" "}
to add values to query params.
@@ -6,8 +6,7 @@ import dayjs from "@calcom/dayjs";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import logger from "@calcom/lib/logger";
import { trpc } from "@calcom/trpc/react";
import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, showToast } from "@calcom/ui";
import { Clock } from "@calcom/ui/components/icon";
import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, Icon, showToast } from "@calcom/ui";
interface IConfirmDialogWipe {
isOpenDialog: boolean;
@@ -80,7 +79,7 @@ export const ConfirmDialog = (props: IConfirmDialogWipe) => {
<DialogContent onOpenAutoFocus={(e) => e.preventDefault()}>
<div className="flex flex-row space-x-3">
<div className="flex h-10 w-10 flex-shrink-0 justify-center rounded-full bg-[#FAFAFA]">
<Clock className="m-auto h-5 w-5" />
<Icon name="clock" className="m-auto h-5 w-5" />
</div>
<div className="pt-1">
<DialogHeader title="Wipe My Calendar" />
@@ -5,8 +5,7 @@ import { Toaster } from "react-hot-toast";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, Tooltip, showToast } from "@calcom/ui";
import { Clipboard } from "@calcom/ui/components/icon";
import { Button, Icon, showToast, Tooltip } from "@calcom/ui";
export interface IZapierSetupProps {
inviteLink?: string;
@@ -166,7 +165,7 @@ const CopyApiKey = ({ apiKey }: { apiKey: string }) => {
}}
type="button"
className="mt-4 text-base sm:mt-0 sm:rounded-l-none">
<Clipboard className="h-4 w-4 ltr:mr-2 rtl:ml-2" />
<Icon name="clipboard" className="h-4 w-4 ltr:mr-2 rtl:ml-2" />
{t("copy")}
</Button>
</Tooltip>
+3 -3
View File
@@ -23,6 +23,7 @@ import {
DialogFooter,
EmptyScreen,
Form,
Icon,
List,
showToast,
SkeletonButton,
@@ -31,7 +32,6 @@ import {
Switch,
TextField,
} from "@calcom/ui";
import { AlertCircle, Edit } from "@calcom/ui/components/icon";
import AppListCard from "../../../apps/web/components/AppListCard";
@@ -93,7 +93,7 @@ const IntegrationContainer = ({
<div className="flex items-center justify-self-end">
{app.keys && (
<Button color="secondary" className="mr-2" onClick={() => showKeyModal()}>
<Edit />
<Icon name="pencil" />
</Button>
)}
@@ -296,7 +296,7 @@ const AdminAppsListContainer = () => {
if (!apps || apps.length === 0) {
return (
<EmptyScreen
Icon={AlertCircle}
Icon="circle-alert"
headline={t("no_available_apps")}
description={t("no_available_apps_description")}
/>
@@ -8,16 +8,15 @@ import { getEventLocationType } from "@calcom/app-store/locations";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import {
showToast,
Dialog,
DialogContent,
Form,
TextField,
DialogFooter,
Button,
Dialog,
DialogClose,
DialogContent,
DialogFooter,
Form,
showToast,
TextField,
} from "@calcom/ui";
import { AlertCircle } from "@calcom/ui/components/icon";
type LocationTypeSetLinkDialogFormProps = {
link?: string;
@@ -57,7 +56,7 @@ export function AppSetDefaultLinkDialog({
title={t("default_app_link_title")}
description={t("default_app_link_description")}
type="creation"
Icon={AlertCircle}>
Icon="circle-alert">
<Form
form={form}
handleSubmit={(values) => {
@@ -4,7 +4,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import type { ButtonProps } from "@calcom/ui";
import { Button, ConfirmationDialogContent, Dialog, DialogTrigger, showToast } from "@calcom/ui";
import { Trash } from "@calcom/ui/components/icon";
export default function DisconnectIntegration({
credentialId,
@@ -47,7 +46,7 @@ export default function DisconnectIntegration({
<DialogTrigger asChild>
<Button
color={buttonProps?.color || "destructive"}
StartIcon={trashIcon ? Trash : undefined}
StartIcon={!trashIcon ? undefined : "trash"}
size="base"
variant={trashIcon && !label ? "icon" : "button"}
disabled={isGlobal}
+2 -3
View File
@@ -6,8 +6,7 @@ import z from "zod";
import { HOSTED_CAL_FEATURES } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button } from "@calcom/ui";
import { Lock } from "@calcom/ui/components/icon";
import { Button, Icon } from "@calcom/ui";
interface Props {
samlTenantID: string;
@@ -34,7 +33,7 @@ export function SAMLLogin({ samlTenantID, samlProductID, setErrorMessage }: Prop
return (
<Button
StartIcon={Lock}
StartIcon="lock"
color="secondary"
data-testid="saml"
className="flex w-full justify-center"
@@ -1,14 +1,13 @@
import type { TFunction } from "next-i18next";
import { Trans } from "next-i18next";
import Link from "next/link";
import { useState, useMemo } from "react";
import { useMemo, useState } from "react";
import type { FieldError } from "react-hook-form";
import { IS_CALCOM, WEBSITE_URL } from "@calcom/lib/constants";
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Alert, Button, EmptyScreen, Form } from "@calcom/ui";
import { Calendar } from "@calcom/ui/components/icon";
import { Alert, Button, EmptyScreen, Form, Icon } from "@calcom/ui";
import { useBookerStore } from "../../store";
import type { useEventReturnType } from "../../utils/event";
@@ -70,7 +69,7 @@ export const BookEventForm = ({
<EmptyScreen
headline={t("timeslot_missing_title")}
description={t("timeslot_missing_description")}
Icon={Calendar}
Icon="calendar"
buttonText={t("timeslot_missing_cta")}
buttonOnClick={onCancel}
/>
@@ -1,4 +1,3 @@
import { Calendar, Clock } from "lucide-react";
import type { ReactNode } from "react";
import { useIsPlatform, useGetEventTypeById } from "@calcom/atoms/monorepo";
@@ -55,13 +54,13 @@ export const BookEventFormWrapperComponent = ({
<>
<h1 className="font-cal text-emphasis text-xl leading-5">{t("confirm_your_details")} </h1>
<div className="my-4 flex space-x-2 rounded-md leading-none">
<Badge variant="grayWithoutHover" startIcon={Calendar} size="lg">
<Badge variant="grayWithoutHover" startIcon="calendar" size="lg">
<span>
{parsedSelectedTimeslot.format("LL")} {parsedSelectedTimeslot.tz(timezone).format(timeFormat)}
</span>
</Badge>
{(selectedDuration || eventLength) && (
<Badge variant="grayWithoutHover" startIcon={Clock} size="lg">
<Badge variant="grayWithoutHover" startIcon="clock" size="lg">
<span>{selectedDuration || eventLength}</span>
</Badge>
)}
@@ -1,6 +1,6 @@
import { m } from "framer-motion";
import dynamic from "next/dynamic";
import { useMemo, useEffect } from "react";
import { useEffect, useMemo } from "react";
import { shallow } from "zustand/shallow";
import { Timezone as PlatformTimezoneSelect } from "@calcom/atoms/monorepo";
@@ -10,7 +10,6 @@ import { SeatsAvailabilityText } from "@calcom/features/bookings/components/Seat
import { EventMetaBlock } from "@calcom/features/bookings/components/event-meta/Details";
import { useTimePreferences } from "@calcom/features/bookings/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Calendar, Globe, User } from "@calcom/ui/components/icon";
import { fadeInUp } from "../config";
import { useBookerStore } from "../store";
@@ -101,7 +100,7 @@ export const EventMeta = ({
)}
<div className="space-y-4 font-medium rtl:-mr-2">
{rescheduleUid && bookingData && (
<EventMetaBlock icon={Calendar}>
<EventMetaBlock icon="calendar">
{t("former_time")}
<br />
<span className="line-through" data-testid="former_time_p">
@@ -116,7 +115,7 @@ export const EventMeta = ({
</EventMetaBlock>
)}
{selectedTimeslot && (
<EventMetaBlock icon={Calendar}>
<EventMetaBlock icon="calendar">
<FromToTime
date={selectedTimeslot}
duration={selectedDuration || event.length}
@@ -131,7 +130,7 @@ export const EventMeta = ({
<EventMetaBlock
className="cursor-pointer [&_.current-timezone:before]:focus-within:opacity-100 [&_.current-timezone:before]:hover:opacity-100"
contentClassName="relative max-w-[90%]"
icon={Globe}>
icon="globe">
{bookerState === "booking" ? (
<>{timezone}</>
) : (
@@ -156,7 +155,7 @@ export const EventMeta = ({
)}
</EventMetaBlock>
{bookerState === "booking" && eventTotalSeats && bookingSeatAttendeesQty ? (
<EventMetaBlock icon={User} className={`${colorClass}`}>
<EventMetaBlock icon="user" className={`${colorClass}`}>
<div className="text-bookinghighlight flex items-start text-sm">
<p>
<SeatsAvailabilityText
@@ -1,8 +1,8 @@
import { ArrowRight, InfoIcon } from "lucide-react";
import { useState } from "react";
import { BOOKER_NUMBER_OF_DAYS_TO_LOAD } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Icon } from "@calcom/ui";
type Props = {
onButtonClick: () => void;
@@ -30,7 +30,7 @@ export function HavingTroubleFindingTime(props: Props) {
return (
<div className="bg-default border-subtle mt-6 flex w-1/2 min-w-0 items-center justify-between rounded-[32px] border p-3 text-sm leading-none shadow-sm lg:w-1/3">
<div className="flex items-center gap-2 overflow-x-hidden">
<InfoIcon className="text-default h-4 w-4" />
<Icon name="info" className="text-default h-4 w-4" />
<p className="w-full leading-none">{t("having_trouble_finding_time")}</p>
</div>
{/* TODO: we should give this more of a touch target on mobile */}
@@ -41,7 +41,7 @@ export function HavingTroubleFindingTime(props: Props) {
props.onButtonClick();
setInternalClick(true);
}}>
{t("show_more")} <ArrowRight className="h-4 w-4" />
{t("show_more")} <Icon name="arrow-right" className="h-4 w-4" />
</button>
</div>
);
@@ -1,4 +1,3 @@
import { ChevronLeft, ChevronRight } from "lucide-react";
import { useCallback, useMemo } from "react";
import { shallow } from "zustand/shallow";
@@ -7,8 +6,7 @@ import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { BookerLayouts } from "@calcom/prisma/zod-utils";
import { Button, ButtonGroup, ToggleGroup, Tooltip } from "@calcom/ui";
import { Calendar, Columns, Grid } from "@calcom/ui/components/icon";
import { Button, ButtonGroup, Icon, ToggleGroup, Tooltip } from "@calcom/ui";
import { TimeFormatToggle } from "../../components/TimeFormatToggle";
import { useBookerStore } from "../store";
@@ -111,7 +109,7 @@ export function Header({
className="group rtl:ml-1 rtl:rotate-180"
variant="icon"
color="minimal"
StartIcon={ChevronLeft}
StartIcon="chevron-left"
aria-label="Previous Day"
onClick={() => addToSelectedDate(layout === BookerLayouts.COLUMN_VIEW ? -nextSlots : -extraDays)}
/>
@@ -119,7 +117,7 @@ export function Header({
className="group rtl:mr-1 rtl:rotate-180"
variant="icon"
color="minimal"
StartIcon={ChevronRight}
StartIcon="chevron-right"
aria-label="Next Day"
onClick={() => addToSelectedDate(layout === BookerLayouts.COLUMN_VIEW ? nextSlots : extraDays)}
/>
@@ -179,17 +177,17 @@ const LayoutToggle = ({
return [
{
value: BookerLayouts.MONTH_VIEW,
label: <Calendar width="16" height="16" />,
label: <Icon name="calendar" width="16" height="16" />,
tooltip: t("switch_monthly"),
},
{
value: BookerLayouts.WEEK_VIEW,
label: <Grid width="16" height="16" />,
label: <Icon name="grid-3x3" width="16" height="16" />,
tooltip: t("switch_weekly"),
},
{
value: BookerLayouts.COLUMN_VIEW,
label: <Columns width="16" height="16" />,
label: <Icon name="columns-3" width="16" height="16" />,
tooltip: t("switch_columnview"),
},
].filter((layout) => enabledLayouts?.includes(layout.value as BookerLayouts));
@@ -1,5 +1,3 @@
import { CalendarSearch } from "lucide-react";
import { APP_NAME } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Dialog, DialogContent, DialogFooter } from "@calcom/ui";
@@ -26,7 +24,7 @@ export function OverlayCalendarContinueModal(props: IOverlayCalendarContinueModa
props.onContinue();
}}
className="gap w-full items-center justify-center font-semibold"
StartIcon={CalendarSearch}>
StartIcon="calendar-search">
{t("continue_with", { appName: APP_NAME })}
</Button>
</div>
@@ -6,17 +6,17 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import {
Alert,
Dialog,
DialogClose,
DialogContent,
EmptyScreen,
Icon,
ListItem,
ListItemText,
ListItemTitle,
Switch,
DialogClose,
SkeletonContainer,
SkeletonText,
Switch,
} from "@calcom/ui";
import { Calendar } from "@calcom/ui/components/icon";
import type { UseCalendarsReturnType } from "../hooks/useCalendars";
@@ -70,7 +70,7 @@ export function OverlayCalendarSettingsModal({
<>
{connectedCalendars.length === 0 ? (
<EmptyScreen
Icon={Calendar}
Icon="calendar"
headline={t("no_calendar_installed")}
description={t("no_calendar_installed_description")}
buttonText={t("add_a_calendar")}
@@ -3,7 +3,6 @@ import { useEffect } from "react";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Switch } from "@calcom/ui";
import { Settings } from "@calcom/ui/components/icon";
import { useBookerStore } from "../../store";
import { useOverlayCalendarStore } from "./store";
@@ -65,7 +64,7 @@ export function OverlayCalendarSwitch({ enabled, hasSession, onStateChange }: Ov
data-testid="overlay-calendar-settings-button"
variant="icon"
color="secondary"
StartIcon={Settings}
StartIcon="settings"
onClick={() => {
setCalendarSettingsOverlay(true);
}}
@@ -1,7 +1,6 @@
// We do not need to worry about importing framer-motion here as it is lazy imported in Booker.
import * as HoverCard from "@radix-ui/react-hover-card";
import { AnimatePresence, m } from "framer-motion";
import { CalendarX2, ChevronRight } from "lucide-react";
import { useCallback, useState } from "react";
import dayjs from "@calcom/dayjs";
@@ -9,7 +8,7 @@ import type { Slots } from "@calcom/features/schedules";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { localStorage } from "@calcom/lib/webstorage";
import { Button, SkeletonText } from "@calcom/ui";
import { Button, Icon, SkeletonText } from "@calcom/ui";
import { useBookerStore } from "../Booker/store";
import type { useEventReturnType } from "../Booker/utils/event";
@@ -155,7 +154,9 @@ const SlotItem = ({
<m.div initial={{ width: 0 }} animate={{ width: "auto" }} exit={{ width: 0 }}>
<Button
variant={layout === "column_view" ? "icon" : "button"}
StartIcon={layout === "column_view" ? ChevronRight : undefined}
StartIcon={
layout === "column_view" ? "chevron-right" : undefined
}
onClick={() =>
onTimeSelect(slot.time, slot?.attendees || 0, seatsPerTimeSlot, slot.bookingUid)
}>
@@ -201,7 +202,7 @@ export const AvailableTimes = ({
<div
data-testId="no-slots-available"
className="bg-subtle border-subtle flex h-full flex-col items-center rounded-md border p-6 dark:bg-transparent">
<CalendarX2 className="text-muted mb-2 h-4 w-4" />
<Icon name="calendar-x-2" className="text-muted mb-2 h-4 w-4" />
<p className={classNames("text-muted", showTimeFormatToggle ? "-mt-1 text-lg" : "text-sm")}>
{t("all_booked_today")}
</p>
@@ -2,15 +2,13 @@ import { useSession } from "next-auth/react";
import { Fragment, useMemo } from "react";
import {
FilterCheckboxFieldsContainer,
FilterCheckboxField,
FilterCheckboxFieldsContainer,
} from "@calcom/features/filters/components/TeamsFilter";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { AnimatedPopover } from "@calcom/ui";
import { Divider } from "@calcom/ui";
import { Link } from "@calcom/ui/components/icon";
import { AnimatedPopover, Divider, Icon } from "@calcom/ui";
import { groupBy } from "../groupBy";
import { useFilterQuery } from "../lib/useFilterQuery";
@@ -72,7 +70,7 @@ export const EventTypeFilter = () => {
<FilterCheckboxFieldsContainer>
<FilterCheckboxField
id="all"
icon={<Link className="h-4 w-4" />}
icon={<Icon name="link" className="h-4 w-4" />}
checked={!query.eventTypeIds?.length}
onChange={removeAllQueryParams}
label={t("all_event_types_filter_label")}
@@ -2,8 +2,7 @@ import type { Dispatch, SetStateAction } from "react";
import { useFilterQuery } from "@calcom/features/bookings/lib/useFilterQuery";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Tooltip, Badge, Button } from "@calcom/ui";
import { Filter } from "@calcom/ui/components/icon";
import { Badge, Button, Icon, Tooltip } from "@calcom/ui";
export interface FilterToggleProps {
setIsFiltersVisible: Dispatch<SetStateAction<boolean>>;
@@ -21,7 +20,7 @@ export function FilterToggle({ setIsFiltersVisible }: FilterToggleProps) {
return (
<Button color="secondary" onClick={toggleFiltersVisibility} className="mb-4">
<Filter className="h-4 w-4" />
<Icon name="filter" className="h-4 w-4" />
<Tooltip content={t("filters")}>
<div className="mx-2">{t("filters")}</div>
</Tooltip>
@@ -3,14 +3,13 @@ import { useState } from "react";
import { useFilterQuery } from "@calcom/features/bookings/lib/useFilterQuery";
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
import {
FilterCheckboxFieldsContainer,
FilterCheckboxField,
FilterCheckboxFieldsContainer,
} from "@calcom/features/filters/components/TeamsFilter";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { AnimatedPopover, Avatar, Divider, FilterSearchField } from "@calcom/ui";
import { User } from "@calcom/ui/components/icon";
import { AnimatedPopover, Avatar, Divider, FilterSearchField, Icon } from "@calcom/ui";
export const PeopleFilter = () => {
const { t } = useLocale();
@@ -43,7 +42,7 @@ export const PeopleFilter = () => {
<FilterCheckboxFieldsContainer>
<FilterCheckboxField
id="all"
icon={<User className="h-4 w-4" />}
icon={<Icon name="user" className="h-4 w-4" />}
checked={!query.userIds?.length}
onChange={removeAllQueryParams}
label={t("all_users_filter_label")}
@@ -1,5 +1,5 @@
import type { Dispatch, SetStateAction } from "react";
import { useState, useEffect, useCallback } from "react";
import { useCallback, useEffect, useState } from "react";
import useDigitInput from "react-digit-input";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -10,10 +10,10 @@ import {
DialogContent,
DialogFooter,
DialogHeader,
Label,
Icon,
Input,
Label,
} from "@calcom/ui";
import { Info } from "@calcom/ui/components/icon";
export const VerifyCodeDialog = ({
isOpenDialog,
@@ -116,7 +116,7 @@ export const VerifyCodeDialog = ({
{error && (
<div className="mt-2 flex items-center gap-x-2 text-sm text-red-700">
<div>
<Info className="h-3 w-3" />
<Icon name="info" className="h-3 w-3" />
</div>
<p>{error}</p>
</div>
@@ -8,9 +8,7 @@ import { useIsPlatform } from "@calcom/atoms/monorepo";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import invertLogoOnDark from "@calcom/lib/invertLogoOnDark";
import { Tooltip } from "@calcom/ui";
import { Link } from "@calcom/ui/components/icon";
import { Video } from "@calcom/ui/components/icon";
import { Icon, Tooltip } from "@calcom/ui";
const excludeNullValues = (value: unknown) => !!value;
@@ -24,7 +22,7 @@ function RenderIcon({
const isPlatform = useIsPlatform();
if (isPlatform) {
return <Video className="me-[10px] h-4 w-4" />;
return <Icon name="video" className="me-[10px] h-4 w-4" />;
}
return (
@@ -87,7 +85,7 @@ export function AvailableEventLocations({ locations }: { locations: LocationObje
return (
<div key={`${location.type}-${index}`} className="flex flex-row items-center text-sm font-medium">
{eventLocationType.iconUrl === "/link.svg" ? (
<Link className="text-default h-4 w-4 ltr:mr-[10px] rtl:ml-[10px]" />
<Icon name="link" className="text-default h-4 w-4 ltr:mr-[10px] rtl:ml-[10px]" />
) : (
<RenderIcon eventLocationType={eventLocationType} isTooltip={false} />
)}
@@ -1,12 +1,11 @@
import { Fragment } from "react";
import React from "react";
import React, { Fragment } from "react";
import { useBookerStore } from "@calcom/features/bookings/Booker/store";
import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon";
import classNames from "@calcom/lib/classNames";
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Clock, CheckSquare, RefreshCcw } from "@calcom/ui/components/icon";
import type { LucideIcon } from "@calcom/ui/components/icon";
import { Icon, type IconName } from "@calcom/ui";
import type { PublicEvent } from "../../types";
import { EventDetailBlocks } from "../../types";
@@ -14,7 +13,6 @@ import { AvailableEventLocations } from "./AvailableEventLocations";
import { EventDuration } from "./Duration";
import { EventOccurences } from "./Occurences";
import { Price } from "./Price";
import { getPriceIcon } from "./getPriceIcon";
type EventDetailsPropsBase = {
event: PublicEvent;
@@ -35,7 +33,9 @@ type EventDetailCustomBlock = {
type EventDetailsProps = EventDetailsPropsBase & (EventDetailDefaultBlock | EventDetailCustomBlock);
interface EventMetaProps {
icon?: React.FC<{ className: string }> | string | LucideIcon;
customIcon?: React.ReactNode;
icon?: IconName;
iconUrl?: string;
children: React.ReactNode;
// Emphasises the text in the block. For now only
// applying in dark mode.
@@ -61,7 +61,9 @@ const defaultEventDetailsBlocks = [
* rendered in a consistent way — adds an icon and children (text usually).
*/
export const EventMetaBlock = ({
icon: Icon,
customIcon,
icon,
iconUrl,
children,
highlight,
contentClassName,
@@ -77,9 +79,9 @@ export const EventMetaBlock = ({
highlight ? "text-emphasis" : "text-text",
className
)}>
{typeof Icon === "string" ? (
{iconUrl ? (
<img
src={Icon}
src={iconUrl}
alt=""
// @TODO: Use SVG's instead of images, so we can get rid of the filter.
className={classNames(
@@ -89,7 +91,12 @@ export const EventMetaBlock = ({
)}
/>
) : (
<>{!!Icon && <Icon className="relative z-20 mr-2 mt-[2px] h-4 w-4 flex-shrink-0 rtl:ml-2" />}</>
<>
{customIcon ||
(!!icon && (
<Icon name={icon} className="relative z-20 mr-2 mt-[2px] h-4 w-4 flex-shrink-0 rtl:ml-2" />
))}
</>
)}
<div className={classNames("relative z-10 max-w-full break-words", contentClassName)}>{children}</div>
</div>
@@ -125,7 +132,7 @@ export const EventDetails = ({ event, blocks = defaultEventDetailsBlocks }: Even
switch (block) {
case EventDetailBlocks.DURATION:
return (
<EventMetaBlock key={block} icon={Clock}>
<EventMetaBlock key={block} icon="clock">
<EventDuration event={event} />
</EventMetaBlock>
);
@@ -142,7 +149,7 @@ export const EventDetails = ({ event, blocks = defaultEventDetailsBlocks }: Even
if (!event.requiresConfirmation) return null;
return (
<EventMetaBlock key={block} icon={CheckSquare}>
<EventMetaBlock key={block} icon="square-check">
{t("requires_confirmation")}
</EventMetaBlock>
);
@@ -151,7 +158,7 @@ export const EventDetails = ({ event, blocks = defaultEventDetailsBlocks }: Even
if (!event.recurringEvent || rescheduleUid) return null;
return (
<EventMetaBlock key={block} icon={RefreshCcw}>
<EventMetaBlock key={block} icon="refresh-ccw">
<EventOccurences event={event} />
</EventMetaBlock>
);
@@ -161,7 +168,7 @@ export const EventDetails = ({ event, blocks = defaultEventDetailsBlocks }: Even
if (event.price <= 0 || paymentAppData.price <= 0) return null;
return (
<EventMetaBlock key={block} icon={getPriceIcon(event.currency)}>
<EventMetaBlock key={block} customIcon={<PriceIcon currency={event.currency} />}>
<Price
price={paymentAppData.price}
currency={event.currency}
@@ -2,7 +2,6 @@ import { getEventLocationType, getTranslatedLocation } from "@calcom/app-store/l
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Tooltip } from "@calcom/ui";
import { MapPin } from "@calcom/ui/components/icon";
import type { PublicEvent } from "../../types";
import { EventMetaBlock } from "./Details";
@@ -20,10 +19,11 @@ export const EventLocations = ({ event }: { event: PublicEvent }) => {
return translatedLocation;
};
const eventLocationType = getEventLocationType(locations[0].type);
const icon = locations.length > 1 || !eventLocationType?.iconUrl ? MapPin : eventLocationType.iconUrl;
const iconUrl = locations.length > 1 || !eventLocationType?.iconUrl ? undefined : eventLocationType.iconUrl;
const icon = locations.length > 1 || !eventLocationType?.iconUrl ? "map-pin" : undefined;
return (
<EventMetaBlock icon={icon} isDark={eventLocationType?.iconUrl?.includes("-dark")}>
<EventMetaBlock iconUrl={iconUrl} icon={icon} isDark={eventLocationType?.iconUrl?.includes("-dark")}>
{locations.length === 1 && (
<Tooltip content={getLocationToDisplay(locations[0])}>
<div className="" key={locations[0].type}>
@@ -0,0 +1,6 @@
import { Icon } from "@calcom/ui";
export function PayIcon(props: { currency: string; className?: string }) {
const { className, currency } = props;
return <Icon name={currency !== "BTC" ? "credit-card" : "zap"} className={className} />;
}
@@ -0,0 +1,8 @@
import { Icon } from "@calcom/ui";
import { SatSymbol } from "@calcom/ui/components/icon/SatSymbol";
export function PriceIcon(props: { currency: string; className?: string }) {
const { className, currency } = props;
if (currency !== "BTC") return <Icon name="credit-card" className={className} />;
return <SatSymbol className={className} />;
}
@@ -1,7 +0,0 @@
import { CreditCard, Zap } from "lucide-react";
import type { LucideIcon } from "@calcom/ui/components/icon";
export function getPayIcon(currency: string): React.FC<{ className: string }> | string | LucideIcon {
return currency !== "BTC" ? CreditCard : Zap;
}
@@ -1,8 +0,0 @@
import { CreditCard } from "lucide-react";
import type { LucideIcon } from "@calcom/ui/components/icon";
import { SatSymbol } from "@calcom/ui/components/icon/SatSymbol";
export function getPriceIcon(currency: string): React.FC<{ className: string }> | string | LucideIcon {
return currency !== "BTC" ? CreditCard : (SatSymbol as React.FC<{ className: string }>);
}
@@ -2,5 +2,5 @@ export { EventDetails, EventMetaBlock } from "./Details";
export { EventTitle } from "./Title";
export { EventMetaSkeleton } from "./Skeleton";
export { EventMembers } from "./Members";
export { getPriceIcon } from "./getPriceIcon";
export { getPayIcon } from "./getPayIcon";
export { PriceIcon } from "./PriceIcon";
export { PayIcon } from "./PayIcon";
@@ -4,8 +4,7 @@ import { useState } from "react";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { showToast, Switch } from "@calcom/ui";
import { ArrowLeft, RotateCw } from "@calcom/ui/components/icon";
import { Icon, showToast, Switch } from "@calcom/ui";
interface ICalendarSwitchProps {
title: string;
@@ -81,11 +80,13 @@ const CalendarSwitch = (props: ICalendarSwitchProps) => {
</label>
{!!props.destination && (
<span className="bg-subtle text-default ml-8 inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm font-normal sm:ml-4">
<ArrowLeft className="h-4 w-4" />
<Icon name="arrow-left" className="h-4 w-4" />
{t("adding_events_to")}
</span>
)}
{mutation.isPending && <RotateCw className="text-muted h-4 w-4 animate-spin ltr:ml-1 rtl:mr-1" />}
{mutation.isPending && (
<Icon name="rotate-cw" className="text-muted h-4 w-4 animate-spin ltr:ml-1 rtl:mr-1" />
)}
</div>
);
};
+3 -5
View File
@@ -11,8 +11,6 @@ import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { weekdayNames } from "@calcom/lib/weekday";
import { Button, SkeletonText } from "@calcom/ui";
import { ChevronLeft, ChevronRight } from "@calcom/ui/components/icon";
import { ArrowRight } from "@calcom/ui/components/icon";
export type DatePickerProps = {
/** which day of the week to render the calendar. Usually Sunday (=0) or Monday (=1) - default: Sunday */
@@ -95,7 +93,7 @@ const NoAvailabilityOverlay = ({
return (
<div className="bg-muted border-subtle absolute left-1/2 top-40 -mt-10 w-max -translate-x-1/2 -translate-y-1/2 transform rounded-md border p-8 shadow-sm">
<h4 className="text-emphasis mb-4 font-medium">{t("no_availability_in_month", { month: month })}</h4>
<Button onClick={nextMonthButton} color="primary" EndIcon={ArrowRight} data-testid="view_next_month">
<Button onClick={nextMonthButton} color="primary" EndIcon="arrow-right" data-testid="view_next_month">
{t("view_next_month")}
</Button>
</div>
@@ -281,7 +279,7 @@ const DatePicker = ({
data-testid="decrementMonth"
color="minimal"
variant="icon"
StartIcon={ChevronLeft}
StartIcon="chevron-left"
/>
<Button
className="group p-1 opacity-70 hover:opacity-100 rtl:rotate-180"
@@ -289,7 +287,7 @@ const DatePicker = ({
data-testid="incrementMonth"
color="minimal"
variant="icon"
StartIcon={ChevronRight}
StartIcon="chevron-right"
/>
</div>
</div>
@@ -6,8 +6,7 @@ import { components } from "react-select";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { DestinationCalendar } from "@calcom/prisma/client";
import { trpc } from "@calcom/trpc/react";
import { Select, Badge } from "@calcom/ui";
import { Check } from "@calcom/ui/components/icon";
import { Badge, Icon, Select } from "@calcom/ui";
interface Props {
onChange: (value: { externalId: string; integration: string }) => void;
@@ -41,7 +40,7 @@ const OptionComponent = ({ ...props }: OptionProps<Option>) => {
<components.Option {...props}>
<div className="flex">
<span className="mr-auto">{label}</span>
{props.isSelected && <Check className="ml-2 h-4 w-4" />}
{props.isSelected && <Icon name="check" className="ml-2 h-4 w-4" />}
</div>
</components.Option>
);
@@ -11,7 +11,7 @@ import { events, blockingDates } from "../_storybookData";
import "../styles/styles.css";
import { Calendar } from "./Calendar";
<Meta title="UI/Calendar" component={Calendar} />
<Meta title="UI/Calendar" component="calendar" />
<Title title="Calendar" suffix="Brief" subtitle="Version 2.0 — Last Update: 22 Aug 2022" />
@@ -19,7 +19,7 @@ import { Calendar } from "./Calendar";
The Args Table below shows you a breakdown of what props can be passed into the Calendar component. All props should have a desciption to make it self explanitory to see what is going on.
<CustomArgsTable of={Calendar} />
<CustomArgsTable of="calendar" />
## Example
@@ -1,6 +1,5 @@
import dayjs from "@calcom/dayjs";
import { Button, ButtonGroup } from "@calcom/ui";
import { ChevronLeft, ChevronRight } from "@calcom/ui/components/icon";
import { Button, ButtonGroup, Icon } from "@calcom/ui";
import { useCalendarStore } from "../../state/store";
@@ -30,7 +29,7 @@ export function SchedulerHeading() {
<ButtonGroup combined>
{/* TODO: i18n label with correct view */}
<Button
StartIcon={ChevronLeft}
StartIcon="chevron-left"
variant="icon"
color="secondary"
aria-label="Previous Week"
@@ -39,7 +38,7 @@ export function SchedulerHeading() {
}}
/>
<Button
StartIcon={ChevronRight}
StartIcon="chevron-right"
variant="icon"
color="secondary"
aria-label="Next Week"
@@ -6,8 +6,17 @@ import type { TApiKeys } from "@calcom/ee/api-keys/components/ApiKeyListItem";
import LicenseRequired from "@calcom/ee/common/components/LicenseRequired";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, DialogFooter, Form, showToast, Switch, TextField, Tooltip, SelectField } from "@calcom/ui";
import { Clipboard } from "@calcom/ui/components/icon";
import {
Button,
DialogFooter,
Form,
Icon,
SelectField,
showToast,
Switch,
TextField,
Tooltip,
} from "@calcom/ui";
export default function ApiKeyDialogForm({
defaultValues,
@@ -96,7 +105,7 @@ export default function ApiKeyDialogForm({
}}
type="button"
className="rounded-l-none text-base"
StartIcon={Clipboard}>
StartIcon="clipboard">
{t("copy")}
</Button>
</Tooltip>
@@ -13,7 +13,6 @@ import {
DropdownMenuTrigger,
showToast,
} from "@calcom/ui";
import { MoreHorizontal, Edit2, Trash } from "@calcom/ui/components/icon";
export type TApiKeys = RouterOutputs["viewer"]["apiKeys"]["list"][number];
@@ -69,12 +68,12 @@ const ApiKeyListItem = ({
<div>
<Dropdown>
<DropdownMenuTrigger asChild>
<Button type="button" variant="icon" color="secondary" StartIcon={MoreHorizontal} />
<Button type="button" variant="icon" color="secondary" StartIcon="ellipsis" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<DropdownItem type="button" onClick={onEditClick} StartIcon={Edit2}>
<DropdownItem type="button" onClick={onEditClick} StartIcon="pencil">
{t("edit") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -88,7 +87,7 @@ const ApiKeyListItem = ({
id: apiKey.id,
})
}
StartIcon={Trash}>
StartIcon="trash">
{t("delete") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -6,7 +6,6 @@ import React, { Fragment, useEffect } from "react";
import { SUPPORT_MAIL_ADDRESS, WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { EmptyScreen, Alert } from "@calcom/ui";
import { AlertTriangle } from "@calcom/ui/components/icon";
type LicenseRequiredProps = {
as?: keyof JSX.IntrinsicElements | "";
@@ -58,7 +57,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) =
</>
) : (
<EmptyScreen
Icon={AlertTriangle}
Icon="triangle-alert"
headline={t("enterprise_license")}
description={
<Trans i18nKey="enterprise_license_description">
@@ -14,7 +14,6 @@ import {
showToast,
EmptyScreen,
} from "@calcom/ui";
import { AlertTriangle, Trash2 } from "@calcom/ui/components/icon";
import CreateDirectory from "./CreateDirectory";
import DirectoryInfo from "./DirectoryInfo";
@@ -57,7 +56,7 @@ const ConfigureDirectorySync = ({ organizationId }: { organizationId: number | n
<EmptyScreen
headline="Error"
description={error.message || "Error getting dsync data"}
Icon={AlertTriangle}
Icon="triangle-alert"
/>
</div>
);
@@ -79,7 +78,7 @@ const ConfigureDirectorySync = ({ organizationId }: { organizationId: number | n
{/* Delete directory sync connection */}
<Dialog open={deleteDirectoryOpen} onOpenChange={setDeleteDirectoryOpen}>
<DialogTrigger asChild>
<Button color="destructive" className="mt-1" StartIcon={Trash2}>
<Button color="destructive" className="mt-1" StartIcon="trash">
{t("directory_sync_delete_connection")}
</Button>
</DialogTrigger>
@@ -87,7 +86,7 @@ const ConfigureDirectorySync = ({ organizationId }: { organizationId: number | n
title={t("directory_sync_delete_title")}
description={t("directory_sync_delete_description")}
type="creation"
Icon={AlertTriangle}>
Icon="triangle-alert">
<>
<div className="mb-10">
<p className="text-default mb-4">{t("directory_sync_delete_confirmation")}</p>
@@ -2,7 +2,7 @@ import type { Directory } from "@boxyhq/saml-jackson";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, showToast, Label, Tooltip } from "@calcom/ui";
import { Clipboard } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
const DirectoryInfo = ({ directory }: { directory: Directory }) => {
const { t } = useLocale();
@@ -28,7 +28,7 @@ const DirectoryInfo = ({ directory }: { directory: Directory }) => {
}}
type="button"
className="rounded-l-none text-base"
StartIcon={Clipboard}>
StartIcon="clipboard">
{t("copy")}
</Button>
</Tooltip>
@@ -50,7 +50,7 @@ const DirectoryInfo = ({ directory }: { directory: Directory }) => {
}}
type="button"
className="rounded-l-none text-base"
StartIcon={Clipboard}>
StartIcon="clipboard">
{t("copy")}
</Button>
</Tooltip>
@@ -3,8 +3,7 @@ import { useState } from "react";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Badge, TextField, showToast } from "@calcom/ui";
import { X, Plus } from "@calcom/ui/components/icon";
import { Badge, Icon, showToast, TextField } from "@calcom/ui";
interface GroupNameCellProps {
groupNames: string[];
@@ -76,7 +75,7 @@ const GroupNameCell = ({ groupNames, teamId, directoryId }: GroupNameCellProps)
<div className="flex items-center space-x-2 ">
<p>{name}</p>
<div className="hover:bg-emphasis rounded p-1">
<X className="h-4 w-4 stroke-[3px]" onClick={() => removeGroupName(name)} />
<Icon name="x" className="h-4 w-4 stroke-[3px]" onClick={() => removeGroupName(name)} />
</div>
</div>
</Badge>
@@ -106,7 +105,7 @@ const GroupNameCell = ({ groupNames, teamId, directoryId }: GroupNameCellProps)
<p>{t("add_group_name")}</p>
)}
<div className={classNames("rounded p-1", showTextInput && "hover:bg-emphasis ml-2")}>
<Plus className="h-4 w-4 stroke-[3px]" onClick={() => addGroupName(newGroupName)} />
<Icon name="plus" className="h-4 w-4 stroke-[3px]" onClick={() => addGroupName(newGroupName)} />
</div>
</div>
</Badge>
@@ -1,8 +1,8 @@
// eslint-disable-next-line no-restricted-imports
import { get } from "lodash";
import type { TFunction } from "next-i18next";
import { useState } from "react";
import type { Dispatch, SetStateAction } from "react";
import { useState } from "react";
import type { UseFormReturn } from "react-hook-form";
import type z from "zod";
@@ -11,8 +11,7 @@ import { classNames } from "@calcom/lib";
import type { Prisma } from "@calcom/prisma/client";
import { SchedulingType } from "@calcom/prisma/enums";
import type { _EventTypeModel } from "@calcom/prisma/zod/eventtype";
import { Tooltip, Badge, Switch } from "@calcom/ui";
import { Lock, Unlock } from "@calcom/ui/components/icon";
import { Badge, Icon, Switch, Tooltip } from "@calcom/ui";
export const LockedSwitch = (
isManagedEventType: boolean,
@@ -60,11 +59,7 @@ export const LockedIndicator = (
)}>
{!options.simple && (
<span className="inline-flex">
{isLocked ? (
<Lock className="text-subtle h-3 w-3" />
) : (
<Unlock className="text-subtle h-3 w-3" />
)}
<Icon name={isLocked ? "lock" : "lock-open"} className="text-subtle h-3 w-3" />
<span className="ml-1 font-medium">{stateText}</span>
</span>
)}
@@ -6,8 +6,7 @@ import z from "zod";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
import { trpc } from "@calcom/trpc/react";
import { Alert, Avatar, Button, Form, ImageUploader, Label, TextAreaField } from "@calcom/ui";
import { ArrowRight, Plus } from "@calcom/ui/components/icon";
import { Alert, Avatar, Button, Form, Icon, ImageUploader, Label, TextAreaField } from "@calcom/ui";
const querySchema = z.object({
id: z.string(),
@@ -64,7 +63,7 @@ export const AboutOrganizationForm = () => {
<div className="flex items-center">
<Avatar
alt=""
fallback={<Plus className="text-subtle h-6 w-6" />}
fallback={<Icon name="plus" className="text-subtle h-6 w-6" />}
className="items-center"
imageSrc={image}
size="lg"
@@ -112,7 +111,7 @@ export const AboutOrganizationForm = () => {
aboutOrganizationFormMethods.formState.isSubmitting || updateOrganizationMutation.isPending
}
color="primary"
EndIcon={ArrowRight}
EndIcon="arrow-right"
type="submit"
className="w-full justify-center">
{t("continue")}
@@ -1,7 +1,7 @@
import { useSession } from "next-auth/react";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { useFieldArray, useForm, Controller } from "react-hook-form";
import { Controller, useFieldArray, useForm } from "react-hook-form";
import { z } from "zod";
import { classNames } from "@calcom/lib";
@@ -10,8 +10,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
import { UserPermissionRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import { Button, showToast, TextField, CheckboxField, Form } from "@calcom/ui";
import { ArrowRight, Plus, X } from "@calcom/ui/components/icon";
import { Button, CheckboxField, Form, Icon, showToast, TextField } from "@calcom/ui";
const querySchema = z.object({
id: z.string().transform((val) => parseInt(val)),
@@ -209,7 +208,10 @@ const AddNewTeamsFormChild = ({
className="group/remove mx-2 px-0 hover:bg-transparent"
onClick={() => handleRemoveInput(index)}
aria-label="Remove Team">
<X className="bg-subtle text group-hover/remove:text-inverted group-hover/remove:bg-inverted h-5 w-5 rounded-full p-1" />
<Icon
name="x"
className="bg-subtle text group-hover/remove:text-inverted group-hover/remove:bg-inverted h-5 w-5 rounded-full p-1"
/>
</Button>
)
}
@@ -221,7 +223,7 @@ const AddNewTeamsFormChild = ({
{counter === 5 && <p className="text-subtle my-2 text-sm">{t("org_max_team_warnings")}</p>}
{counter < 5 && (
<Button
StartIcon={Plus}
StartIcon="plus"
color="secondary"
disabled={createTeamsMutation.isPending}
onClick={handleCounterIncrease}
@@ -231,7 +233,7 @@ const AddNewTeamsFormChild = ({
</Button>
)}
<Button
EndIcon={ArrowRight}
EndIcon="arrow-right"
color="primary"
className="mt-6 w-full justify-center"
data-testId="continue_or_checkout"
@@ -1,6 +1,5 @@
import { useSession } from "next-auth/react";
import { signIn } from "next-auth/react";
import type { SessionContextValue } from "next-auth/react";
import { signIn, useSession } from "next-auth/react";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { Controller, useForm } from "react-hook-form";
@@ -14,8 +13,7 @@ import { telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
import { UserPermissionRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import type { Ensure } from "@calcom/types/utils";
import { Button, Form, TextField, Alert, RadioGroup as RadioArea } from "@calcom/ui";
import { ArrowRight } from "@calcom/ui/components/icon";
import { Alert, Button, Form, RadioGroup as RadioArea, TextField } from "@calcom/ui";
function extractDomainFromEmail(email: string) {
let out = "";
@@ -273,7 +271,7 @@ const CreateANewOrganizationFormChild = ({ session }: { session: Ensure<SessionC
newOrganizationFormMethods.formState.isSubmitting || createOrganizationMutation.isPending
}
color="primary"
EndIcon={ArrowRight}
EndIcon="arrow-right"
type="submit"
form="createOrg"
className="w-full justify-center">
@@ -11,10 +11,10 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
Icon,
Tooltip,
UserAvatar,
} from "@calcom/ui";
import { ExternalLink, MoreHorizontal } from "@calcom/ui/components/icon";
interface Props {
member: RouterOutputs["viewer"]["organizations"]["listOtherTeamMembers"]["rows"][number];
@@ -73,7 +73,7 @@ export default function MemberListItem(props: Props) {
color="secondary"
className={classNames("rounded-r-md")}
variant="icon"
StartIcon={ExternalLink}
StartIcon="external-link"
disabled={!member.accepted}
/>
</Tooltip>
@@ -82,7 +82,12 @@ export default function MemberListItem(props: Props) {
<div className="flex md:hidden">
<Dropdown>
<DropdownMenuTrigger asChild>
<Button type="button" variant="icon" color="minimal" StartIcon={MoreHorizontal} />
<Button
type="button"
variant="icon"
color="minimal"
StartIcon="ellipsis"
/>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem className="outline-none">
@@ -91,7 +96,7 @@ export default function MemberListItem(props: Props) {
href={`/${user.username}`}
target="_blank"
type="button"
StartIcon={ExternalLink}>
StartIcon="external-link">
{t("view_public_page")}
</DropdownItem>
</DropdownMenuItem>
@@ -16,7 +16,6 @@ import {
showToast,
Tooltip,
} from "@calcom/ui";
import { Edit2, ExternalLink, Link as LinkIcon, MoreHorizontal, Trash } from "@calcom/ui/components/icon";
import { useOrgBranding } from "../../../organizations/context/provider";
@@ -83,7 +82,7 @@ export default function OtherTeamListItem(props: Props) {
showToast(t("link_copied"), "success");
}}
variant="icon"
StartIcon={LinkIcon}
StartIcon="link"
/>
</Tooltip>
)}
@@ -94,7 +93,7 @@ export default function OtherTeamListItem(props: Props) {
type="button"
color="secondary"
variant="icon"
StartIcon={MoreHorizontal}
StartIcon="ellipsis"
/>
</DropdownMenuTrigger>
<DropdownMenuContent hidden={hideDropdown}>
@@ -102,7 +101,7 @@ export default function OtherTeamListItem(props: Props) {
<DropdownItem
type="button"
href={`/settings/teams/other/${team.id}/profile`}
StartIcon={Edit2}>
StartIcon="pencil">
{t("edit_team") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -117,7 +116,7 @@ export default function OtherTeamListItem(props: Props) {
? `${orgBranding.fullDomain}`
: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/other`
}/${team.slug}`}
StartIcon={ExternalLink}>
StartIcon="external-link">
{t("preview_team") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -129,7 +128,7 @@ export default function OtherTeamListItem(props: Props) {
<DropdownItem
color="destructive"
type="button"
StartIcon={Trash}
StartIcon="trash"
onClick={(e) => {
e.stopPropagation();
}}>
@@ -8,15 +8,14 @@ import LicenseRequired from "@calcom/ee/common/components/LicenseRequired";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import {
Meta,
DropdownActions,
showToast,
Table,
Badge,
ConfirmationDialogContent,
Dialog,
DropdownActions,
Meta,
showToast,
Table,
} from "@calcom/ui";
import { Check, CheckCheck, Trash, Edit, BookOpenCheck } from "@calcom/ui/components/icon";
import { getLayout } from "../../../../../settings/layouts/SettingsLayout";
import { subdomainSuffix } from "../../../../organizations/lib/orgDomains";
@@ -145,7 +144,7 @@ function AdminOrgTable() {
orgId: org.id,
});
},
icon: Check,
icon: "check" as const,
},
]
: []),
@@ -162,7 +161,7 @@ function AdminOrgTable() {
},
});
},
icon: CheckCheck,
icon: "check-check" as const,
},
]
: []),
@@ -170,7 +169,7 @@ function AdminOrgTable() {
id: "edit",
label: t("edit"),
href: `/settings/admin/organizations/${org.id}/edit`,
icon: Edit,
icon: "pencil" as const,
},
...(!org.slug
? [
@@ -180,7 +179,7 @@ function AdminOrgTable() {
onClick: () => {
publishOrg(org);
},
icon: BookOpenCheck,
icon: "book-open-check" as const,
},
]
: []),
@@ -190,7 +189,7 @@ function AdminOrgTable() {
onClick: () => {
setOrgToDelete(org);
},
icon: Trash,
icon: "trash" as const,
},
]}
/>
@@ -17,7 +17,7 @@ import { MembershipRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { Button, Form, Meta, showToast, SettingsToggle, Avatar, ImageUploader } from "@calcom/ui";
import { Plus } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
type BrandColorsFormValues = {
brandColor: string;
@@ -91,7 +91,7 @@ const OrgAppearanceView = ({
<Avatar
alt="calVideoLogo"
imageSrc={currentOrg?.calVideoLogo}
fallback={<Plus className="text-subtle h-6 w-6" />}
fallback={<Icon name="plus" className="text-subtle h-6 w-6" />}
size="lg"
/>
<div className="ms-4">
@@ -13,7 +13,7 @@ import { MembershipRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { Meta, showToast, Button } from "@calcom/ui";
import { Plus } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import { getLayout } from "../../../../settings/layouts/SettingsLayout";
import MakeTeamPrivateSwitch from "../../../teams/components/MakeTeamPrivateSwitch";
@@ -145,7 +145,7 @@ const MembersView = () => {
<Button
type="button"
color="primary"
StartIcon={Plus}
StartIcon="plus"
className="ml-auto"
onClick={() => setShowMemberInvitationModal(true)}
data-testid="new-member-button">
@@ -5,7 +5,7 @@ import type { Prisma } from "@prisma/client";
import { useSession } from "next-auth/react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useState, useLayoutEffect, useEffect } from "react";
import { useEffect, useLayoutEffect, useState } from "react";
import { Controller, useForm } from "react-hook-form";
import { z } from "zod";
@@ -20,23 +20,24 @@ import objectKeys from "@calcom/lib/objectKeys";
import slugify from "@calcom/lib/slugify";
import turndown from "@calcom/lib/turndownService";
import { trpc } from "@calcom/trpc/react";
import { SkeletonContainer, SkeletonText } from "@calcom/ui";
import {
Avatar,
Button,
ConfirmationDialogContent,
Dialog,
DialogTrigger,
Editor,
Form,
Icon,
ImageUploader,
Label,
LinkIconButton,
Meta,
showToast,
SkeletonContainer,
SkeletonText,
TextField,
Editor,
} from "@calcom/ui";
import { ExternalLink, Link as LinkIcon, Trash2 } from "@calcom/ui/components/icon";
import { getLayout } from "../../../../settings/layouts/SettingsLayout";
import { subdomainSuffix } from "../../../organizations/lib/orgDomains";
@@ -299,10 +300,12 @@ const OtherTeamProfileView = () => {
</div>
<div className="">
<Link href={permalink} passHref={true} target="_blank">
<LinkIconButton Icon={ExternalLink}>{t("preview")}</LinkIconButton>
<LinkIconButton Icon="external-link">
{t("preview")}
</LinkIconButton>
</Link>
<LinkIconButton
Icon={LinkIcon}
Icon="link"
onClick={() => {
navigator.clipboard.writeText(permalink);
showToast("Copied to clipboard", "success");
@@ -318,7 +321,10 @@ const OtherTeamProfileView = () => {
<Dialog>
<DialogTrigger asChild>
<Button color="destructive" className="border" StartIcon={Trash2}>
<Button
color="destructive"
className="border"
StartIcon="trash-2">
{t("disband_team")}
</Button>
</DialogTrigger>
@@ -2,9 +2,8 @@
import { zodResolver } from "@hookform/resolvers/zod";
import type { Prisma } from "@prisma/client";
import { LinkIcon } from "lucide-react";
import { useRouter } from "next/navigation";
import { useState, useLayoutEffect, useEffect } from "react";
import { useEffect, useLayoutEffect, useState } from "react";
import { Controller, useForm } from "react-hook-form";
import { z } from "zod";
@@ -19,20 +18,21 @@ import { MembershipRole } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import {
Avatar,
Button,
Form,
ImageUploader,
BannerUploader,
Button,
Editor,
Form,
Icon,
ImageUploader,
Label,
LinkIconButton,
Meta,
showToast,
TextField,
Editor,
LinkIconButton,
SkeletonAvatar,
SkeletonButton,
SkeletonContainer,
SkeletonText,
TextField,
} from "@calcom/ui";
import { getLayout } from "../../../../settings/layouts/SettingsLayout";
@@ -146,7 +146,7 @@ const OrgProfileView = () => {
</div>
<div className="">
<LinkIconButton
Icon={LinkIcon}
Icon="link"
onClick={() => {
navigator.clipboard.writeText(orgBranding.fullDomain);
showToast("Copied to clipboard", "success");
@@ -9,8 +9,8 @@ import { useEffect, useState } from "react";
import { getSuccessPageLocationMessage } from "@calcom/app-store/locations";
import dayjs from "@calcom/dayjs";
import { sdkActionManager, useIsEmbed } from "@calcom/embed-core/embed-iframe";
import { PayIcon } from "@calcom/features/bookings/components/event-meta/PayIcon";
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
import { getPayIcon } from "@calcom/features/bookings/components/event-meta/getPayIcon";
import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants";
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -76,7 +76,6 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
}, [isEmbed]);
const eventName = props.booking.title;
const PayIcon = getPayIcon(paymentAppData.currency);
return (
<div className="h-screen">
@@ -103,7 +102,7 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
aria-labelledby="modal-headline">
<div>
<div className="bg-success mx-auto flex h-12 w-12 items-center justify-center rounded-full">
<PayIcon className="h-8 w-8 text-green-600" />
<PayIcon currency={paymentAppData.currency} className="h-8 w-8 text-green-600" />
</div>
<div className="mt-3 text-center sm:mt-5">
@@ -4,14 +4,14 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import {
Button,
showToast,
Tooltip,
ConfirmationDialogContent,
Dialog,
DialogTrigger,
Icon,
Label,
showToast,
Tooltip,
} from "@calcom/ui";
import { Clipboard } from "@calcom/ui/components/icon";
export default function ConnectionInfo({
teamId,
@@ -103,7 +103,7 @@ const SAMLInfo = ({ acsUrl, entityId }: { acsUrl: string | null; entityId: strin
}}
type="button"
className="rounded-l-none py-[19px] text-base ">
<Clipboard className="text-muted h-5 w-5 ltr:mr-2 rtl:ml-2" />
<Icon name="clipboard" className="text-muted h-5 w-5 ltr:mr-2 rtl:ml-2" />
{t("copy")}
</Button>
</Tooltip>
@@ -125,7 +125,7 @@ const SAMLInfo = ({ acsUrl, entityId }: { acsUrl: string | null; entityId: strin
}}
type="button"
className="rounded-l-none py-[19px] text-base ">
<Clipboard className="text-muted h-5 w-5 ltr:mr-2 rtl:ml-2" />
<Icon name="clipboard" className="text-muted h-5 w-5 ltr:mr-2 rtl:ml-2" />
{t("copy")}
</Button>
</Tooltip>
@@ -161,7 +161,7 @@ const OIDCInfo = ({ callbackUrl }: { callbackUrl: string | null }) => {
}}
type="button"
className="rounded-l-none py-[19px] text-base ">
<Clipboard className="text-muted h-5 w-5 ltr:mr-2 rtl:ml-2" />
<Icon name="clipboard" className="text-muted h-5 w-5 ltr:mr-2 rtl:ml-2" />
{t("copy")}
</Button>
</Tooltip>
@@ -1,8 +1,7 @@
import { JOIN_DISCORD } from "@calcom/lib/constants";
import { useHasPaidPlan } from "@calcom/lib/hooks/useHasPaidPlan";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { UpgradeTeamsBadge } from "@calcom/ui";
import { ExternalLink } from "@calcom/ui/components/icon";
import { Icon, UpgradeTeamsBadge } from "@calcom/ui";
import FreshChatMenuItem from "../lib/freshchat/FreshChatMenuItem";
import HelpscoutMenuItem from "../lib/helpscout/HelpscoutMenuItem";
@@ -37,7 +36,10 @@ export default function ContactMenuItem(props: ContactMenuItem) {
target="_blank"
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium">
{t("community_support")}{" "}
<ExternalLink className="group-hover:text-subtle text-muted ml-1 mt-px h-4 w-4 flex-shrink-0 ltr:mr-3" />
<Icon
name="external-link"
className="group-hover:text-subtle text-muted ml-1 mt-px h-4 w-4 flex-shrink-0 ltr:mr-3"
/>
</a>
</>
);
@@ -7,7 +7,7 @@ import { useHasPaidPlan } from "@calcom/lib/hooks/useHasPaidPlan";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, showToast, TextArea } from "@calcom/ui";
import { ExternalLink, AlertTriangle } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import { useFreshChat } from "../lib/freshchat/FreshChatProvider";
import { isFreshChatEnabled } from "../lib/freshchat/FreshChatScript";
@@ -59,7 +59,8 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium"
rel="noreferrer">
{t("documentation")}
<ExternalLink
<Icon
name="external-link"
className={classNames(
"group-hover:text-subtle text-muted",
"ml-1 mt-px h-4 w-4 flex-shrink-0 ltr:mr-3"
@@ -178,7 +179,7 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
{mutation.isError && (
<div className="bg-error mb-4 flex p-4 text-sm text-red-700">
<div className="flex-shrink-0">
<AlertTriangle className="h-5 w-5" />
<Icon name="triangle-alert" className="h-5 w-5" />
</div>
<div className="ml-3 flex-grow">
<p className="font-medium">{t("feedback_error")}</p>
@@ -1,6 +1,6 @@
import { useSession } from "next-auth/react";
import { useRouter } from "next/navigation";
import { useState, useEffect } from "react";
import { useEffect, useState } from "react";
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
import InviteLinkSettingsModal from "@calcom/features/ee/teams/components/InviteLinkSettingsModal";
@@ -9,20 +9,20 @@ import { classNames } from "@calcom/lib";
import { APP_NAME } from "@calcom/lib/constants";
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useTelemetry, telemetryEventTypes } from "@calcom/lib/telemetry";
import { telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
import { MembershipRole } from "@calcom/prisma/enums";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import {
Badge,
Button,
Icon,
showToast,
SkeletonButton,
SkeletonContainer,
SkeletonText,
UserAvatar,
} from "@calcom/ui";
import { ArrowRight, Plus, Trash2 } from "@calcom/ui/components/icon";
type TeamMember = RouterOutputs["viewer"]["teams"]["get"]["members"][number];
@@ -120,7 +120,7 @@ export const AddNewTeamMembersForm = ({
<Button
color="secondary"
data-testid="new-member-button"
StartIcon={Plus}
StartIcon="plus"
onClick={() => setMemberInviteModal(true)}
className={classNames("w-full justify-center", defaultValues.members.length > 0 && "mt-6")}>
{isOrg ? t("add_org_members") : t("add_team_member")}
@@ -196,7 +196,7 @@ export const AddNewTeamMembersForm = ({
<hr className="border-subtle my-6" />
<Button
data-testid="publish-button"
EndIcon={!orgBranding || isOrg ? ArrowRight : undefined}
EndIcon={!orgBranding || isOrg ? "arrow-right" : undefined}
color="primary"
className="w-full justify-center"
disabled={publishTeamMutation.isPending}
@@ -287,7 +287,7 @@ const PendingMemberItem = (props: { member: TeamMember; index: number; teamId: n
{(member.role !== "OWNER" || isOrgAdminOrOwner) && member.id !== session.data?.user.id && (
<Button
data-testid="remove-member-button"
StartIcon={Trash2}
StartIcon="trash-2"
variant="icon"
color="secondary"
className="h-[36px] w-[36px]"
@@ -3,10 +3,9 @@ import { Controller, useForm } from "react-hook-form";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import slugify from "@calcom/lib/slugify";
import { trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { Alert, Button, Form, TextField, DialogFooter } from "@calcom/ui";
import { ArrowRight } from "@calcom/ui/components/icon";
import { trpc } from "@calcom/trpc/react";
import { Alert, Button, DialogFooter, Form, TextField } from "@calcom/ui";
import { useOrgBranding } from "../../organizations/context/provider";
import { subdomainSuffix } from "../../organizations/lib/orgDomains";
@@ -55,7 +54,7 @@ export const CreateANewTeamForm = (props: CreateANewTeamFormProps) => {
<Button
disabled={newTeamFormMethods.formState.isSubmitting || createTeamMutation.isPending}
color="primary"
EndIcon={ArrowRight}
EndIcon="arrow-right"
type="submit"
className="w-full justify-center"
data-testid="continue-button">
@@ -1,4 +1,3 @@
import { UsersIcon, XIcon } from "lucide-react";
import type { PropsWithChildren } from "react";
import { useState } from "react";
@@ -75,7 +74,7 @@ export function GoogleWorkspaceInviteButton(
mutation.mutate();
}}
className="w-full justify-center gap-2"
StartIcon={UsersIcon}
StartIcon="users"
loading={mutation.isPending}>
{t("import_from_google_workspace")}
</Button>
@@ -84,7 +83,7 @@ export function GoogleWorkspaceInviteButton(
<Button
color="secondary"
loading={removeConnectionMutation.isPending}
StartIcon={XIcon}
StartIcon="x"
onClick={() => {
removeConnectionMutation.mutate();
utils.viewer.googleWorkspace.checkForGWorkspace.invalidate();
@@ -102,7 +101,7 @@ export function GoogleWorkspaceInviteButton(
type="button"
color="secondary"
loading={googleWorkspaceLoading}
StartIcon={GoogleIcon}
CustomStartIcon={<GoogleIcon />}
onClick={async () => {
setGoogleWorkspaceLoading(true);
const params = new URLSearchParams({
@@ -1,8 +1,7 @@
import { BuildingIcon, PaperclipIcon, UserIcon, Users } from "lucide-react";
import { useSession } from "next-auth/react";
import { Trans } from "next-i18next";
import { useMemo, useState, useRef } from "react";
import type { FormEvent } from "react";
import { useMemo, useRef, useState } from "react";
import { Controller, useForm } from "react-hook-form";
import TeamInviteFromOrg from "@calcom/ee/organizations/components/TeamInviteFromOrg";
@@ -19,14 +18,14 @@ import {
DialogContent,
DialogFooter,
Form,
Icon,
Label,
Select,
showToast,
TextAreaField,
TextField,
ToggleGroup,
Select,
TextAreaField,
} from "@calcom/ui";
import { Link } from "@calcom/ui/components/icon";
import type { PendingMember } from "../lib/types";
import { GoogleWorkspaceInviteButton } from "./GoogleWorkspaceInviteButton";
@@ -111,15 +110,15 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
{
value: "INDIVIDUAL",
label: t("invite_team_individual_segment"),
iconLeft: <UserIcon />,
iconLeft: <Icon name="user" />,
},
{ value: "BULK", label: t("invite_team_bulk_segment"), iconLeft: <Users /> },
{ value: "BULK", label: t("invite_team_bulk_segment"), iconLeft: <Icon name="users" /> },
];
if (props?.orgMembers && props.orgMembers?.length > 0) {
array.unshift({
value: "ORGANIZATION",
label: t("organization"),
iconLeft: <BuildingIcon />,
iconLeft: <Icon name="building" />,
});
}
return array;
@@ -299,7 +298,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
importRef.current.click();
}
}}
StartIcon={PaperclipIcon}
StartIcon="paperclip"
className="mt-3 justify-center stroke-2">
{t("upload_csv_file")}
</Button>
@@ -413,7 +412,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
}}
className={classNames("gap-2", props.token && "opacity-50")}
data-testid="copy-invite-link-button">
<Link className="text-default h-4 w-4" aria-hidden="true" />
<Icon name="link" className="text-default h-4 w-4" aria-hidden="true" />
<span className="hidden sm:inline">{t("copy_invite_link")}</span>
</Button>
</div>
@@ -1,5 +1,4 @@
import classNames from "classnames";
import { SendIcon } from "lucide-react";
import { signIn } from "next-auth/react";
import { useState } from "react";
@@ -24,9 +23,8 @@ import {
DropdownMenuTrigger,
showToast,
Tooltip,
UserAvatar,
} from "@calcom/ui";
import { UserAvatar } from "@calcom/ui";
import { ExternalLink, MoreHorizontal, Edit2, Lock, UserX } from "@calcom/ui/components/icon";
import MemberChangeRoleModal from "./MemberChangeRoleModal";
import TeamAvailabilityModal from "./TeamAvailabilityModal";
@@ -199,7 +197,7 @@ export default function MemberListItem(props: Props) {
onClick={() => (props.member.accepted ? setShowTeamAvailabilityModal(true) : null)}
color="secondary"
variant="icon"
StartIcon={Clock}
StartIcon="clock"
/>
</Tooltip> */}
{!!props.member.accepted && (
@@ -210,7 +208,7 @@ export default function MemberListItem(props: Props) {
color="secondary"
className={classNames(!editMode ? "rounded-r-md" : "")}
variant="icon"
StartIcon={ExternalLink}
StartIcon="external-link"
disabled={!props.member.accepted}
/>
</Tooltip>
@@ -222,7 +220,7 @@ export default function MemberListItem(props: Props) {
className="radix-state-open:rounded-r-md"
color="secondary"
variant="icon"
StartIcon={MoreHorizontal}
StartIcon="ellipsis"
/>
</DropdownMenuTrigger>
<DropdownMenuContent>
@@ -230,7 +228,7 @@ export default function MemberListItem(props: Props) {
<DropdownItem
type="button"
onClick={() => setShowChangeMemberRoleModal(true)}
StartIcon={Edit2}>
StartIcon="pencil">
{t("edit")}
</DropdownItem>
</DropdownMenuItem>
@@ -240,7 +238,7 @@ export default function MemberListItem(props: Props) {
<DropdownItem
type="button"
onClick={() => setShowImpersonateModal(true)}
StartIcon={Lock}>
StartIcon="lock">
{t("impersonate")}
</DropdownItem>
</DropdownMenuItem>
@@ -258,7 +256,7 @@ export default function MemberListItem(props: Props) {
language: i18n.language,
});
}}
StartIcon={SendIcon}>
StartIcon="send">
{t("resend_invitation")}
</DropdownItem>
</DropdownMenuItem>
@@ -268,7 +266,7 @@ export default function MemberListItem(props: Props) {
type="button"
onClick={() => setShowDeleteModal(true)}
color="destructive"
StartIcon={UserX}>
StartIcon="user-x">
{t("remove")}
</DropdownItem>
</DropdownMenuItem>
@@ -279,7 +277,7 @@ export default function MemberListItem(props: Props) {
<div className="flex md:hidden">
<Dropdown>
<DropdownMenuTrigger asChild>
<Button type="button" variant="icon" color="minimal" StartIcon={MoreHorizontal} />
<Button type="button" variant="icon" color="minimal" StartIcon="ellipsis" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem className="outline-none">
@@ -288,7 +286,7 @@ export default function MemberListItem(props: Props) {
href={!props.member.accepted ? undefined : `/${props.member.username}`}
target="_blank"
type="button"
StartIcon={ExternalLink}>
StartIcon="external-link">
{t("view_public_page")}
</DropdownItem>
</DropdownMenuItem>
@@ -298,7 +296,7 @@ export default function MemberListItem(props: Props) {
<DropdownItem
type="button"
onClick={() => setShowChangeMemberRoleModal(true)}
StartIcon={Edit2}>
StartIcon="pencil">
{t("edit")}
</DropdownItem>
</DropdownMenuItem>
@@ -307,7 +305,7 @@ export default function MemberListItem(props: Props) {
type="button"
color="destructive"
onClick={() => setShowDeleteModal(true)}
StartIcon={UserX}>
StartIcon="user-x">
{t("remove")}
</DropdownItem>
</DropdownMenuItem>
@@ -7,13 +7,12 @@ import {
Avatar,
Button,
Dropdown,
DropdownItem,
DropdownMenuContent,
DropdownMenuItem,
DropdownItem,
DropdownMenuTrigger,
showToast,
} from "@calcom/ui";
import { Ban, Check, MoreHorizontal, X } from "@calcom/ui/components/icon";
interface Props {
team: {
@@ -95,7 +94,7 @@ export default function TeamInviteListItem(props: Props) {
variant="icon"
color="secondary"
onClick={declineInvite}
StartIcon={Ban}
StartIcon="ban"
/>
<Button
type="button"
@@ -103,22 +102,22 @@ export default function TeamInviteListItem(props: Props) {
variant="icon"
color="secondary"
onClick={acceptInvite}
StartIcon={Check}
StartIcon="check"
/>
</div>
<div className="block sm:hidden">
<Dropdown>
<DropdownMenuTrigger asChild>
<Button type="button" color="minimal" variant="icon" StartIcon={MoreHorizontal} />
<Button type="button" color="minimal" variant="icon" StartIcon="ellipsis" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<DropdownItem type="button" StartIcon={Check} onClick={acceptInvite}>
<DropdownItem type="button" StartIcon="check" onClick={acceptInvite}>
{t("accept")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem color="destructive" type="button" StartIcon={X} onClick={declineInvite}>
<DropdownItem color="destructive" type="button" StartIcon="x" onClick={declineInvite}>
{t("reject")}
</DropdownItem>
</DropdownMenuItem>
@@ -5,8 +5,7 @@ import { trackFormbricksAction } from "@calcom/lib/formbricks-client";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { Card, showToast } from "@calcom/ui";
import { UserPlus, Building, LineChart, Paintbrush, Users, Edit } from "@calcom/ui/components/icon";
import { Card, Icon, showToast } from "@calcom/ui";
import TeamListItem from "./TeamListItem";
@@ -61,10 +60,10 @@ export default function TeamList(props: Props) {
(team, i) =>
team.role !== "MEMBER" &&
i === 0 && (
<div className="bg-subtle p-4">
<div className="bg-subtle p-4" key={team.id}>
<div className="grid-col-1 grid gap-2 md:grid-cols-3">
<Card
icon={<Building className="h-5 w-5 text-red-700" />}
icon={<Icon name="building" className="h-5 w-5 text-red-700" />}
variant="basic"
title={t("You have a lot of teams")}
description={t(
@@ -77,7 +76,7 @@ export default function TeamList(props: Props) {
}}
/>
<Card
icon={<Paintbrush className="h-5 w-5 text-orange-700" />}
icon={<Icon name="paintbrush" className="h-5 w-5 text-orange-700" />}
variant="basic"
title={t("Get a clean subdomain")}
description={t(
@@ -89,7 +88,7 @@ export default function TeamList(props: Props) {
}}
/>
<Card
icon={<LineChart className="h-5 w-5 text-green-700" />}
icon={<Icon name="line-chart" className="h-5 w-5 text-green-700" />}
variant="basic"
title={t("Admin tools and analytics")}
description={t(
@@ -126,7 +125,7 @@ export default function TeamList(props: Props) {
<h3 className="text-emphasis mb-4 text-sm font-semibold">{t("recommended_next_steps")}</h3>
<div className="grid-col-1 grid gap-2 md:grid-cols-3">
<Card
icon={<UserPlus className="h-5 w-5 text-green-700" />}
icon={<Icon name="user-plus" className="h-5 w-5 text-green-700" />}
variant="basic"
title={t("invite_team_member")}
description={t("meetings_are_better_with_the_right")}
@@ -136,7 +135,7 @@ export default function TeamList(props: Props) {
}}
/>
<Card
icon={<Users className="h-5 w-5 text-orange-700" />}
icon={<Icon name="users" className="h-5 w-5 text-orange-700" />}
variant="basic"
title={t("collective_or_roundrobin")}
description={t("book_your_team_members")}
@@ -146,7 +145,7 @@ export default function TeamList(props: Props) {
}}
/>
<Card
icon={<Edit className="h-5 w-5 text-purple-700" />}
icon={<Icon name="pencil" className="h-5 w-5 text-purple-700" />}
variant="basic"
title={t("appearance")}
description={t("appearance_description")}
@@ -29,18 +29,6 @@ import {
showToast,
Tooltip,
} from "@calcom/ui";
import {
Check,
Edit2,
ExternalLink,
Globe,
Link as LinkIcon,
LogOut,
MoreHorizontal,
Send,
Trash,
X,
} from "@calcom/ui/components/icon";
import { TeamRole } from "./TeamPill";
@@ -211,7 +199,7 @@ export default function TeamListItem(props: Props) {
type="button"
color="secondary"
data-testid={`accept-invitation-${team.id}`}
StartIcon={Check}
StartIcon="check"
className="me-2 ms-2"
onClick={acceptInvite}>
{t("accept")}
@@ -220,16 +208,16 @@ export default function TeamListItem(props: Props) {
<div className="block sm:hidden">
<Dropdown>
<DropdownMenuTrigger asChild>
<Button type="button" color="minimal" variant="icon" StartIcon={MoreHorizontal} />
<Button type="button" color="minimal" variant="icon" StartIcon="ellipsis" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<DropdownItem type="button" StartIcon={Check} onClick={acceptInvite}>
<DropdownItem type="button" StartIcon="check" onClick={acceptInvite}>
{t("accept")}
</DropdownItem>
</DropdownMenuItem>
<DropdownMenuItem>
<DropdownItem color="destructive" type="button" StartIcon={X} onClick={declineInvite}>
<DropdownItem color="destructive" type="button" StartIcon="x" onClick={declineInvite}>
{t("reject")}
</DropdownItem>
</DropdownMenuItem>
@@ -255,7 +243,7 @@ export default function TeamListItem(props: Props) {
showToast(t("link_copied"), "success");
}}
variant="icon"
StartIcon={LinkIcon}
StartIcon="link"
/>
</Tooltip>
)}
@@ -266,7 +254,7 @@ export default function TeamListItem(props: Props) {
type="button"
color="secondary"
variant="icon"
StartIcon={MoreHorizontal}
StartIcon="ellipsis"
/>
</DropdownMenuTrigger>
<DropdownMenuContent hidden={hideDropdown}>
@@ -275,7 +263,7 @@ export default function TeamListItem(props: Props) {
<DropdownItem
type="button"
href={`/settings/teams/${team.id}/profile`}
StartIcon={Edit2}>
StartIcon="pencil">
{t("edit_team") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -290,7 +278,7 @@ export default function TeamListItem(props: Props) {
orgSlug: team.parent ? team.parent.slug : null,
teamSlug: team.slug,
})}`}
StartIcon={ExternalLink}>
StartIcon="external-link">
{t("preview_team") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -302,7 +290,7 @@ export default function TeamListItem(props: Props) {
onClick={() => {
setOpenMemberInvitationModal(true);
}}
StartIcon={Send}>
StartIcon="send">
{t("invite_team_member") as string}
</DropdownItem>
</DropdownMenuItem>
@@ -315,7 +303,7 @@ export default function TeamListItem(props: Props) {
<DropdownItem
color="destructive"
type="button"
StartIcon={Trash}
StartIcon="trash"
onClick={(e) => {
e.stopPropagation();
}}>
@@ -343,7 +331,7 @@ export default function TeamListItem(props: Props) {
<DropdownItem
color="destructive"
type="button"
StartIcon={LogOut}
StartIcon="log-out"
onClick={(e) => {
e.stopPropagation();
}}>
@@ -390,7 +378,7 @@ const TeamPublishButton = ({ teamId }: { teamId: number }) => {
onClick={() => {
publishTeamMutation.mutate({ teamId });
}}
StartIcon={Globe}>
StartIcon="globe">
{t("team_publish")}
</DropdownItem>
</DropdownMenuItem>
@@ -5,8 +5,7 @@ import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Alert, Button, ButtonGroup, EmptyScreen, Label, showToast } from "@calcom/ui";
import { EyeOff, Mail, RefreshCcw, UserPlus, Users, Video } from "@calcom/ui/components/icon";
import { Alert, Button, ButtonGroup, EmptyScreen, Icon, Label, showToast } from "@calcom/ui";
import { UpgradeTip } from "../../../tips";
import SkeletonLoaderTeamList from "./SkeletonloaderTeamList";
@@ -63,32 +62,32 @@ export function TeamsListing() {
const features = [
{
icon: <Users className="h-5 w-5 text-red-500" />,
icon: <Icon name="users" className="h-5 w-5 text-red-500" />,
title: t("collective_scheduling"),
description: t("make_it_easy_to_book"),
},
{
icon: <RefreshCcw className="h-5 w-5 text-blue-500" />,
icon: <Icon name="refresh-ccw" className="h-5 w-5 text-blue-500" />,
title: t("round_robin"),
description: t("find_the_best_person"),
},
{
icon: <UserPlus className="h-5 w-5 text-green-500" />,
icon: <Icon name="user-plus" className="h-5 w-5 text-green-500" />,
title: t("fixed_round_robin"),
description: t("add_one_fixed_attendee"),
},
{
icon: <Mail className="h-5 w-5 text-orange-500" />,
icon: <Icon name="mail" className="h-5 w-5 text-orange-500" />,
title: t("sms_attendee_action"),
description: t("send_reminder_sms"),
},
{
icon: <Video className="h-5 w-5 text-purple-500" />,
icon: <Icon name="video" className="h-5 w-5 text-purple-500" />,
title: `Cal Video ${t("recordings_title")}`,
description: t("upgrade_to_access_recordings_description"),
},
{
icon: <EyeOff className="h-5 w-5 text-indigo-500" />,
icon: <Icon name="eye-off" className="h-5 w-5 text-indigo-500" />,
title: t("disable_cal_branding", { appName: APP_NAME }),
description: t("disable_cal_branding_description", { appName: APP_NAME }),
},
@@ -148,7 +147,7 @@ export function TeamsListing() {
<TeamList teams={teams} />
) : (
<EmptyScreen
Icon={Users}
Icon="users"
headline={t("create_team_to_get_started")}
description={t("create_first_team_and_invite_others")}
buttonRaw={
@@ -3,7 +3,6 @@ import { usePathname } from "next/navigation";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Meta } from "@calcom/ui";
import { ExternalLink } from "@calcom/ui/components/icon";
import { getLayout } from "../../../settings/layouts/SettingsLayout";
@@ -21,7 +20,7 @@ const BillingView = () => {
<p>{t("view_and_edit_billing_details")}</p>
</div>
<div className="flex-shrink-0 pt-3 sm:ml-auto sm:pl-3 sm:pt-0">
<Button color="primary" href={billingHref} target="_blank" EndIcon={ExternalLink}>
<Button color="primary" href={billingHref} target="_blank" EndIcon="external-link">
{t("billing_portal")}
</Button>
</div>
@@ -11,7 +11,7 @@ import { MembershipRole } from "@calcom/prisma/enums";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { Button, Meta, showToast, TextField } from "@calcom/ui";
import { Plus } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
import { getLayout } from "../../../settings/layouts/SettingsLayout";
import DisableTeamImpersonation from "../components/DisableTeamImpersonation";
@@ -147,7 +147,7 @@ const MembersView = () => {
<Button
type="button"
color="primary"
StartIcon={Plus}
StartIcon="plus"
className="ml-auto"
onClick={() => setShowMemberInvitationModal(true)}
data-testid="new-member-button">
@@ -5,7 +5,7 @@ import type { Prisma } from "@prisma/client";
import { useSession } from "next-auth/react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useLayoutEffect, useState, useEffect } from "react";
import { useEffect, useLayoutEffect, useState } from "react";
import { Controller, useForm } from "react-hook-form";
import { z } from "zod";
@@ -37,13 +37,12 @@ import {
LinkIconButton,
Meta,
showToast,
SkeletonAvatar,
SkeletonButton,
SkeletonContainer,
SkeletonText,
TextField,
SkeletonAvatar,
SkeletonButton,
} from "@calcom/ui";
import { ExternalLink, Link as LinkIcon, LogOut, Trash2 } from "@calcom/ui/components/icon";
import { getLayout } from "../../../settings/layouts/SettingsLayout";
@@ -182,10 +181,10 @@ const ProfileView = () => {
</div>
<div>
<Link href={permalink} passHref={true} target="_blank">
<LinkIconButton Icon={ExternalLink}>{t("preview")}</LinkIconButton>
<LinkIconButton Icon="external-link">{t("preview")}</LinkIconButton>
</Link>
<LinkIconButton
Icon={LinkIcon}
Icon="link"
onClick={() => {
navigator.clipboard.writeText(permalink);
showToast("Copied to clipboard", "success");
@@ -209,7 +208,7 @@ const ProfileView = () => {
<Button
color="destructive"
className="border"
StartIcon={Trash2}
StartIcon="trash-2"
data-testid="disband-team-button">
{t("disband_team")}
</Button>
@@ -229,7 +228,7 @@ const ProfileView = () => {
<Dialog>
<SectionBottomActions align="end">
<DialogTrigger asChild>
<Button color="destructive" className="border" StartIcon={LogOut}>
<Button color="destructive" className="border" StartIcon="log-out">
{t("leave_team")}
</Button>
</DialogTrigger>
@@ -17,11 +17,11 @@ import {
DialogContent,
DialogFooter,
DropdownActions,
Icon,
showToast,
Table,
TextField,
} from "@calcom/ui";
import { Edit, Lock, Trash, User, VenetianMask, Shield } from "@calcom/ui/components/icon";
import { withLicenseRequired } from "../../common/components/LicenseRequired";
@@ -191,7 +191,7 @@ function UsersTableBare() {
<span className="ml-3">/{user.username}</span>
{user.locked && (
<span className="ml-3">
<Lock />
<Icon name="lock" />
</span>
)}
<br />
@@ -213,25 +213,25 @@ function UsersTableBare() {
id: "edit",
label: "Edit",
href: `/settings/admin/users/${user.id}/edit`,
icon: Edit,
icon: "pencil",
},
{
id: "reset-password",
label: "Reset Password",
onClick: () => sendPasswordResetEmail.mutate({ userId: user.id }),
icon: Lock,
icon: "lock",
},
{
id: "impersonate-user",
label: "Impersonate User",
onClick: () => handleImpersonateUser(user?.username),
icon: User,
icon: "user",
},
{
id: "lock-user",
label: user.locked ? "Unlock User Account" : "Lock User Account",
onClick: () => lockUserAccount.mutate({ userId: user.id, locked: !user.locked }),
icon: Lock,
icon: "lock",
},
{
id: "impersonation",
@@ -240,21 +240,21 @@ function UsersTableBare() {
setSelectedUser(user.username);
setShowImpersonateModal(true);
},
icon: VenetianMask,
icon: "venetian-mask",
},
{
id: "remove-2fa",
label: "Remove 2FA",
color: "destructive",
onClick: () => removeTwoFactor.mutate({ userId: user.id }),
icon: Shield,
icon: "shield",
},
{
id: "delete",
label: "Delete",
color: "destructive",
onClick: () => setUserToDelete(user.id),
icon: Trash,
icon: "trash",
},
]}
/>
@@ -1,5 +1,5 @@
import { useRouter } from "next/navigation";
import { useState, Suspense, useEffect } from "react";
import { Suspense, useEffect, useState } from "react";
import dayjs from "@calcom/dayjs";
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
@@ -9,9 +9,7 @@ import type { RecordingItemSchema } from "@calcom/prisma/zod-utils";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { PartialReference } from "@calcom/types/EventManager";
import { Dialog, DialogClose, DialogContent, DialogFooter, DialogHeader } from "@calcom/ui";
import { Button } from "@calcom/ui";
import { Download } from "@calcom/ui/components/icon";
import { Button, Dialog, DialogClose, DialogContent, DialogFooter, DialogHeader, Icon } from "@calcom/ui";
import RecordingListSkeleton from "./components/RecordingListSkeleton";
@@ -129,7 +127,7 @@ const ViewRecordingsList = ({ roomName, hasTeamPlan }: { roomName: string; hasTe
</div>
{hasTeamPlan ? (
<Button
StartIcon={Download}
StartIcon="download"
className="ml-4 lg:ml-0"
loading={isFetching && recordingId === recording.id}
onClick={() => handleDownloadClick(recording.id)}>
@@ -18,13 +18,13 @@ import {
DialogFooter,
EmailField,
Form,
Icon,
Input,
Label,
PhoneInput,
Select,
Tooltip,
} from "@calcom/ui";
import { Info } from "@calcom/ui/components/icon";
import { WORKFLOW_ACTIONS } from "../lib/constants";
import { onlyLettersNumbersSpaces } from "../pages/workflow";
@@ -220,7 +220,7 @@ export const AddActionDialog = (props: IAddActionDialog) => {
<div className="flex">
<Label>{t("sender_id")}</Label>
<Tooltip content={t("sender_id_info")}>
<Info className="ml-2 mr-1 mt-0.5 h-4 w-4 text-gray-500" />
<Icon name="info" className="ml-2 mr-1 mt-0.5 h-4 w-4 text-gray-500" />
</Tooltip>
</div>
<Input type="text" placeholder={SENDER_ID} maxLength={11} {...form.register(`senderId`)} />
@@ -3,25 +3,23 @@ import { useRouter } from "next/navigation";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { HttpError } from "@calcom/lib/http-error";
import { trpc } from "@calcom/trpc/react";
import type { SVGComponent } from "@calcom/types/SVGComponent";
import { CreateButtonWithTeamsList, EmptyScreen as ClassicEmptyScreen, showToast } from "@calcom/ui";
import { Mail, Smartphone, Zap } from "@calcom/ui/components/icon";
import type { LucideIcon } from "@calcom/ui/components/icon";
import type { IconName } from "@calcom/ui";
import { CreateButtonWithTeamsList, EmptyScreen as ClassicEmptyScreen, Icon, showToast } from "@calcom/ui";
type WorkflowExampleType = {
Icon: SVGComponent | LucideIcon;
Icon: IconName;
text: string;
};
function WorkflowExample(props: WorkflowExampleType) {
const { Icon, text } = props;
const { Icon: iconName, text } = props;
return (
<div className="border-subtle mx-2 my-2 max-h-24 max-w-[600px] rounded-md border border-solid p-6">
<div className="flex ">
<div className="flex items-center justify-center">
<div className="bg-emphasis dark:bg-default mr-4 flex h-10 w-10 items-center justify-center rounded-full">
<Icon className="text-default h-6 w-6 stroke-[2px]" />
<Icon name={iconName} className="text-default h-6 w-6 stroke-[2px]" />
</div>
</div>
<div className="m-auto w-full flex-grow items-center justify-center ">
@@ -54,24 +52,24 @@ export default function EmptyScreen(props: { isFilteredView: boolean }) {
});
const workflowsExamples = [
{ icon: Smartphone, text: t("workflow_example_1") },
{ icon: Smartphone, text: t("workflow_example_2") },
{ icon: Mail, text: t("workflow_example_3") },
{ icon: Mail, text: t("workflow_example_4") },
{ icon: Mail, text: t("workflow_example_5") },
{ icon: Smartphone, text: t("workflow_example_6") },
];
{ icon: "smartphone", text: t("workflow_example_1") },
{ icon: "smartphone", text: t("workflow_example_2") },
{ icon: "mail", text: t("workflow_example_3") },
{ icon: "mail", text: t("workflow_example_4") },
{ icon: "mail", text: t("workflow_example_5") },
{ icon: "smartphone", text: t("workflow_example_6") },
] as const;
// new workflow example when 'after meetings ends' trigger is implemented: Send custom thank you email to attendee after event (Smile icon),
if (props.isFilteredView) {
return <ClassicEmptyScreen Icon={Zap} headline={t("no_workflows")} description={t("change_filter")} />;
return <ClassicEmptyScreen Icon="zap" headline={t("no_workflows")} description={t("change_filter")} />;
}
return (
<>
<div className="min-h-80 flex w-full flex-col items-center justify-center rounded-md ">
<div className="bg-emphasis flex h-[72px] w-[72px] items-center justify-center rounded-full">
<Zap className="dark:text-default inline-block h-10 w-10 stroke-[1.3px]" />
<Icon name="zap" className="dark:text-default inline-block h-10 w-10 stroke-[1.3px]" />
</div>
<div className="max-w-[420px] text-center">
<h2 className="text-semibold font-cal mt-6 text-xl dark:text-gray-300">{t("workflows")}</h2>
@@ -13,8 +13,7 @@ import { HttpError } from "@calcom/lib/http-error";
import { WorkflowActions } from "@calcom/prisma/enums";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { Button, EmptyScreen, showToast, Switch, Tooltip, Alert } from "@calcom/ui";
import { ExternalLink, Zap, Lock, Info } from "@calcom/ui/components/icon";
import { Alert, Button, EmptyScreen, Icon, showToast, Switch, Tooltip } from "@calcom/ui";
import LicenseRequired from "../../common/components/LicenseRequired";
import { getActionIcon } from "../lib/getActionIcon";
@@ -151,7 +150,7 @@ const WorkflowListItem = (props: ItemProps) => {
<Link href={`/workflows/${workflow.id}`} passHref={true} target="_blank">
<Button type="button" color="minimal" className="mr-4">
<div className="hidden ltr:mr-2 rtl:ml-2 sm:block">{t("edit")}</div>
<ExternalLink className="text-default -mt-[2px] h-4 w-4 stroke-2" />
<Icon name="external-link" className="text-default -mt-[2px] h-4 w-4 stroke-2" />
</Button>
</Link>
</div>
@@ -168,7 +167,7 @@ const WorkflowListItem = (props: ItemProps) => {
}>
<div className="flex items-center ltr:mr-2 rtl:ml-2">
{workflow.readOnly && props.isChildrenManagedEventType && (
<Lock className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" />
<Icon name="lock" className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" />
)}
<Switch
checked={isActive}
@@ -183,7 +182,7 @@ const WorkflowListItem = (props: ItemProps) => {
{needsRequiresConfirmationWarning ? (
<div className="text-attention -mb-2 mt-3 flex">
<Info className="mr-1 mt-0.5 h-4 w-4" />
<Icon name="info" className="mr-1 mt-0.5 h-4 w-4" />
<p className="text-sm">{t("requires_confirmation_mandatory")}</p>
</div>
) : (
@@ -311,7 +310,7 @@ function EventWorkflowsTab(props: Props) {
) : (
<div className="pt-2 before:border-0">
<EmptyScreen
Icon={Zap}
Icon="zap"
headline={t("workflows")}
description={t("no_workflows_description")}
buttonRaw={
@@ -1,5 +1,4 @@
import { SkeletonText } from "@calcom/ui";
import { Bell, Link as LinkIcon } from "@calcom/ui/components/icon";
import { Icon, SkeletonText } from "@calcom/ui";
function SkeletonLoader() {
return (
@@ -21,9 +20,9 @@ function SkeletonItem() {
<div className="flex flex-col space-y-2">
<SkeletonText className="h-4 w-16 sm:w-24" />
<div className="flex">
<Bell className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<Icon name="bell" className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<SkeletonText className="h-4 w-16 ltr:mr-2 rtl:ml-2 sm:w-28" />
<LinkIcon className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<Icon name="link" className="mr-1.5 mt-0.5 inline h-4 w-4 text-gray-200" />
<SkeletonText className="h-4 w-28 sm:w-36" />
</div>
</div>
@@ -4,13 +4,13 @@ import type { UseFormReturn } from "react-hook-form";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import {
Dropdown,
DropdownItem,
DropdownMenuContent,
DropdownMenuItem,
DropdownItem,
DropdownMenuTrigger,
Icon,
TextField,
} from "@calcom/ui";
import { ChevronDown } from "@calcom/ui/components/icon";
import { getWorkflowTimeUnitOptions } from "../lib/getOptions";
import type { FormValues } from "../pages/workflow";
@@ -46,7 +46,7 @@ export const TimeTimeUnitInput = (props: Props) => {
{timeUnit ? t(`${timeUnit.toLowerCase()}_timeUnit`) : "undefined"}{" "}
</div>
<div className="w-1/4 pt-1">
<ChevronDown />
<Icon name="chevron-down" />
</div>
</button>
</DropdownMenuTrigger>
@@ -6,13 +6,12 @@ import { Controller } from "react-hook-form";
import { SENDER_ID, SENDER_NAME } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { WorkflowTemplates } from "@calcom/prisma/enums";
import type { WorkflowActions } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import { WorkflowTemplates } from "@calcom/prisma/enums";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { MultiSelectCheckboxesOptionType as Option } from "@calcom/ui";
import { Button, Label, MultiSelectCheckboxes, TextField } from "@calcom/ui";
import { ArrowDown, Trash2 } from "@calcom/ui/components/icon";
import { Button, Icon, Label, MultiSelectCheckboxes, TextField } from "@calcom/ui";
import { isSMSAction, isWhatsappAction } from "../lib/actionHelperFunctions";
import type { FormValues } from "../pages/workflow";
@@ -160,7 +159,7 @@ export default function WorkflowDetailsPage(props: Props) {
{!props.readOnly && (
<Button
type="button"
StartIcon={Trash2}
StartIcon="trash-2"
color="destructive"
className="border"
onClick={() => setDeleteDialogOpen(true)}>
@@ -203,7 +202,7 @@ export default function WorkflowDetailsPage(props: Props) {
{!props.readOnly && (
<>
<div className="my-3 flex justify-center">
<ArrowDown className="text-subtle stroke-[1.5px] text-3xl" />
<Icon name="arrow-down" className="text-subtle stroke-[1.5px] text-3xl" />
</div>
<div className="flex justify-center">
<Button
@@ -1,5 +1,5 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import type { Workflow, WorkflowStep, Membership } from "@prisma/client";
import type { Membership, Workflow, WorkflowStep } from "@prisma/client";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useState } from "react";
@@ -9,19 +9,19 @@ import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import {
ArrowButton,
Avatar,
Badge,
Button,
ButtonGroup,
Dropdown,
DropdownItem,
DropdownMenuContent,
DropdownMenuItem,
DropdownItem,
DropdownMenuTrigger,
Icon,
Tooltip,
Badge,
Avatar,
ArrowButton,
} from "@calcom/ui";
import { Edit2, Link as LinkIcon, MoreHorizontal, Trash2 } from "@calcom/ui/components/icon";
import { getActionIcon } from "../lib/getActionIcon";
import { DeleteDialog } from "./DeleteDialog";
@@ -167,7 +167,7 @@ export default function WorkflowListPage({ workflows }: Props) {
</p>
))}>
<div>
<LinkIcon className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
<Icon name="link" className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
{t("active_on_event_types", {
count: workflow.activeOn.filter((wf) =>
workflow.teamId ? wf.eventType.parentId === null : true
@@ -177,7 +177,7 @@ export default function WorkflowListPage({ workflows }: Props) {
</Tooltip>
) : (
<div>
<LinkIcon className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
<Icon name="link" className="mr-1.5 inline h-3 w-3" aria-hidden="true" />
{t("no_active_event_types")}
</div>
)}
@@ -227,7 +227,7 @@ export default function WorkflowListPage({ workflows }: Props) {
type="button"
color="secondary"
variant="icon"
StartIcon={Edit2}
StartIcon="pencil"
disabled={workflow.readOnly}
onClick={async () => await router.replace(`/workflows/${workflow.id}`)}
data-testid="edit-button"
@@ -242,7 +242,7 @@ export default function WorkflowListPage({ workflows }: Props) {
color="secondary"
variant="icon"
disabled={workflow.readOnly}
StartIcon={Trash2}
StartIcon="trash-2"
data-testid="delete-button"
/>
</Tooltip>
@@ -256,14 +256,14 @@ export default function WorkflowListPage({ workflows }: Props) {
type="button"
color="minimal"
variant="icon"
StartIcon={MoreHorizontal}
StartIcon="ellipsis"
/>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<DropdownItem
type="button"
StartIcon={Edit2}
StartIcon="pencil"
onClick={async () => await router.replace(`/workflows/${workflow.id}`)}>
{t("edit")}
</DropdownItem>
@@ -272,7 +272,7 @@ export default function WorkflowListPage({ workflows }: Props) {
<DropdownItem
type="button"
color="destructive"
StartIcon={Trash2}
StartIcon="trash-2"
onClick={() => {
setDeleteDialogOpen(true);
setwWorkflowToDeleteId(workflow.id);
@@ -1,6 +1,6 @@
import type { WorkflowStep } from "@prisma/client";
import type { Dispatch, SetStateAction } from "react";
import { useRef, useState, useEffect } from "react";
import { useEffect, useRef, useState } from "react";
import type { UseFormReturn } from "react-hook-form";
import { Controller } from "react-hook-form";
import "react-phone-number-input/style.css";
@@ -10,11 +10,11 @@ import { SENDER_ID, SENDER_NAME } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { HttpError } from "@calcom/lib/http-error";
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
import { WorkflowTemplates, TimeUnit, WorkflowActions } from "@calcom/prisma/enums";
import { WorkflowTriggerEvents } from "@calcom/prisma/enums";
import { trpc } from "@calcom/trpc/react";
import { TimeUnit, WorkflowActions, WorkflowTemplates, WorkflowTriggerEvents } from "@calcom/prisma/enums";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import {
AddVariablesDropdown,
Badge,
Button,
CheckboxField,
@@ -23,31 +23,30 @@ import {
DialogContent,
DialogFooter,
Dropdown,
DropdownItem,
DropdownMenuContent,
DropdownMenuItem,
DropdownItem,
DropdownMenuTrigger,
Editor,
EmailField,
Icon,
Input,
Label,
PhoneInput,
Select,
showToast,
TextArea,
TextField,
Editor,
AddVariablesDropdown,
Input,
Tooltip,
} from "@calcom/ui";
import { ArrowDown, MoreHorizontal, Trash2, HelpCircle, Info } from "@calcom/ui/components/icon";
import {
getWhatsappTemplateForAction,
isAttendeeAction,
isSMSAction,
isSMSOrWhatsappAction,
isWhatsappAction,
getWhatsappTemplateForAction,
isTextMessageToAttendeeAction,
isWhatsappAction,
} from "../lib/actionHelperFunctions";
import { DYNAMIC_TEXT_VARIABLES } from "../lib/constants";
import { getWorkflowTemplateOptions, getWorkflowTriggerOptions } from "../lib/getOptions";
@@ -317,7 +316,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<TimeTimeUnitInput form={form} disabled={props.readOnly} />
{!props.readOnly && (
<div className="mt-1 flex text-gray-500">
<Info className="mr-1 mt-0.5 h-4 w-4" />
<Icon name="info" className="mr-1 mt-0.5 h-4 w-4" />
<p className="text-sm">{t("testing_workflow_info_message")}</p>
</div>
)}
@@ -350,7 +349,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
return (
<>
<div className="my-3 flex justify-center">
<ArrowDown className="text-subtle stroke-[1.5px] text-3xl" />
<Icon name="arrow-down" className="text-subtle stroke-[1.5px] text-3xl" />
</div>
<div className="flex justify-center">
<div className="min-w-80 bg-default border-subtle flex w-full rounded-md border p-7">
@@ -371,13 +370,13 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<div>
<Dropdown>
<DropdownMenuTrigger asChild>
<Button type="button" color="minimal" variant="icon" StartIcon={MoreHorizontal} />
<Button type="button" color="minimal" variant="icon" StartIcon="ellipsis" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>
<DropdownItem
type="button"
StartIcon={Trash2}
StartIcon="trash-2"
color="destructive"
onClick={() => {
const steps = form.getValues("steps");
@@ -540,7 +539,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
/>
{isRequiresConfirmationNeeded ? (
<div className="text-attention mb-3 mt-2 flex">
<Info className="mr-1 mt-0.5 h-4 w-4" />
<Icon name="info" className="mr-1 mt-0.5 h-4 w-4" />
<p className="text-sm">{t("requires_confirmation_mandatory")}</p>
</div>
) : (
@@ -644,7 +643,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<div className="flex">
<Label>{t("sender_id")}</Label>
<Tooltip content={t("sender_id_info")}>
<Info className="ml-2 mr-1 mt-0.5 h-4 w-4 text-gray-500" />
<Icon name="info" className="ml-2 mr-1 mt-0.5 h-4 w-4 text-gray-500" />
</Tooltip>
</div>
<Input
@@ -884,7 +883,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
<div className="mt-3 ">
<button type="button" onClick={() => setIsAdditionalInputsDialogOpen(true)}>
<div className="text-default mt-2 flex text-sm">
<HelpCircle className="mt-[3px] h-3 w-3 ltr:mr-2 rtl:ml-2" />
<Icon name="circle-help" className="mt-[3px] h-3 w-3 ltr:mr-2 rtl:ml-2" />
<p className="text-left">{t("using_booking_questions_as_variables")}</p>
</div>
</button>
@@ -2,25 +2,35 @@ import type { WorkflowStep } from "@prisma/client";
import { isSMSOrWhatsappAction } from "@calcom/features/ee/workflows/lib/actionHelperFunctions";
import { classNames } from "@calcom/lib";
import { WorkflowActions } from "@calcom/prisma/enums";
import { Zap, Smartphone, Mail, Bell } from "@calcom/ui/components/icon";
import { Icon } from "@calcom/ui";
export function getActionIcon(steps: WorkflowStep[], className?: string): JSX.Element {
if (steps.length === 0) {
return <Zap className={classNames(className ? className : "mr-1.5 inline h-3 w-3")} aria-hidden="true" />;
return (
<Icon
name="zap"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>
);
}
if (steps.length === 1) {
if (isSMSOrWhatsappAction(steps[0].action)) {
return (
<Smartphone
<Icon
name="smartphone"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>
);
} else {
return (
<Mail className={classNames(className ? className : "mr-1.5 inline h-3 w-3")} aria-hidden="true" />
<Icon
name="mail"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>
);
}
}
@@ -43,21 +53,34 @@ export function getActionIcon(steps: WorkflowStep[], className?: string): JSX.El
switch (messageType) {
case "SMS":
return (
<Smartphone
<Icon
name="smartphone"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>
);
case "EMAIL":
return (
<Mail className={classNames(className ? className : "mr-1.5 inline h-3 w-3")} aria-hidden="true" />
<Icon
name="mail"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>
);
case "MIX":
return (
<Bell className={classNames(className ? className : "mr-1.5 inline h-3 w-3")} aria-hidden="true" />
<Icon
name="bell"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>
);
default:
<Zap className={classNames(className ? className : "mr-1.5 inline h-3 w-3")} aria-hidden="true" />;
<Icon
name="zap"
className={classNames(className ? className : "mr-1.5 inline h-3 w-3")}
aria-hidden="true"
/>;
}
}
+5 -6
View File
@@ -10,8 +10,7 @@ import { shallow } from "zustand/shallow";
import type { Dayjs } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs";
import { AvailableTimesHeader } from "@calcom/features/bookings";
import { AvailableTimes } from "@calcom/features/bookings";
import { AvailableTimes, AvailableTimesHeader } from "@calcom/features/bookings";
import { useBookerStore, useInitializeBookerStore } from "@calcom/features/bookings/Booker/store";
import { useEvent, useScheduleForEvent } from "@calcom/features/bookings/Booker/utils/event";
import { useTimePreferences } from "@calcom/features/bookings/lib/timePreferences";
@@ -33,6 +32,7 @@ import {
DialogContent,
DialogFooter,
HorizontalTabs,
Icon,
Label,
Select,
showToast,
@@ -40,7 +40,6 @@ import {
TextField,
TimezoneSelect,
} from "@calcom/ui";
import { ArrowLeft, Sun } from "@calcom/ui/components/icon";
import { getDimension } from "./lib/getDimension";
import type { EmbedTabs, EmbedType, EmbedTypes, PreviewState } from "./types";
@@ -93,7 +92,7 @@ function useRouterHelpers() {
const ThemeSelectControl = ({ children, ...props }: ControlProps<{ value: Theme; label: string }, false>) => {
return (
<components.Control {...props}>
<Sun className="text-subtle mr-2 h-4 w-4" />
<Icon name="sun" className="text-subtle mr-2 h-4 w-4" />
{children}
</components.Control>
);
@@ -727,7 +726,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
onClick={() => {
removeQueryParams(["embedType", "embedTabName"]);
}}>
<ArrowLeft className="mr-4 w-4" />
<Icon name="arrow-left" className="mr-4 w-4" />
</button>
{embed.title}
</h3>
@@ -1154,7 +1153,7 @@ type EmbedButtonProps<T> = {
eventId?: number;
};
export const EmbedButton = <T extends React.ElementType>({
export const EmbedButton = <T extends React.ElementType = typeof Button>({
embedUrl,
children,
className = "",
+6 -7
View File
@@ -1,16 +1,15 @@
import { forwardRef } from "react";
import type { MutableRefObject } from "react";
import { forwardRef } from "react";
import type { BookerLayout } from "@calcom/features/bookings/Booker/types";
import { APP_NAME } from "@calcom/lib/constants";
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { TextArea } from "@calcom/ui";
import { Code, Trello } from "@calcom/ui/components/icon";
import type { EmbedType, PreviewState, EmbedFramework } from "../types";
import type { EmbedFramework, EmbedType, PreviewState } from "../types";
import { Codes, doWeNeedCalOriginProp } from "./EmbedCodes";
import { EMBED_PREVIEW_HTML_URL, embedLibUrl } from "./constants";
import { embedLibUrl, EMBED_PREVIEW_HTML_URL } from "./constants";
import { getApiName } from "./getApiName";
import { getDimension } from "./getDimension";
import { useEmbedCalOrigin } from "./hooks";
@@ -19,7 +18,7 @@ export const tabs = [
{
name: "HTML",
href: "embedTabName=embed-code",
icon: Code,
icon: "code" as const,
type: "code",
Component: forwardRef<
HTMLTextAreaElement | HTMLIFrameElement | null,
@@ -75,7 +74,7 @@ export const tabs = [
{
name: "React",
href: "embedTabName=embed-react",
icon: Code,
icon: "code" as const,
type: "code",
Component: forwardRef<
HTMLTextAreaElement | HTMLIFrameElement | null,
@@ -124,7 +123,7 @@ export const tabs = [
{
name: "Preview",
href: "embedTabName=embed-preview",
icon: Trello,
icon: "trello" as const,
type: "iframe",
Component: forwardRef<
HTMLIFrameElement | HTMLTextAreaElement | null,
@@ -1,10 +1,10 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import { useState } from "react";
import type { Dispatch, SetStateAction } from "react";
import { useState } from "react";
import { useFormContext } from "react-hook-form";
import type { Props } from "react-select";
import type { Host, FormValues } from "@calcom/features/eventtypes/lib/types";
import type { FormValues, Host } from "@calcom/features/eventtypes/lib/types";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import {
@@ -14,11 +14,11 @@ import {
DialogClose,
DialogContent,
DialogFooter,
Icon,
Label,
Select,
Tooltip,
} from "@calcom/ui";
import { X } from "@calcom/ui/components/icon";
export type CheckedSelectOption = {
avatar: string;
@@ -86,7 +86,8 @@ export const CheckedTeamSelect = ({
<></>
)}
<X
<Icon
name="x"
onClick={() => props.onChange(value.filter((item) => item.value !== option.value))}
className="my-auto h-4 w-4"
/>
Loaded 100 of 294 files, more files were not shown because too many files have changed in this diff. Show more