diff --git a/apps/web/components/eventtype/EventTypeSingleLayout.tsx b/apps/web/components/eventtype/EventTypeSingleLayout.tsx index 39a1799838..9cfedd73ff 100644 --- a/apps/web/components/eventtype/EventTypeSingleLayout.tsx +++ b/apps/web/components/eventtype/EventTypeSingleLayout.tsx @@ -2,7 +2,6 @@ import { TFunction } from "next-i18next"; import { useRouter } from "next/router"; import { EventTypeSetupInfered, FormValues } from "pages/event-types/[type]"; import { useMemo, useState } from "react"; -import { Loader } from "react-feather"; import { UseFormReturn } from "react-hook-form"; import { classNames } from "@calcom/lib"; @@ -294,7 +293,7 @@ function EventTypeSingleLayout({ }> - }> + }>
- {size === "lg" && } + {size === "lg" && }
)} diff --git a/packages/ui/components/badge/Badge.tsx b/packages/ui/components/badge/Badge.tsx index 2da015d269..d6c35bcc57 100644 --- a/packages/ui/components/badge/Badge.tsx +++ b/packages/ui/components/badge/Badge.tsx @@ -1,7 +1,7 @@ -import { Icon } from "react-feather"; import { GoPrimitiveDot } from "react-icons/go"; import classNames from "@calcom/lib/classNames"; +import { SVGComponent } from "@calcom/types/SVGComponent"; const badgeClassNameByVariant = { default: "bg-orange-100 text-orange-800", @@ -23,7 +23,7 @@ const classNameBySize = { export type BadgeProps = { variant: keyof typeof badgeClassNameByVariant; size?: keyof typeof classNameBySize; - StartIcon?: Icon; + StartIcon?: SVGComponent; bold?: boolean; withDot?: boolean; rounded?: boolean; diff --git a/packages/ui/components/button/Button.tsx b/packages/ui/components/button/Button.tsx index 3979602994..c61aba5599 100644 --- a/packages/ui/components/button/Button.tsx +++ b/packages/ui/components/button/Button.tsx @@ -1,10 +1,10 @@ import { cva, VariantProps } from "class-variance-authority"; import Link, { LinkProps } from "next/link"; import React, { forwardRef } from "react"; -import { Icon } from "react-feather"; import classNames from "@calcom/lib/classNames"; import { applyStyleToMultipleVariants } from "@calcom/lib/cva"; +import { SVGComponent } from "@calcom/types/SVGComponent"; import { Tooltip } from "@calcom/ui"; type InferredVariantProps = VariantProps; @@ -13,9 +13,9 @@ export type ButtonBaseProps = { /** Action that happens when the button is clicked */ onClick?: (event: React.MouseEvent) => void; /**Left aligned icon*/ - StartIcon?: Icon | React.ElementType; + StartIcon?: SVGComponent | React.ElementType; /**Right aligned icon */ - EndIcon?: Icon; + EndIcon?: SVGComponent; shallow?: boolean; /**Tool tip used when icon size is set to small */ tooltip?: string; diff --git a/packages/ui/components/form/inputs/HintOrErrors.tsx b/packages/ui/components/form/inputs/HintOrErrors.tsx index e66e55351b..5a8777b349 100644 --- a/packages/ui/components/form/inputs/HintOrErrors.tsx +++ b/packages/ui/components/form/inputs/HintOrErrors.tsx @@ -1,4 +1,3 @@ -import { X, Circle, Check } from "react-feather"; import { FieldValues, useFormContext } from "react-hook-form"; // TODO: Refactor import once V1 migration has happened @@ -50,12 +49,12 @@ export function HintsOrErrors(props: { className={error !== undefined ? (submitted ? "text-red-700" : "") : "text-green-600"}> {error !== undefined ? ( submitted ? ( - + ) : ( - + ) ) : ( - + )} {t(`${fieldName}_hint_${key}`)} diff --git a/packages/ui/components/form/inputs/Input.tsx b/packages/ui/components/form/inputs/Input.tsx index 9b1508248e..19761240e9 100644 --- a/packages/ui/components/form/inputs/Input.tsx +++ b/packages/ui/components/form/inputs/Input.tsx @@ -1,5 +1,4 @@ import React, { forwardRef, ReactElement, ReactNode, Ref, useCallback, useId, useState } from "react"; -import { Eye, EyeOff } from "react-feather"; import { FieldValues, FormProvider, SubmitHandler, useFormContext, UseFormReturn } from "react-hook-form"; import classNames from "@calcom/lib/classNames"; @@ -211,9 +210,9 @@ export const PasswordField = forwardRef(funct type="button" onClick={() => toggleIsPasswordVisible()}> {isPasswordVisible ? ( - + ) : ( - + )} {textLabel} diff --git a/packages/ui/v2/core/Dialog.tsx b/packages/ui/v2/core/Dialog.tsx index ea996408b7..5af67c7e00 100644 --- a/packages/ui/v2/core/Dialog.tsx +++ b/packages/ui/v2/core/Dialog.tsx @@ -1,10 +1,10 @@ import * as DialogPrimitive from "@radix-ui/react-dialog"; import { useRouter } from "next/router"; import React, { ReactNode, useState } from "react"; -import { Icon } from "react-feather"; import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import { SVGComponent } from "@calcom/types/SVGComponent"; import { Button, ButtonProps } from "../../components/button"; @@ -58,7 +58,7 @@ type DialogContentProps = React.ComponentProps( diff --git a/packages/ui/v2/core/Dropdown.tsx b/packages/ui/v2/core/Dropdown.tsx index 3c53aeae8f..33f618e1bf 100644 --- a/packages/ui/v2/core/Dropdown.tsx +++ b/packages/ui/v2/core/Dropdown.tsx @@ -2,9 +2,9 @@ import { CheckCircleIcon } from "@heroicons/react/outline"; import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; import Link from "next/link"; import { ComponentProps, forwardRef } from "react"; -import { Icon } from "react-feather"; import { classNames } from "@calcom/lib"; +import { SVGComponent } from "@calcom/types/SVGComponent"; export const Dropdown = DropdownMenuPrimitive.Root; @@ -98,8 +98,8 @@ DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem"; type DropdownItemProps = { children: React.ReactNode; color?: "destructive"; - StartIcon?: Icon; - EndIcon?: Icon; + StartIcon?: SVGComponent; + EndIcon?: SVGComponent; href?: string; disabled?: boolean; } & ButtonOrLinkProps; diff --git a/packages/ui/v2/core/EmptyScreen.tsx b/packages/ui/v2/core/EmptyScreen.tsx index 07962a6cf6..e04056dd24 100644 --- a/packages/ui/v2/core/EmptyScreen.tsx +++ b/packages/ui/v2/core/EmptyScreen.tsx @@ -1,5 +1,4 @@ import React, { ReactNode } from "react"; -import { Icon } from "react-feather"; import { IconType } from "react-icons"; import { SVGComponent } from "@calcom/types/SVGComponent"; @@ -14,7 +13,7 @@ export default function EmptyScreen({ buttonOnClick, buttonRaw, }: { - Icon: SVGComponent | Icon | IconType; + Icon: SVGComponent | IconType; headline: string; description: string | React.ReactElement; buttonText?: string; diff --git a/packages/ui/v2/core/apps/Categories.tsx b/packages/ui/v2/core/apps/Categories.tsx index 1db46bdd5c..28f662e867 100644 --- a/packages/ui/v2/core/apps/Categories.tsx +++ b/packages/ui/v2/core/apps/Categories.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; -import { ArrowRight } from "react-feather"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import { Icon } from "@calcom/ui"; import { SkeletonText } from "../skeleton"; import Slider from "./Slider"; @@ -44,7 +44,7 @@ export default function AppStoreCategories({ )}

{isLocaleReady ? t("number_apps", { count: category.count }) : }{" "} - +

diff --git a/packages/ui/v2/core/banner.tsx b/packages/ui/v2/core/banner.tsx index d7ae94215c..b2b4bac42a 100644 --- a/packages/ui/v2/core/banner.tsx +++ b/packages/ui/v2/core/banner.tsx @@ -1,7 +1,7 @@ import { MouseEvent, useState } from "react"; -import { Icon } from "react-feather"; import classNames from "@calcom/lib/classNames"; +import { SVGComponent } from "@calcom/types/SVGComponent"; const stylesByVariant = { neutral: { background: "bg-gray-100 ", text: "!text-gray-800", hover: "hover:!bg-gray-200" }, @@ -14,7 +14,7 @@ export type BannerProps = { description?: string; variant: keyof typeof stylesByVariant; errorMessage?: string; - Icon?: Icon; + Icon?: SVGComponent; onDismiss: (event: MouseEvent) => void; onAction?: (event: MouseEvent) => void; actionText?: string; diff --git a/packages/ui/v2/core/form/DatePicker.tsx b/packages/ui/v2/core/form/DatePicker.tsx index 0884fa9b3b..c87fa16611 100644 --- a/packages/ui/v2/core/form/DatePicker.tsx +++ b/packages/ui/v2/core/form/DatePicker.tsx @@ -1,9 +1,9 @@ import "react-calendar/dist/Calendar.css"; import "react-date-picker/dist/DatePicker.css"; import PrimitiveDatePicker from "react-date-picker/dist/entry.nostyle"; -import { Calendar } from "react-feather"; import classNames from "@calcom/lib/classNames"; +import { Icon } from "@calcom/ui"; type Props = { date: Date; @@ -22,7 +22,7 @@ const DatePicker = ({ minDate, disabled, date, onDatesChange, className }: Props )} calendarClassName="rounded-md" clearIcon={null} - calendarIcon={} + calendarIcon={} value={date} minDate={minDate} disabled={disabled} diff --git a/packages/ui/v2/core/notifications.tsx b/packages/ui/v2/core/notifications.tsx index 30faf30bbe..ec260b2466 100644 --- a/packages/ui/v2/core/notifications.tsx +++ b/packages/ui/v2/core/notifications.tsx @@ -1,7 +1,8 @@ import classNames from "classnames"; -import { Check, Info } from "react-feather"; import toast from "react-hot-toast"; +import { Icon } from "@calcom/ui"; + export function showToast(message: string, variant: "success" | "warning" | "error") { switch (variant) { case "success": @@ -12,7 +13,7 @@ export function showToast(message: string, variant: "success" | "warning" | "err "data-testid-toast-success bg-brand-500 mb-2 flex h-9 items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md", t.visible && "animate-fade-in-up" )}> - +

{message}

), @@ -27,7 +28,7 @@ export function showToast(message: string, variant: "success" | "warning" | "err "animate-fade-in-up mb-2 flex h-9 items-center space-x-2 rounded-md bg-red-100 p-3 text-sm font-semibold text-red-900 shadow-md", t.visible && "animate-fade-in-up" )}> - +

{message}

), @@ -42,7 +43,7 @@ export function showToast(message: string, variant: "success" | "warning" | "err "animate-fade-in-up bg-brand-500 mb-2 flex h-9 items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md", t.visible && "animate-fade-in-up" )}> - +

{message}

), @@ -57,7 +58,7 @@ export function showToast(message: string, variant: "success" | "warning" | "err "animate-fade-in-up bg-brand-500 mb-2 flex h-9 items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md", t.visible && "animate-fade-in-up" )}> - +

{message}

),