diff --git a/apps/web/components/security/TwoFactorModalHeader.tsx b/apps/web/components/security/TwoFactorModalHeader.tsx index 44c251b7a3..d37f3c0636 100644 --- a/apps/web/components/security/TwoFactorModalHeader.tsx +++ b/apps/web/components/security/TwoFactorModalHeader.tsx @@ -1,10 +1,10 @@ -import { ShieldCheckIcon } from "@calcom/ui"; +import { Icon } from "@calcom/ui"; const TwoFactorModalHeader = ({ title, description }: { title: string; description: string }) => { return (
- +
diff --git a/apps/web/pages/[user].tsx b/apps/web/pages/[user].tsx index db500f47c5..92a8b00125 100644 --- a/apps/web/pages/[user].tsx +++ b/apps/web/pages/[user].tsx @@ -27,7 +27,7 @@ import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calco import prisma from "@calcom/prisma"; import { baseEventTypeSelect } from "@calcom/prisma/selects"; import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils"; -import { BadgeCheckIcon, Icon } from "@calcom/ui"; +import { Icon } from "@calcom/ui"; import { inferSSRProps } from "@lib/types/inferSSRProps"; import { EmbedProps } from "@lib/withEmbedSsr"; @@ -139,7 +139,7 @@ export default function User(props: inferSSRProps & E

{nameOrUsername} {user.verified && ( - + )}

{user.bio}

diff --git a/packages/app-store/ee/routing-forms/components/index.ts b/packages/app-store/ee/routing-forms/components/index.ts deleted file mode 100644 index e191e97eec..0000000000 --- a/packages/app-store/ee/routing-forms/components/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as InstallAppButton } from "./InstallAppButton"; -export { default as Icon } from "./icon"; diff --git a/packages/app-store/zapier/pages/setup/index.tsx b/packages/app-store/zapier/pages/setup/index.tsx index 0f5b2e38b4..5677e70758 100644 --- a/packages/app-store/zapier/pages/setup/index.tsx +++ b/packages/app-store/zapier/pages/setup/index.tsx @@ -5,7 +5,7 @@ import { Toaster } from "react-hot-toast"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; -import { Button, ClipboardCopyIcon, showToast, Tooltip } from "@calcom/ui"; +import { Button, Icon, showToast, Tooltip } from "@calcom/ui"; export interface IZapierSetupProps { inviteLink: string; @@ -75,7 +75,7 @@ export default function ZapierSetup(props: IZapierSetupProps) { }} type="button" className="mt-4 text-base sm:mt-0 sm:rounded-l-none"> - + {t("copy")} diff --git a/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx b/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx index f526eb3a62..83ed875664 100644 --- a/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx +++ b/packages/features/ee/api-keys/components/ApiKeyDialogForm.tsx @@ -8,7 +8,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Button, - ClipboardCopyIcon, + Icon, DatePickerField as DatePicker, DialogFooter, Form, @@ -83,7 +83,7 @@ export default function ApiKeyDialogForm({ }} type="button" className="rounded-l-none py-[19px] text-base "> - + {t("copy")} diff --git a/packages/features/ee/sso/components/SAMLConfiguration.tsx b/packages/features/ee/sso/components/SAMLConfiguration.tsx index fcdc3a500b..c060166001 100644 --- a/packages/features/ee/sso/components/SAMLConfiguration.tsx +++ b/packages/features/ee/sso/components/SAMLConfiguration.tsx @@ -9,7 +9,6 @@ import { Alert, Badge, Button, - ClipboardCopyIcon, ConfirmationDialogContent, Dialog, DialogContent, @@ -123,7 +122,7 @@ export default function SAMLConfiguration({ teamId }: { teamId: number | null }) }} type="button" className="px-4 text-base"> - + {t("copy")}
@@ -143,7 +142,7 @@ export default function SAMLConfiguration({ teamId }: { teamId: number | null }) }} type="button" className="px-4 text-base"> - + {t("copy")} diff --git a/packages/ui/Alert.tsx b/packages/ui/Alert.tsx deleted file mode 100644 index 36f0c31c74..0000000000 --- a/packages/ui/Alert.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { CheckCircleIcon, ExclamationIcon, InformationCircleIcon, XCircleIcon } from "@heroicons/react/solid"; -import classNames from "classnames"; -import { ReactNode } from "react"; - -export interface AlertProps { - title?: ReactNode; - message?: ReactNode; - actions?: ReactNode; - className?: string; - severity: "success" | "warning" | "error" | "info"; -} -export function Alert(props: AlertProps) { - const { severity } = props; - - return ( -
-
-
- {severity === "error" && ( -
-
-

{props.title}

-
{props.message}
-
- {props.actions &&
{props.actions}
} -
-
- ); -} diff --git a/packages/ui/Button.tsx b/packages/ui/Button.tsx deleted file mode 100644 index 78c6446b0a..0000000000 --- a/packages/ui/Button.tsx +++ /dev/null @@ -1,151 +0,0 @@ -import Link, { LinkProps } from "next/link"; -import React, { forwardRef } from "react"; - -import classNames from "@calcom/lib/classNames"; - -type SVGComponent = React.FunctionComponent>; - -export type ButtonBaseProps = { - color?: "primary" | "secondary" | "minimal" | "warn" | "alert" | "alert2"; - size?: "base" | "sm" | "lg" | "fab" | "icon"; - loading?: boolean; - disabled?: boolean; - onClick?: (event: React.MouseEvent) => void; - StartIcon?: SVGComponent; - startIconClassName?: string; - EndIcon?: SVGComponent; - endIconClassName?: string; - shallow?: boolean; -}; -export type ButtonProps = ButtonBaseProps & - ( - | (Omit & LinkProps) - | (Omit & { href?: never }) - ); - -export const Button = forwardRef(function Button( - props: ButtonProps, - forwardedRef -) { - const { - loading = false, - color = "primary", - size = "base", - StartIcon, - startIconClassName, - endIconClassName, - EndIcon, - shallow, - // attributes propagated from `HTMLAnchorProps` or `HTMLButtonProps` - ...passThroughProps - } = props; - // Buttons are **always** disabled if we're in a `loading` state - const disabled = props.disabled || loading; - - // If pass an `href`-attr is passed it's ``, otherwise it's a `