Reduce bundle size by importing single icons at a time (#6644)
* Removed barrel import for icons to reduce bundle size. * Fixed replacement mistakes * Reverted unneccesary yarn.lock updates * Added some missed Icon. import conversions * Remove merge artifact import in @calcom/ui * Don't import Icon in pages/[user] * Update packages/ui/package.json Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
155 files changed
+881
-768
No files matched your search
@@ -2,7 +2,7 @@ import { CheckCircleIcon, ExclamationIcon, InformationCircleIcon, XCircleIcon }
|
||||
import classNames from "classnames";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { Icon } from "../icon";
|
||||
import { FiInfo } from "../icon";
|
||||
|
||||
export interface AlertProps {
|
||||
title?: ReactNode;
|
||||
@@ -47,7 +47,7 @@ export function Alert(props: AlertProps) {
|
||||
/>
|
||||
)}
|
||||
{severity === "neutral" && (
|
||||
<Icon.FiInfo className={classNames("h-5 w-5 text-gray-800", iconClassName)} aria-hidden="true" />
|
||||
<FiInfo className={classNames("h-5 w-5 text-gray-800", iconClassName)} aria-hidden="true" />
|
||||
)}
|
||||
{severity === "success" && (
|
||||
<CheckCircleIcon
|
||||
|
||||
@@ -6,7 +6,7 @@ import { classNames } from "@calcom/lib";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { AppFrontendPayload as App } from "@calcom/types/App";
|
||||
import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential";
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiChevronLeft, FiChevronRight, FiSearch } from "@calcom/ui/components/icon";
|
||||
|
||||
import { EmptyScreen } from "../empty-screen";
|
||||
import { AppCard } from "./AppCard";
|
||||
@@ -78,7 +78,7 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr
|
||||
{leftVisible && (
|
||||
<button onClick={handleLeft} className="absolute top-9 flex md:left-1/2 md:-top-1">
|
||||
<div className="flex h-12 w-5 items-center justify-end bg-white">
|
||||
<Icon.FiChevronLeft className="h-4 w-4 text-gray-500" />
|
||||
<FiChevronLeft className="h-4 w-4 text-gray-500" />
|
||||
</div>
|
||||
<div className="flex h-12 w-5 bg-gradient-to-l from-transparent to-white" />
|
||||
</button>
|
||||
@@ -121,7 +121,7 @@ function CategoryTab({ selectedCategory, categories, searchText }: CategoryTabPr
|
||||
<button onClick={handleRight} className="absolute top-9 right-0 flex md:-top-1">
|
||||
<div className="flex h-12 w-5 bg-gradient-to-r from-transparent to-white" />
|
||||
<div className="flex h-12 w-5 items-center justify-end bg-white">
|
||||
<Icon.FiChevronRight className="h-4 w-4 text-gray-500" />
|
||||
<FiChevronRight className="h-4 w-4 text-gray-500" />
|
||||
</div>
|
||||
</button>
|
||||
)}
|
||||
@@ -175,7 +175,7 @@ export function AllApps({ apps, searchText, categories }: AllAppsPropsType) {
|
||||
</div>
|
||||
) : (
|
||||
<EmptyScreen
|
||||
Icon={Icon.FiSearch}
|
||||
Icon={FiSearch}
|
||||
headline={t("no_results")}
|
||||
description={searchText ? searchText?.toString() : ""}
|
||||
/>
|
||||
|
||||
@@ -6,8 +6,8 @@ import { InstallAppButton } from "@calcom/app-store/components";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { AppFrontendPayload as App } from "@calcom/types/App";
|
||||
import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential";
|
||||
|
||||
import { Button, Icon, showToast } from "../..";
|
||||
import { Button, showToast } from "@calcom/ui";
|
||||
import { FiPlus } from "@calcom/ui/components/icon";
|
||||
|
||||
interface AppCardProps {
|
||||
app: App;
|
||||
@@ -100,7 +100,7 @@ export function AppCard({ app, credentials, searchText }: AppCardProps) {
|
||||
<Button
|
||||
color="secondary"
|
||||
className="[@media(max-width:260px)]:w-full [@media(max-width:260px)]:justify-center"
|
||||
StartIcon={Icon.FiPlus}
|
||||
StartIcon={FiPlus}
|
||||
{...props}>
|
||||
{t("install")}
|
||||
</Button>
|
||||
@@ -125,7 +125,7 @@ export function AppCard({ app, credentials, searchText }: AppCardProps) {
|
||||
}
|
||||
return (
|
||||
<Button
|
||||
StartIcon={Icon.FiPlus}
|
||||
StartIcon={FiPlus}
|
||||
color="secondary"
|
||||
className="[@media(max-width:260px)]:w-full [@media(max-width:260px)]:justify-center"
|
||||
data-testid="install-app-button"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Icon, SkeletonText } from "@calcom/ui";
|
||||
import { SkeletonText } from "@calcom/ui";
|
||||
import { FiArrowRight } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Slider } from "./Slider";
|
||||
|
||||
@@ -43,7 +44,7 @@ export function AppStoreCategories({
|
||||
)}
|
||||
<p className="pt-2 text-sm font-medium text-gray-500">
|
||||
{isLocaleReady ? t("number_apps", { count: category.count }) : <SkeletonText invisible />}{" "}
|
||||
<Icon.FiArrowRight className="inline-block h-4 w-4" />
|
||||
<FiArrowRight className="inline-block h-4 w-4" />
|
||||
</p>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
@@ -4,8 +4,8 @@ import "@glidejs/glide/dist/css/glide.theme.min.css";
|
||||
import { ComponentProps, FC, useEffect, useRef } from "react";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { FiArrowLeft, FiArrowRight } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Icon } from "../../components/icon";
|
||||
import { SkeletonText } from "../skeleton";
|
||||
|
||||
const SliderButton: FC<ComponentProps<"button">> = (props) => {
|
||||
@@ -68,10 +68,10 @@ export const Slider = <T extends string | unknown>({
|
||||
)}
|
||||
<div className="glide__arrows ml-auto flex items-center gap-x-1" data-glide-el="controls">
|
||||
<SliderButton data-glide-dir="<">
|
||||
<Icon.FiArrowLeft className="h-5 w-5" />
|
||||
<FiArrowLeft className="h-5 w-5" />
|
||||
</SliderButton>
|
||||
<SliderButton data-glide-dir=">">
|
||||
<Icon.FiArrowRight className="h-5 w-5" />
|
||||
<FiArrowRight className="h-5 w-5" />
|
||||
</SliderButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import Link from "next/link";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { defaultAvatarSrc } from "@calcom/lib/defaultAvatarImage";
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiCheck } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Maybe } from "@trpc/server";
|
||||
|
||||
@@ -60,7 +60,7 @@ export function Avatar(props: AvatarProps) {
|
||||
size === "lg" ? "h-5 w-5" : "h-2 w-2"
|
||||
)}>
|
||||
<div className="flex h-full items-center justify-center p-[2px]">
|
||||
{size === "lg" && <Icon.FiCheck />}
|
||||
{size === "lg" && <FiCheck />}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable, VariantRow } from '@calcom/storybook/components'
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiPlus } from '@calcom/ui/components/icon';
|
||||
import { Badge } from './Badge';
|
||||
|
||||
<Meta title="UI/Badge" component={Badge} />
|
||||
@@ -40,7 +40,7 @@ Status badge communicate status information. It is generally used within a cont
|
||||
<Badge withDot>Button Text</Badge>
|
||||
</Example>
|
||||
<Example title="With Icon">
|
||||
<Badge StartIcon={Icon.FiPlus}>Button Text</Badge>
|
||||
<Badge StartIcon={FiPlus}>Button Text</Badge>
|
||||
</Example>
|
||||
</Examples>
|
||||
|
||||
@@ -61,22 +61,22 @@ Alet badge is used in conjunction with an item, profile or label to indicate num
|
||||
<VariantRow variant="Default">
|
||||
<Badge variant="default" >Badge text</Badge>
|
||||
<Badge variant="default" withDot>Badge text</Badge>
|
||||
<Badge variant="default" StartIcon={Icon.FiPlus}>Badge text</Badge>
|
||||
<Badge variant="default" StartIcon={FiPlus}>Badge text</Badge>
|
||||
</VariantRow>
|
||||
<VariantRow variant="Success">
|
||||
<Badge variant="success" >Badge text</Badge>
|
||||
<Badge variant="success" withDot>Badge text</Badge>
|
||||
<Badge variant="success" StartIcon={Icon.FiPlus}>Badge text</Badge>
|
||||
<Badge variant="success" StartIcon={FiPlus}>Badge text</Badge>
|
||||
</VariantRow>
|
||||
<VariantRow variant="gray">
|
||||
<Badge variant="gray" >Badge text</Badge>
|
||||
<Badge variant="gray" withDot>Badge text</Badge>
|
||||
<Badge variant="gray" StartIcon={Icon.FiPlus}>Badge text</Badge>
|
||||
<Badge variant="gray" StartIcon={FiPlus}>Badge text</Badge>
|
||||
</VariantRow>
|
||||
<VariantRow variant="error">
|
||||
<Badge variant="error" >Badge text</Badge>
|
||||
<Badge variant="error" withDot>Badge text</Badge>
|
||||
<Badge variant="error" StartIcon={Icon.FiPlus}>Badge text</Badge>
|
||||
<Badge variant="error" StartIcon={FiPlus}>Badge text</Badge>
|
||||
</VariantRow>
|
||||
</VariantsTable>
|
||||
</Story>
|
||||
|
||||
@@ -6,7 +6,7 @@ import classNames from "@calcom/lib/classNames";
|
||||
import { applyStyleToMultipleVariants } from "@calcom/lib/cva";
|
||||
import { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import { Tooltip } from "@calcom/ui";
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiPlus } from "@calcom/ui/components/icon";
|
||||
|
||||
type InferredVariantProps = VariantProps<typeof buttonClasses>;
|
||||
|
||||
@@ -204,7 +204,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
{variant === "fab" ? (
|
||||
<>
|
||||
<StartIcon className="hidden h-4 w-4 stroke-[1.5px] ltr:mr-2 rtl:ml-2 sm:inline-flex" />
|
||||
<Icon.FiPlus className="inline h-6 w-6 sm:hidden" />
|
||||
<FiPlus className="inline h-6 w-6 sm:hidden" />
|
||||
</>
|
||||
) : (
|
||||
<StartIcon
|
||||
@@ -238,7 +238,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
{variant === "fab" ? (
|
||||
<>
|
||||
<EndIcon className="-mr-1 hidden h-5 w-5 ltr:ml-2 rtl:-ml-1 rtl:mr-2 sm:inline" />
|
||||
<Icon.FiPlus className="inline h-6 w-6 sm:hidden" />
|
||||
<FiPlus className="inline h-6 w-6 sm:hidden" />
|
||||
</>
|
||||
) : (
|
||||
<EndIcon
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title, VariantsTable, VariantColumn, RowTitles, CustomArgsTable} from '@calcom/storybook/components'
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiPlus, FiX } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Button } from './Button';
|
||||
|
||||
@@ -58,22 +58,22 @@ Button are clickable elements that initiates user actions. Labels in the button
|
||||
<Button>Button text</Button>
|
||||
</Example>
|
||||
<Example title="Icon left">
|
||||
<Button StartIcon={Icon.FiPlus}>Button text</Button>
|
||||
<Button StartIcon={FiPlus}>Button text</Button>
|
||||
</Example>
|
||||
<Example title="Icon right">
|
||||
<Button EndIcon={Icon.FiPlus}>Button text</Button>
|
||||
<Button EndIcon={FiPlus}>Button text</Button>
|
||||
</Example>
|
||||
</Examples>
|
||||
|
||||
<Examples title="Icons">
|
||||
<Example title="Icon Normal">
|
||||
<Button StartIcon={Icon.FiX} variant="icon" size="base" color="minimal"></Button>
|
||||
<Button StartIcon={FiX} variant="icon" size="base" color="minimal"></Button>
|
||||
</Example>
|
||||
<Example title="Icon Small">
|
||||
<Button StartIcon={Icon.FiX} variant="icon" size="sm" color="minimal"></Button>
|
||||
<Button StartIcon={FiX} variant="icon" size="sm" color="minimal"></Button>
|
||||
</Example>
|
||||
<Example title="Icon Loading">
|
||||
<Button StartIcon={Icon.FiX} variant="icon" size="sm" color="minimal" loading></Button>
|
||||
<Button StartIcon={FiX} variant="icon" size="sm" color="minimal" loading></Button>
|
||||
</Example>
|
||||
</Examples>
|
||||
|
||||
@@ -97,35 +97,35 @@ Button are clickable elements that initiates user actions. Labels in the button
|
||||
<Button color="secondary">Button text</Button>
|
||||
<Button color="minimal">Button text</Button>
|
||||
<Button color="destructive">Button text</Button>
|
||||
<Button color="destructive" variant="icon" StartIcon={Icon.FiX}></Button>
|
||||
<Button color="destructive" variant="icon" StartIcon={FiX}></Button>
|
||||
</VariantRow>
|
||||
<VariantRow variant="Hover">
|
||||
<Button className="sb-pseudo--hover">Button text</Button>
|
||||
<Button className="sb-pseudo--hover" color="secondary">Button text</Button>
|
||||
<Button className="sb-pseudo--hover" color="minimal">Button text</Button>
|
||||
<Button className="sb-pseudo--hover" color="destructive">Button text</Button>
|
||||
<Button className="sb-pseudo--hover" color="destructive" variant="icon" StartIcon={Icon.FiX}></Button>
|
||||
<Button className="sb-pseudo--hover" color="destructive" variant="icon" StartIcon={FiX}></Button>
|
||||
</VariantRow>
|
||||
<VariantRow variant="Focus">
|
||||
<Button className="sb-pseudo--focus">Button text</Button>
|
||||
<Button className="sb-pseudo--focus" color="secondary">Button text</Button>
|
||||
<Button className="sb-pseudo--focus" color="minimal">Button text</Button>
|
||||
<Button className="sb-pseudo--focus" color="destructive">Button text</Button>
|
||||
<Button className="sb-pseudo--focus" color="destructive" variant="icon" StartIcon={Icon.FiX}></Button>
|
||||
<Button className="sb-pseudo--focus" color="destructive" variant="icon" StartIcon={FiX}></Button>
|
||||
</VariantRow>
|
||||
<VariantRow variant="Loading">
|
||||
<Button loading>Button text</Button>
|
||||
<Button loading color="secondary">Button text</Button>
|
||||
<Button loading color="minimal">Button text</Button>
|
||||
<Button loading color="destructive">Button text</Button>
|
||||
<Button loading color="destructive" variant="icon" StartIcon={Icon.FiX}></Button>
|
||||
<Button loading color="destructive" variant="icon" StartIcon={FiX}></Button>
|
||||
</VariantRow>
|
||||
<VariantRow variant="Disabled">
|
||||
<Button disabled>Button text</Button>
|
||||
<Button disabled color="secondary">Button text</Button>
|
||||
<Button disabled color="minimal">Button text</Button>
|
||||
<Button disabled color="destructive">Button text</Button>
|
||||
<Button disabled color="destructive" variant="icon" StartIcon={Icon.FiX}></Button>
|
||||
<Button disabled color="destructive" variant="icon" StartIcon={FiX}></Button>
|
||||
</VariantRow>
|
||||
</VariantsTable>
|
||||
</Story>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantRow } from '@calcom/storybook/components'
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiTrash, FiNavigation, FiClipboard } from "@calcom/ui/components/icon";
|
||||
|
||||
import { ButtonGroup} from './ButtonGroup';
|
||||
import { Button} from '../button/Button';
|
||||
@@ -31,16 +31,16 @@ Button group enables multiple buttons to be combined into a single unit. It offe
|
||||
>
|
||||
<Example title="Default" >
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
||||
</ButtonGroup>
|
||||
</Example>
|
||||
<Example title="Combined">
|
||||
<ButtonGroup combined>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
||||
</ButtonGroup>
|
||||
</Example>
|
||||
</Examples>
|
||||
@@ -52,31 +52,31 @@ Button group enables multiple buttons to be combined into a single unit. It offe
|
||||
<VariantsTable titles={["Default",'Secondary',"Minimal"]} columnMinWidth={150}>
|
||||
<VariantRow variant="Default">
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon"/>
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" />
|
||||
<Button StartIcon={FiTrash} variant="icon" />
|
||||
<Button StartIcon={FiNavigation} variant="icon"/>
|
||||
<Button StartIcon={FiClipboard} variant="icon" />
|
||||
</ButtonGroup>
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
||||
</ButtonGroup>
|
||||
<ButtonGroup>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" color="minimal" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon" color="minimal" />
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" color="minimal" />
|
||||
<Button StartIcon={FiTrash} variant="icon" color="minimal" />
|
||||
<Button StartIcon={FiNavigation} variant="icon" color="minimal" />
|
||||
<Button StartIcon={FiClipboard} variant="icon" color="minimal" />
|
||||
</ButtonGroup>
|
||||
</VariantRow>
|
||||
<VariantRow variant="Combined">
|
||||
<ButtonGroup combined>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon" />
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" />
|
||||
<Button StartIcon={FiTrash} variant="icon" />
|
||||
<Button StartIcon={FiNavigation} variant="icon" />
|
||||
<Button StartIcon={FiClipboard} variant="icon" />
|
||||
</ButtonGroup>
|
||||
<ButtonGroup combined>
|
||||
<Button StartIcon={Icon.FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={Icon.FiClipboard} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiTrash} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiNavigation} variant="icon" color="secondary" />
|
||||
<Button StartIcon={FiClipboard} variant="icon" color="secondary" />
|
||||
</ButtonGroup>
|
||||
</VariantRow>
|
||||
</VariantsTable>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { FiArrowDown, FiArrowUp, FiTrash } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Icon, Badge, BadgeProps } from "../..";
|
||||
import { Badge, BadgeProps } from "../..";
|
||||
import { Divider } from "../divider";
|
||||
|
||||
type Action = { check: () => boolean; fn: () => void };
|
||||
@@ -37,7 +38,7 @@ export default function FormCard({
|
||||
type="button"
|
||||
className="invisible absolute left-0 -ml-[13px] -mt-10 flex h-6 w-6 scale-0 items-center justify-center rounded-md border bg-white p-1 text-gray-400 transition-all hover:border-transparent hover:text-black hover:shadow group-hover:visible group-hover:scale-100 "
|
||||
onClick={() => moveUp?.fn()}>
|
||||
<Icon.FiArrowUp />
|
||||
<FiArrowUp />
|
||||
</button>
|
||||
) : null}
|
||||
{moveDown?.check() ? (
|
||||
@@ -45,7 +46,7 @@ export default function FormCard({
|
||||
type="button"
|
||||
className="invisible absolute left-0 -ml-[13px] -mt-2 flex h-6 w-6 scale-0 items-center justify-center rounded-md border bg-white p-1 text-gray-400 transition-all hover:border-transparent hover:text-black hover:shadow group-hover:visible group-hover:scale-100"
|
||||
onClick={() => moveDown?.fn()}>
|
||||
<Icon.FiArrowDown />
|
||||
<FiArrowDown />
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -66,7 +67,7 @@ export default function FormCard({
|
||||
deleteField?.fn();
|
||||
}}
|
||||
color="secondary">
|
||||
<Icon.FiTrash className="h-4 w-4 text-gray-400" />
|
||||
<FiTrash className="h-4 w-4 text-gray-400" />
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -2,8 +2,8 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||
import React, { PropsWithChildren, ReactNode } from "react";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { FiAlertCircle, FiCheck } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Icon } from "../icon";
|
||||
import { DialogClose, DialogContent } from "./Dialog";
|
||||
|
||||
export type ConfirmationDialogContentProps = {
|
||||
@@ -38,17 +38,17 @@ export function ConfirmationDialogContent(props: PropsWithChildren<ConfirmationD
|
||||
<div className="mt-0.5 ltr:mr-3">
|
||||
{variety === "danger" && (
|
||||
<div className="mx-auto rounded-full bg-red-100 p-2 text-center">
|
||||
<Icon.FiAlertCircle className="h-5 w-5 text-red-600" />
|
||||
<FiAlertCircle className="h-5 w-5 text-red-600" />
|
||||
</div>
|
||||
)}
|
||||
{variety === "warning" && (
|
||||
<div className="mx-auto rounded-full bg-orange-100 p-2 text-center">
|
||||
<Icon.FiAlertCircle className="h-5 w-5 text-orange-600" />
|
||||
<FiAlertCircle className="h-5 w-5 text-orange-600" />
|
||||
</div>
|
||||
)}
|
||||
{variety === "success" && (
|
||||
<div className="mx-auto rounded-full bg-green-100 p-2 text-center">
|
||||
<Icon.FiCheck className="h-5 w-5 text-green-600" />
|
||||
<FiCheck className="h-5 w-5 text-green-600" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Icon } from "@calcom/ui";
|
||||
import { Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@calcom/ui";
|
||||
import { FiChevronDown } from "@calcom/ui/components/icon";
|
||||
|
||||
interface IAddVariablesDropdown {
|
||||
addVariable: (variable: string) => void;
|
||||
@@ -18,14 +19,14 @@ export const AddVariablesDropdown = (props: IAddVariablesDropdown) => {
|
||||
<>
|
||||
<div className="hidden sm:flex">
|
||||
{t("add_variable")}
|
||||
<Icon.FiChevronDown className="mt-[2px] ml-1 h-4 w-4" />
|
||||
<FiChevronDown className="mt-[2px] ml-1 h-4 w-4" />
|
||||
</div>
|
||||
<div className="block sm:hidden">+</div>
|
||||
</>
|
||||
) : (
|
||||
<div className="flex">
|
||||
{t("add_variable")}
|
||||
<Icon.FiChevronDown className="mt-[2px] ml-1 h-4 w-4" />
|
||||
<FiChevronDown className="mt-[2px] ml-1 h-4 w-4" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -29,15 +29,8 @@ import {
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
|
||||
import {
|
||||
Icon,
|
||||
Dropdown,
|
||||
DropdownMenuTrigger,
|
||||
DropdownMenuItem,
|
||||
DropdownItem,
|
||||
DropdownMenuContent,
|
||||
Button,
|
||||
} from "@calcom/ui";
|
||||
import { Dropdown, DropdownMenuTrigger, DropdownMenuItem, DropdownMenuContent, Button } from "@calcom/ui";
|
||||
import { FiChevronDown } from "@calcom/ui/components/icon";
|
||||
|
||||
import { TextEditorProps } from "../Editor";
|
||||
import { AddVariablesDropdown } from "./AddVariablesDropdown";
|
||||
@@ -407,7 +400,7 @@ export default function ToolbarPlugin(props: TextEditorProps) {
|
||||
<span className="text hidden text-gray-700 sm:flex">
|
||||
{blockTypeToBlockName[blockType as keyof BlockType]}
|
||||
</span>
|
||||
<Icon.FiChevronDown className="ml-2 h-4 w-4 text-gray-700" />
|
||||
<FiChevronDown className="ml-2 h-4 w-4 text-gray-700" />
|
||||
</>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantRow } from '@calcom/storybook/components'
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiCalendar } from "@calcom/ui/components/icon";
|
||||
import { EmptyScreen } from './EmptyScreen';
|
||||
|
||||
<Meta title="UI/EmptyScreen" component={EmptyScreen} />
|
||||
@@ -17,7 +17,7 @@ The CTA button can prompt the user to add the info/ apps needed for the page.
|
||||
<VariantsTable titles={[]} columnMinWidth={150}>
|
||||
<VariantRow variant="Default">
|
||||
<EmptyScreen
|
||||
Icon={Icon.FiCalendar}
|
||||
Icon={FiCalendar}
|
||||
headline="Empty state header"
|
||||
description="Do consectetur qui ex deserunt do est veniam commodo. Eiusmod eiusmod dolore nostrud pariatur mollit sit commodo. Learn More."
|
||||
buttonText="Button text"
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import "@wojtekmaj/react-daterange-picker/dist/DateRangePicker.css";
|
||||
import PrimitiveDateRangePicker from "@wojtekmaj/react-daterange-picker/dist/entry.nostyle";
|
||||
|
||||
import { Icon } from "../../..";
|
||||
import { FiArrowRight, FiCalendar, FiChevronLeft, FiChevronRight } from "@calcom/ui/components/icon";
|
||||
|
||||
import "./styles.css";
|
||||
|
||||
type Props = {
|
||||
@@ -19,14 +20,14 @@ const DateRangePicker = ({ disabled, startDate, endDate, onDatesChange }: Props)
|
||||
disabled={disabled || false}
|
||||
className="rounded-sm border-gray-300 text-sm"
|
||||
clearIcon={null}
|
||||
calendarIcon={<Icon.FiCalendar className="h-4 w-4 text-gray-500" />}
|
||||
rangeDivider={<Icon.FiArrowRight className="h-4 w-4 text-gray-400 ltr:mr-2 rtl:ml-2" />}
|
||||
calendarIcon={<FiCalendar className="h-4 w-4 text-gray-500" />}
|
||||
rangeDivider={<FiArrowRight className="h-4 w-4 text-gray-400 ltr:mr-2 rtl:ml-2" />}
|
||||
value={[startDate, endDate]}
|
||||
onChange={([startDate, endDate]: [Date, Date]) => {
|
||||
if (typeof onDatesChange === "function") onDatesChange({ startDate, endDate });
|
||||
}}
|
||||
nextLabel={<Icon.FiChevronRight className="h-4 w-4 text-gray-500" />}
|
||||
prevLabel={<Icon.FiChevronLeft className="h-4 w-4 text-gray-500" />}
|
||||
nextLabel={<FiChevronRight className="h-4 w-4 text-gray-500" />}
|
||||
prevLabel={<FiChevronLeft className="h-4 w-4 text-gray-500" />}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import "react-date-picker/dist/DatePicker.css";
|
||||
import PrimitiveDatePicker from "react-date-picker/dist/entry.nostyle";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiCalendar } from "@calcom/ui/components/icon";
|
||||
|
||||
type Props = {
|
||||
date: Date;
|
||||
@@ -22,7 +22,7 @@ const DatePicker = ({ minDate, disabled, date, onDatesChange, className }: Props
|
||||
)}
|
||||
calendarClassName="rounded-md"
|
||||
clearIcon={null}
|
||||
calendarIcon={<Icon.FiCalendar className="h-5 w-5 rounded-md text-gray-500" />}
|
||||
calendarIcon={<FiCalendar className="h-5 w-5 rounded-md text-gray-500" />}
|
||||
value={date}
|
||||
minDate={minDate}
|
||||
disabled={disabled}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FieldValues, useFormContext } from "react-hook-form";
|
||||
|
||||
import { Icon } from "../../../components/icon";
|
||||
import { FiCheck, FiCircle, FiInfo, FiX } from "@calcom/ui/components/icon";
|
||||
|
||||
export function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
||||
hintErrors?: string[];
|
||||
@@ -48,12 +48,12 @@ export function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
||||
className={error !== undefined ? (submitted ? "text-red-700" : "") : "text-green-600"}>
|
||||
{error !== undefined ? (
|
||||
submitted ? (
|
||||
<Icon.FiX size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
|
||||
<FiX size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
|
||||
) : (
|
||||
<Icon.FiCircle fill="currentColor" size="5" className="inline-block ltr:mr-2 rtl:ml-2" />
|
||||
<FiCircle fill="currentColor" size="5" className="inline-block ltr:mr-2 rtl:ml-2" />
|
||||
)
|
||||
) : (
|
||||
<Icon.FiCheck size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
|
||||
<FiCheck size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
|
||||
)}
|
||||
{t(`${fieldName}_hint_${key}`)}
|
||||
</li>
|
||||
@@ -68,7 +68,7 @@ export function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
||||
if (fieldErrors) {
|
||||
return (
|
||||
<div className="text-gray mt-2 flex items-center text-sm text-red-700">
|
||||
<Icon.FiInfo className="mr-1 h-3 w-3" />
|
||||
<FiInfo className="mr-1 h-3 w-3" />
|
||||
<>{fieldErrors.message}</>
|
||||
</div>
|
||||
);
|
||||
@@ -86,9 +86,9 @@ export function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
||||
return (
|
||||
<li key={key} className={!!dirty ? "text-green-600" : ""}>
|
||||
{!!dirty ? (
|
||||
<Icon.FiCheck size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
|
||||
<FiCheck size="12" strokeWidth="3" className="-ml-1 inline-block ltr:mr-2 rtl:ml-2" />
|
||||
) : (
|
||||
<Icon.FiCircle fill="currentColor" size="5" className="inline-block ltr:mr-2 rtl:ml-2" />
|
||||
<FiCircle fill="currentColor" size="5" className="inline-block ltr:mr-2 rtl:ml-2" />
|
||||
)}
|
||||
{t(`${fieldName}_hint_${key}`)}
|
||||
</li>
|
||||
|
||||
@@ -4,8 +4,9 @@ import { FieldValues, FormProvider, SubmitHandler, useFormContext, UseFormReturn
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { getErrorFromUnknown } from "@calcom/lib/errors";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { FiEye, FiEyeOff, FiX } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Alert, Icon, showToast, Skeleton, Tooltip, UnstyledSelect } from "../../..";
|
||||
import { Alert, showToast, Skeleton, Tooltip, UnstyledSelect } from "../../..";
|
||||
import { HintsOrErrors } from "./HintOrErrors";
|
||||
import { Label } from "./Label";
|
||||
|
||||
@@ -162,7 +163,7 @@ export const InputField = forwardRef<HTMLInputElement, InputFieldProps>(function
|
||||
</Addon>
|
||||
)}
|
||||
{type === "search" && inputValue?.toString().length > 0 && (
|
||||
<Icon.FiX
|
||||
<FiX
|
||||
className="absolute top-2.5 h-4 w-4 cursor-pointer text-gray-500 ltr:right-2 rtl:left-2"
|
||||
onClick={(e) => {
|
||||
setInputValue("");
|
||||
@@ -220,9 +221,9 @@ export const PasswordField = forwardRef<HTMLInputElement, InputFieldProps>(funct
|
||||
type="button"
|
||||
onClick={() => toggleIsPasswordVisible()}>
|
||||
{isPasswordVisible ? (
|
||||
<Icon.FiEyeOff className="h-4 stroke-[2.5px]" />
|
||||
<FiEyeOff className="h-4 stroke-[2.5px]" />
|
||||
) : (
|
||||
<Icon.FiEye className="h-4 stroke-[2.5px]" />
|
||||
<FiEye className="h-4 stroke-[2.5px]" />
|
||||
)}
|
||||
<span className="sr-only">{textLabel}</span>
|
||||
</button>
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
} from "react-select";
|
||||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { FiCheck } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Icon } from "../../../components/icon";
|
||||
import { UpgradeTeamsBadge } from "../../badge";
|
||||
|
||||
export const InputComponent = <
|
||||
@@ -62,7 +62,7 @@ export const OptionComponent = <
|
||||
<>
|
||||
<span className="mr-auto">{props.label}</span>
|
||||
{(props.data as unknown as ExtendedOption).needsUpgrade && <UpgradeTeamsBadge />}
|
||||
{props.isSelected && <Icon.FiCheck className="ml-2 h-4 w-4" />}
|
||||
{props.isSelected && <FiCheck className="ml-2 h-4 w-4" />}
|
||||
</>
|
||||
</reactSelectComponents.Option>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title,CustomArgsTable, VariantRow,VariantsTable} from '@calcom/storybook/components'
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiPlus } from "@calcom/ui/components/icon";
|
||||
|
||||
import {SelectField} from "./Select"
|
||||
|
||||
@@ -88,7 +88,7 @@ const BadSelect = props => (
|
||||
)
|
||||
|
||||
// Good: Custom component declared outside of the Select scope
|
||||
const Control = <IconLeading icon={Icon.FiPlus}/>
|
||||
const Control = <IconLeading icon={FiPlus}/>
|
||||
|
||||
const GoodSelect = props => <Select {...props} components={{ Control }} />
|
||||
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
// if feather icon is missing, use "@heroicons/react/outline";
|
||||
import { CollectionIcon } from "@heroicons/react/outline";
|
||||
import { ShieldCheckIcon } from "@heroicons/react/outline";
|
||||
import { BadgeCheckIcon } from "@heroicons/react/outline";
|
||||
import { ClipboardCopyIcon } from "@heroicons/react/outline";
|
||||
import { StarIcon as StarIconSolid } from "@heroicons/react/solid";
|
||||
// find all feather icons at https://feathericons.com/
|
||||
// github https://github.com/feathericons/feather
|
||||
import * as ReactIcons from "react-icons/fi";
|
||||
export * from "react-icons/fi";
|
||||
|
||||
export const Icon = {
|
||||
...ReactIcons,
|
||||
CollectionIcon,
|
||||
ShieldCheckIcon,
|
||||
BadgeCheckIcon,
|
||||
ClipboardCopyIcon,
|
||||
StarIconSolid,
|
||||
};
|
||||
// if feather icon is missing, use "@heroicons/react/outline";
|
||||
export { CollectionIcon } from "@heroicons/react/outline";
|
||||
export { ShieldCheckIcon } from "@heroicons/react/outline";
|
||||
export { BadgeCheckIcon } from "@heroicons/react/outline";
|
||||
export { ClipboardCopyIcon } from "@heroicons/react/outline";
|
||||
export { StarIcon as StarIconSolid } from "@heroicons/react/solid";
|
||||
@@ -5,8 +5,8 @@ import { ComponentProps, Fragment } from "react";
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import { FiChevronRight, FiExternalLink } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Icon } from "../../..";
|
||||
import { Skeleton } from "../../skeleton";
|
||||
|
||||
export type VerticalTabItemProps = {
|
||||
@@ -66,7 +66,7 @@ const VerticalTabItem = function ({
|
||||
<Skeleton title={t(name)} as="p" className="max-w-36 min-h-4 truncate">
|
||||
{t(name)}
|
||||
</Skeleton>
|
||||
{props.isExternalLink ? <Icon.FiExternalLink /> : null}
|
||||
{props.isExternalLink ? <FiExternalLink /> : null}
|
||||
</span>
|
||||
{info && (
|
||||
<Skeleton as="p" title={t(info)} className="max-w-44 mt-1 truncate text-xs font-normal">
|
||||
@@ -76,7 +76,7 @@ const VerticalTabItem = function ({
|
||||
</div>
|
||||
{!disableChevron && isCurrent && (
|
||||
<div className="ml-auto self-center">
|
||||
<Icon.FiChevronRight
|
||||
<FiChevronRight
|
||||
width={20}
|
||||
height={20}
|
||||
className="h-auto w-[20px] stroke-[1.5px] text-gray-700"
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as Popover from "@radix-ui/react-popover";
|
||||
import React from "react";
|
||||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiChevronDown } from "@calcom/ui/components/icon";
|
||||
|
||||
export const AnimatedPopover = ({
|
||||
text,
|
||||
@@ -52,7 +52,7 @@ export const AnimatedPopover = ({
|
||||
<div className="flex h-4 w-4 items-center justify-center rounded-full">{count}</div>
|
||||
)}
|
||||
</div>
|
||||
<Icon.FiChevronDown
|
||||
<FiChevronDown
|
||||
className={classNames("mt-auto ml-2 transition-transform duration-150", open && "rotate-180")}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
isPreviousDayInTimezone,
|
||||
sortByTimezone,
|
||||
} from "@calcom/lib/date-fns";
|
||||
import { FiGlobe } from "@calcom/ui/components/icon";
|
||||
|
||||
import { Icon } from "../icon";
|
||||
import { Attendee } from ".prisma/client";
|
||||
|
||||
interface MeetingTimeInTimezonesProps {
|
||||
@@ -55,7 +55,7 @@ const MeetingTimeInTimezones = ({
|
||||
<Popover.Trigger
|
||||
onClick={preventBubbling}
|
||||
className="popover-button invisible ml-2 inline-flex h-5 w-5 items-center justify-center rounded-sm text-gray-900 transition-colors hover:bg-gray-200 focus:bg-gray-200 group-hover:visible">
|
||||
<Icon.FiGlobe />
|
||||
<FiGlobe />
|
||||
</Popover.Trigger>
|
||||
<Popover.Portal>
|
||||
<Popover.Content
|
||||
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuTrigger,
|
||||
ButtonBaseProps,
|
||||
Icon,
|
||||
} from "@calcom/ui";
|
||||
import { FiChevronDown, FiMoreHorizontal } from "@calcom/ui/components/icon";
|
||||
|
||||
export type ActionType = {
|
||||
id: string;
|
||||
@@ -45,7 +45,7 @@ export const DropdownActions = ({
|
||||
<Dropdown>
|
||||
{!actionTrigger ? (
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button type="button" color="secondary" variant="icon" StartIcon={Icon.FiMoreHorizontal} />
|
||||
<Button type="button" color="secondary" variant="icon" StartIcon={FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
) : (
|
||||
<DropdownMenuTrigger asChild>{actionTrigger}</DropdownMenuTrigger>
|
||||
@@ -84,7 +84,7 @@ export const TableActions: FC<Props> = ({ actions }) => {
|
||||
href={action.href}
|
||||
onClick={action.onClick || defaultAction}
|
||||
StartIcon={action.icon}
|
||||
{...(action?.actions ? { EndIcon: Icon.FiChevronDown } : null)}
|
||||
{...(action?.actions ? { EndIcon: FiChevronDown } : null)}
|
||||
disabled={action.disabled}
|
||||
color={action.color || "secondary"}>
|
||||
{action.label}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import classNames from "classnames";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiCheck, FiInfo } from "@calcom/ui/components/icon";
|
||||
|
||||
type IToast = {
|
||||
message: string;
|
||||
@@ -15,7 +15,7 @@ export const SuccessToast = ({ message, toastVisible }: IToast) => (
|
||||
toastVisible && "animate-fade-in-up"
|
||||
)}>
|
||||
<span>
|
||||
<Icon.FiCheck className="h-4 w-4" />
|
||||
<FiCheck className="h-4 w-4" />
|
||||
</span>
|
||||
<p>{message}</p>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@ export const ErrorToast = ({ message, toastVisible }: IToast) => (
|
||||
toastVisible && "animate-fade-in-up"
|
||||
)}>
|
||||
<span>
|
||||
<Icon.FiInfo className="h-4 w-4" />
|
||||
<FiInfo className="h-4 w-4" />
|
||||
</span>
|
||||
<p>{message}</p>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@ export const WarningToast = ({ message, toastVisible }: IToast) => (
|
||||
toastVisible && "animate-fade-in-up"
|
||||
)}>
|
||||
<span>
|
||||
<Icon.FiInfo className="h-4 w-4" />
|
||||
<FiInfo className="h-4 w-4" />
|
||||
</span>
|
||||
<p>{message}</p>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@ export const DefaultToast = ({ message, toastVisible }: IToast) => (
|
||||
toastVisible && "animate-fade-in-up"
|
||||
)}>
|
||||
<span>
|
||||
<Icon.FiCheck className="h-4 w-4" />
|
||||
<FiCheck className="h-4 w-4" />
|
||||
</span>
|
||||
<p>{message}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { ExclamationIcon } from "@heroicons/react/outline";
|
||||
import { XIcon } from "@heroicons/react/solid";
|
||||
import classNames from "classnames";
|
||||
import noop from "lodash/noop";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { Icon } from "@calcom/ui";
|
||||
import { FiAlertTriangle, FiInfo } from "@calcom/ui/components/icon";
|
||||
|
||||
export type TopBannerProps = {
|
||||
text: string;
|
||||
@@ -31,10 +30,10 @@ export function TopBanner(props: TopBannerProps) {
|
||||
<div className="flex flex-1 flex-col items-start justify-center gap-2 p-1 lg:flex-row lg:items-center">
|
||||
<p className="flex flex-col items-start justify-center gap-2 text-left font-sans text-sm font-medium leading-4 text-gray-900 lg:flex-row lg:items-center">
|
||||
{variant === "error" && (
|
||||
<Icon.FiAlertTriangle className="h-4 w-4 stroke-[2.5px] text-black" aria-hidden="true" />
|
||||
<FiAlertTriangle className="h-4 w-4 stroke-[2.5px] text-black" aria-hidden="true" />
|
||||
)}
|
||||
{variant === "warning" && (
|
||||
<Icon.FiInfo className="h-4 w-4 stroke-[2.5px] text-black" aria-hidden="true" />
|
||||
<FiInfo className="h-4 w-4 stroke-[2.5px] text-black" aria-hidden="true" />
|
||||
)}
|
||||
{text}
|
||||
</p>
|
||||
|
||||
@@ -2,8 +2,7 @@ import { UseFormReturn } from "react-hook-form";
|
||||
import { Props } from "react-phone-number-input/react-hook-form";
|
||||
|
||||
import { EventLocationType } from "@calcom/app-store/locations";
|
||||
|
||||
import { Icon } from "../components/icon";
|
||||
import { FiMapPin } from "@calcom/ui/components/icon";
|
||||
|
||||
type BookingFormValues = {
|
||||
name: string;
|
||||
@@ -36,7 +35,7 @@ export type AddressInputProps<FormValues> = Props<
|
||||
function AddressInput<FormValues>({ bookingForm, name, className, ...rest }: AddressInputProps<FormValues>) {
|
||||
return (
|
||||
<div className="relative ">
|
||||
<Icon.FiMapPin color="#D2D2D2" className="absolute top-1/2 left-0.5 ml-3 h-6 -translate-y-1/2" />
|
||||
<FiMapPin color="#D2D2D2" className="absolute top-1/2 left-0.5 ml-3 h-6 -translate-y-1/2" />
|
||||
<input
|
||||
{...rest}
|
||||
{...bookingForm.register("attendeeAddress")}
|
||||
|
||||
@@ -73,7 +73,6 @@ export type { TopBannerProps } from "./components/top-banner";
|
||||
export { AnimatedPopover, MeetingTimeInTimezones } from "./components/popover";
|
||||
export { TableActions, DropdownActions } from "./components/table/TableActions";
|
||||
export type { ActionType } from "./components/table/TableActions";
|
||||
export { Icon } from "./components/icon";
|
||||
export { ErrorBoundary } from "./components/errorBoundary";
|
||||
export { Logo } from "./components/logo";
|
||||
export { Alert } from "./components/alert";
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
"sideEffects": false,
|
||||
"version": "0.0.0",
|
||||
"main": "./index.tsx",
|
||||
"exports": "./index.tsx",
|
||||
"exports": {
|
||||
".": "./index.tsx",
|
||||
"./components/icon": "./components/icon/index.ts"
|
||||
},
|
||||
"types": "./index.tsx",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Reference in new issue
Block a user