chore: icon cleanup (#13770)
Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
294 files changed
+3161
-1715
No files matched your search
@@ -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}
|
||||
|
||||
@@ -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
-3
@@ -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>
|
||||
|
||||
+4
-4
@@ -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")}
|
||||
|
||||
+1
-2
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = "",
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
@@ -2,8 +2,7 @@ import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import type { Props } from "react-select";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Avatar, EmptyScreen, Label, Select } from "@calcom/ui";
|
||||
import { UserPlus, X } from "@calcom/ui/components/icon";
|
||||
import { Avatar, EmptyScreen, Icon, Label, Select } from "@calcom/ui";
|
||||
|
||||
export type CheckedUserSelectOption = {
|
||||
avatar: string;
|
||||
@@ -47,7 +46,8 @@ export const CheckedUserSelect = ({
|
||||
className={`flex px-3 py-2 ${index === value.length - 1 ? "" : "border-b"}`}>
|
||||
<Avatar size="sm" imageSrc={option.avatar} alt={option.label} />
|
||||
<p className="my-auto ml-3 text-sm text-gray-900">{option.label}</p>
|
||||
<X
|
||||
<Icon
|
||||
name="x"
|
||||
onClick={() => props.onChange(value.filter((item) => item.value !== option.value))}
|
||||
className="my-auto ml-auto"
|
||||
/>
|
||||
@@ -60,7 +60,7 @@ export const CheckedUserSelect = ({
|
||||
) : (
|
||||
<div className="mt-6">
|
||||
<EmptyScreen
|
||||
Icon={UserPlus}
|
||||
Icon="user-plus"
|
||||
headline={t("no_assigned_members")}
|
||||
description={t("start_assigning_members_above")}
|
||||
/>
|
||||
|
||||
@@ -5,8 +5,7 @@ import { classNames } from "@calcom/lib";
|
||||
import { WEBSITE_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { MembershipRole } from "@calcom/prisma/enums";
|
||||
import { Avatar, Badge, Button, ButtonGroup, Select, Switch, Tooltip } from "@calcom/ui";
|
||||
import { ExternalLink, X } from "@calcom/ui/components/icon";
|
||||
import { Avatar, Badge, Button, ButtonGroup, Icon, Select, Switch, Tooltip } from "@calcom/ui";
|
||||
|
||||
export type ChildrenEventType = {
|
||||
value: string;
|
||||
@@ -107,7 +106,7 @@ export const ChildrenEventTypeSelect = ({
|
||||
target="_blank"
|
||||
variant="icon"
|
||||
href={`${WEBSITE_URL}/${children.owner?.username}/${children.slug}`}
|
||||
StartIcon={ExternalLink}
|
||||
StartIcon="external-link"
|
||||
/>
|
||||
</Tooltip>
|
||||
)}
|
||||
@@ -119,7 +118,7 @@ export const ChildrenEventTypeSelect = ({
|
||||
onClick={() =>
|
||||
props.onChange(value.filter((item) => item.owner.id !== children.owner.id))
|
||||
}
|
||||
StartIcon={X}
|
||||
StartIcon="x"
|
||||
/>
|
||||
</Tooltip>
|
||||
</ButtonGroup>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { Price } from "@calcom/features/bookings/components/event-meta/Price";
|
||||
import { getPriceIcon } from "@calcom/features/bookings/components/event-meta/getPriceIcon";
|
||||
import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon";
|
||||
import { classNames, parseRecurringEvent } from "@calcom/lib";
|
||||
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
@@ -11,7 +11,6 @@ import type { baseEventTypeSelect } from "@calcom/prisma";
|
||||
import { SchedulingType } from "@calcom/prisma/enums";
|
||||
import type { EventTypeModel } from "@calcom/prisma/zod";
|
||||
import { Badge } from "@calcom/ui";
|
||||
import { Clock, Users, RefreshCw, Clipboard, Plus, User, Lock } from "@calcom/ui/components/icon";
|
||||
|
||||
export type EventTypeDescriptionProps = {
|
||||
eventType: Pick<
|
||||
@@ -59,34 +58,34 @@ export const EventTypeDescription = ({
|
||||
{eventType.metadata?.multipleDuration ? (
|
||||
eventType.metadata.multipleDuration.map((dur, idx) => (
|
||||
<li key={idx}>
|
||||
<Badge variant="gray" startIcon={Clock}>
|
||||
<Badge variant="gray" startIcon="clock">
|
||||
{dur}m
|
||||
</Badge>
|
||||
</li>
|
||||
))
|
||||
) : (
|
||||
<li>
|
||||
<Badge variant="gray" startIcon={Clock}>
|
||||
<Badge variant="gray" startIcon="clock">
|
||||
{eventType.length}m
|
||||
</Badge>
|
||||
</li>
|
||||
)}
|
||||
{eventType.schedulingType && eventType.schedulingType !== SchedulingType.MANAGED && (
|
||||
<li>
|
||||
<Badge variant="gray" startIcon={Users}>
|
||||
<Badge variant="gray" startIcon="users">
|
||||
{eventType.schedulingType === SchedulingType.ROUND_ROBIN && t("round_robin")}
|
||||
{eventType.schedulingType === SchedulingType.COLLECTIVE && t("collective")}
|
||||
</Badge>
|
||||
</li>
|
||||
)}
|
||||
{eventType.metadata?.managedEventConfig && !isPublic && (
|
||||
<Badge variant="gray" startIcon={Lock}>
|
||||
<Badge variant="gray" startIcon="lock">
|
||||
{t("managed")}
|
||||
</Badge>
|
||||
)}
|
||||
{recurringEvent?.count && recurringEvent.count > 0 && (
|
||||
<li className="hidden xl:block" data-testid="repeat-eventtype">
|
||||
<Badge variant="gray" startIcon={RefreshCw}>
|
||||
<Badge variant="gray" startIcon="refresh-cw">
|
||||
{t("repeats_up_to", {
|
||||
count: recurringEvent.count,
|
||||
})}
|
||||
@@ -95,7 +94,11 @@ export const EventTypeDescription = ({
|
||||
)}
|
||||
{paymentAppData.enabled && (
|
||||
<li>
|
||||
<Badge variant="gray" startIcon={getPriceIcon(paymentAppData.currency)}>
|
||||
<Badge
|
||||
variant="gray"
|
||||
customStartIcon={
|
||||
<PriceIcon currency={paymentAppData.currency} className="h-3 w-3 stroke-[3px]" />
|
||||
}>
|
||||
<Price
|
||||
currency={paymentAppData.currency}
|
||||
price={paymentAppData.price}
|
||||
@@ -106,7 +109,7 @@ export const EventTypeDescription = ({
|
||||
)}
|
||||
{eventType.requiresConfirmation && (
|
||||
<li className="hidden xl:block" data-testid="requires-confirmation-badge">
|
||||
<Badge variant="gray" startIcon={Clipboard}>
|
||||
<Badge variant="gray" startIcon="clipboard">
|
||||
{eventType.metadata?.requiresConfirmationThreshold
|
||||
? t("may_require_confirmation")
|
||||
: t("requires_confirmation")}
|
||||
@@ -116,7 +119,7 @@ export const EventTypeDescription = ({
|
||||
{/* TODO: Maybe add a tool tip to this? */}
|
||||
{eventType.requiresConfirmation || (recurringEvent?.count && recurringEvent.count) ? (
|
||||
<li className="block xl:hidden">
|
||||
<Badge variant="gray" startIcon={Plus}>
|
||||
<Badge variant="gray" startIcon="plus">
|
||||
<p>{[eventType.requiresConfirmation, recurringEvent?.count].filter(Boolean).length}</p>
|
||||
</Badge>
|
||||
</li>
|
||||
@@ -125,7 +128,7 @@ export const EventTypeDescription = ({
|
||||
)}
|
||||
{eventType?.seatsPerTimeSlot ? (
|
||||
<li>
|
||||
<Badge variant="gray" startIcon={User}>
|
||||
<Badge variant="gray" startIcon="user">
|
||||
<p>{t("event_type_seats", { numberOfSeats: eventType.seatsPerTimeSlot })} </p>
|
||||
</Badge>
|
||||
</li>
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { GroupBase, Props, ValueContainerProps } from "react-select";
|
||||
import { components } from "react-select";
|
||||
|
||||
import { Select } from "@calcom/ui";
|
||||
import { Plus } from "@calcom/ui/components/icon";
|
||||
|
||||
const LimitedChipsContainer = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({
|
||||
children,
|
||||
@@ -24,7 +23,8 @@ const LimitedChipsContainer = <Option, IsMulti extends boolean, Group extends Gr
|
||||
{overflowCounter > 0 && (
|
||||
<span className="bg-subtle text-default flex items-center justify-center rounded-md px-2 py-[5px] text-[14px] font-medium leading-4">
|
||||
<>
|
||||
<Plus className="mr-1 inline h-3 w-3 stroke-[3px]" /> <span>{overflowCounter} more</span>
|
||||
<Icon name="plus" className="mr-1 inline h-3 w-3 stroke-[3px]" />{" "}
|
||||
<span>{overflowCounter} more</span>
|
||||
</>
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import { useSession } from "next-auth/react";
|
||||
import type { ReactNode, InputHTMLAttributes } from "react";
|
||||
import type { InputHTMLAttributes, ReactNode } from "react";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { AnimatedPopover, Avatar, Divider, Tooltip, VerticalDivider } from "@calcom/ui";
|
||||
import { Layers, User } from "@calcom/ui/components/icon";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { AnimatedPopover, Avatar, Divider, Icon, Tooltip, VerticalDivider } from "@calcom/ui";
|
||||
|
||||
import { filterQuerySchema } from "../lib/getTeamsFiltersFromQuery";
|
||||
|
||||
@@ -73,7 +72,7 @@ export const TeamsFilter = ({
|
||||
<FilterCheckboxFieldsContainer>
|
||||
<FilterCheckboxField
|
||||
id="all"
|
||||
icon={<Layers className="h-4 w-4" />}
|
||||
icon={<Icon name="layers" className="h-4 w-4" />}
|
||||
checked={!query.teamIds && !isUserInQuery}
|
||||
onChange={removeAllQueryParams}
|
||||
label={t("all")}
|
||||
@@ -81,7 +80,7 @@ export const TeamsFilter = ({
|
||||
|
||||
<FilterCheckboxField
|
||||
id="yours"
|
||||
icon={<User className="h-4 w-4" />}
|
||||
icon={<Icon name="user" className="h-4 w-4" />}
|
||||
checked={!!isUserInQuery}
|
||||
onChange={(e) => {
|
||||
if (e.target.checked) {
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import { useEffect } from "react";
|
||||
import type { z } from "zod";
|
||||
|
||||
import Widgets from "@calcom/app-store/routing-forms/components/react-awesome-query-builder/widgets";
|
||||
import type {
|
||||
TextLikeComponentProps,
|
||||
SelectLikeComponentProps,
|
||||
TextLikeComponentProps,
|
||||
} from "@calcom/app-store/routing-forms/components/react-awesome-query-builder/widgets";
|
||||
import Widgets from "@calcom/app-store/routing-forms/components/react-awesome-query-builder/widgets";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import {
|
||||
PhoneInput,
|
||||
AddressInput,
|
||||
Button,
|
||||
Label,
|
||||
Group,
|
||||
RadioField,
|
||||
EmailField,
|
||||
Tooltip,
|
||||
InputField,
|
||||
CheckboxField,
|
||||
EmailField,
|
||||
Group,
|
||||
Icon,
|
||||
InfoBadge,
|
||||
InputField,
|
||||
Label,
|
||||
PhoneInput,
|
||||
RadioField,
|
||||
Tooltip,
|
||||
} from "@calcom/ui";
|
||||
import { InfoBadge } from "@calcom/ui";
|
||||
import { UserPlus, X } from "@calcom/ui/components/icon";
|
||||
|
||||
import { ComponentForField } from "./FormBuilderField";
|
||||
import { propsTypes } from "./propsTypes";
|
||||
import type { FieldType, variantsConfigSchema, fieldSchema } from "./schema";
|
||||
import type { fieldSchema, FieldType, variantsConfigSchema } from "./schema";
|
||||
import { preprocessNameFieldDataWithVariant } from "./utils";
|
||||
|
||||
export const isValidValueProp: Record<Component["propsType"], (val: unknown) => boolean> = {
|
||||
@@ -264,7 +264,7 @@ export const Components: Record<FieldType, Component> = {
|
||||
!readOnly ? (
|
||||
<Tooltip content="Remove email">
|
||||
<button className="m-1" type="button">
|
||||
<X width={12} className="text-default" />
|
||||
<Icon name="x" width={12} className="text-default" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
) : null
|
||||
@@ -278,7 +278,7 @@ export const Components: Record<FieldType, Component> = {
|
||||
data-testid="add-another-guest"
|
||||
type="button"
|
||||
color="minimal"
|
||||
StartIcon={UserPlus}
|
||||
StartIcon="user-plus"
|
||||
className="my-2.5"
|
||||
onClick={() => {
|
||||
value.push("");
|
||||
@@ -297,7 +297,7 @@ export const Components: Record<FieldType, Component> = {
|
||||
data-testid="add-guests"
|
||||
color="minimal"
|
||||
variant="button"
|
||||
StartIcon={UserPlus}
|
||||
StartIcon="user-plus"
|
||||
onClick={() => {
|
||||
value.push("");
|
||||
setValue(value);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Controller, useFieldArray, useFormContext, useForm } from "react-hook-form";
|
||||
import type { UseFormReturn, SubmitHandler } from "react-hook-form";
|
||||
import { useEffect, useState } from "react";
|
||||
import type { SubmitHandler, UseFormReturn } from "react-hook-form";
|
||||
import { Controller, useFieldArray, useForm, useFormContext } from "react-hook-form";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { getAndUpdateNormalizedValues } from "@calcom/features/form-builder/FormBuilderField";
|
||||
@@ -9,23 +9,23 @@ import { classNames } from "@calcom/lib";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
|
||||
import {
|
||||
Label,
|
||||
Badge,
|
||||
BooleanToggleGroupField,
|
||||
Button,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
Form,
|
||||
BooleanToggleGroupField,
|
||||
SelectField,
|
||||
InputField,
|
||||
Icon,
|
||||
Input,
|
||||
Switch,
|
||||
InputField,
|
||||
Label,
|
||||
SelectField,
|
||||
showToast,
|
||||
Switch,
|
||||
} from "@calcom/ui";
|
||||
import { ArrowDown, ArrowUp, X, Plus, Trash2 } from "@calcom/ui/components/icon";
|
||||
|
||||
import { fieldTypesConfigMap } from "./fieldTypes";
|
||||
import { fieldsThatSupportLabelAsSafeHtml } from "./fieldsThatSupportLabelAsSafeHtml";
|
||||
@@ -163,7 +163,7 @@ export const FormBuilder = function FormBuilder({
|
||||
type="button"
|
||||
className="bg-default text-muted hover:text-emphasis disabled:hover:text-muted border-subtle hover:border-emphasis invisible absolute -left-[12px] -ml-4 -mt-4 mb-4 hidden h-6 w-6 scale-0 items-center justify-center rounded-md border p-1 transition-all hover:shadow disabled:hover:border-inherit disabled:hover:shadow-none group-hover:visible group-hover:scale-100 sm:ml-0 sm:flex"
|
||||
onClick={() => swap(index, index - 1)}>
|
||||
<ArrowUp className="h-5 w-5" />
|
||||
<Icon name="arrow-up" className="h-5 w-5" />
|
||||
</button>
|
||||
)}
|
||||
{index < fields.length - 1 && (
|
||||
@@ -171,7 +171,7 @@ export const FormBuilder = function FormBuilder({
|
||||
type="button"
|
||||
className="bg-default text-muted hover:border-emphasis border-subtle hover:text-emphasis disabled:hover:text-muted invisible absolute -left-[12px] -ml-4 mt-8 hidden h-6 w-6 scale-0 items-center justify-center rounded-md border p-1 transition-all hover:shadow disabled:hover:border-inherit disabled:hover:shadow-none group-hover:visible group-hover:scale-100 sm:ml-0 sm:flex"
|
||||
onClick={() => swap(index, index + 1)}>
|
||||
<ArrowDown className="h-5 w-5" />
|
||||
<Icon name="arrow-down" className="h-5 w-5" />
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
@@ -226,7 +226,7 @@ export const FormBuilder = function FormBuilder({
|
||||
onClick={() => {
|
||||
removeField(index);
|
||||
}}
|
||||
StartIcon={Trash2}
|
||||
StartIcon="trash-2"
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
@@ -258,7 +258,7 @@ export const FormBuilder = function FormBuilder({
|
||||
data-testid="add-field"
|
||||
onClick={addField}
|
||||
className="mt-4"
|
||||
StartIcon={Plus}>
|
||||
StartIcon="plus">
|
||||
{addFieldLabel}
|
||||
</Button>
|
||||
)}
|
||||
@@ -367,7 +367,7 @@ function Options({
|
||||
className="-ml-8 mb-2 hover:!bg-transparent focus:!bg-transparent focus:!outline-none focus:!ring-0"
|
||||
size="sm"
|
||||
color="minimal"
|
||||
StartIcon={X}
|
||||
StartIcon="x"
|
||||
onClick={() => {
|
||||
if (!value) {
|
||||
return;
|
||||
@@ -389,7 +389,7 @@ function Options({
|
||||
value.push({ label: "", value: "" });
|
||||
onChange(value);
|
||||
}}
|
||||
StartIcon={Plus}>
|
||||
StartIcon="plus">
|
||||
Add an Option
|
||||
</Button>
|
||||
)}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type { z } from "zod";
|
||||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Label, InfoBadge } from "@calcom/ui";
|
||||
import { Info } from "@calcom/ui/components/icon";
|
||||
import { Icon, InfoBadge, Label } from "@calcom/ui";
|
||||
|
||||
import { Components, isValidValueProp } from "./Components";
|
||||
import { fieldTypesConfigMap } from "./fieldTypes";
|
||||
@@ -97,7 +96,7 @@ export const FormBuilderField = ({
|
||||
<div
|
||||
data-testid={`error-message-${field.name}`}
|
||||
className="mt-2 flex items-center text-sm text-red-700 ">
|
||||
<Info className="h-3 w-3 ltr:mr-2 rtl:ml-2" />
|
||||
<Icon name="info" className="h-3 w-3 ltr:mr-2 rtl:ml-2" />
|
||||
<p>{t(message || "invalid_input")}</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { FileDownIcon } from "lucide-react";
|
||||
|
||||
import { useFilterContext } from "@calcom/features/insights/context/provider";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { RouterOutputs } from "@calcom/trpc";
|
||||
import { trpc } from "@calcom/trpc";
|
||||
import { Dropdown, DropdownItem, DropdownMenuContent, DropdownMenuTrigger, Button } from "@calcom/ui";
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenuContent, DropdownMenuTrigger, Icon } from "@calcom/ui";
|
||||
|
||||
const Download = () => {
|
||||
const { filter } = useFilterContext();
|
||||
@@ -58,7 +56,7 @@ const Download = () => {
|
||||
<Dropdown modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
EndIcon={FileDownIcon}
|
||||
EndIcon="file-down"
|
||||
color="secondary"
|
||||
{...(isPending && { loading: isPending })}
|
||||
className="self-end sm:self-baseline">
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import type { IconName } from "@calcom/ui";
|
||||
import {
|
||||
Dropdown,
|
||||
DropdownItem,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownItem,
|
||||
DropdownMenuTrigger,
|
||||
Icon,
|
||||
Tooltip,
|
||||
} from "@calcom/ui";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
import { Plus, Link, User, Check } from "@calcom/ui/components/icon";
|
||||
|
||||
import { useFilterContext } from "../context/provider";
|
||||
|
||||
type Option = { value: "event-type" | "user"; label: string; StartIcon?: SVGComponent | LucideIcon };
|
||||
type Option = {
|
||||
value: "event-type" | "user";
|
||||
label: string;
|
||||
StartIcon: IconName;
|
||||
};
|
||||
|
||||
export const FilterType = () => {
|
||||
const { t } = useLocale();
|
||||
@@ -24,12 +27,12 @@ export const FilterType = () => {
|
||||
{
|
||||
label: t("event_type"),
|
||||
value: "event-type",
|
||||
StartIcon: Link,
|
||||
StartIcon: "link",
|
||||
},
|
||||
{
|
||||
label: t("user"),
|
||||
value: "user",
|
||||
StartIcon: User,
|
||||
StartIcon: "user",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -46,7 +49,7 @@ export const FilterType = () => {
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<div className="hover:border-emphasis border-default text-default hover:text-emphasis focus:border-subtle mb-4 flex h-9 max-h-72 items-center justify-between whitespace-nowrap rounded-md border px-3 py-2 text-sm hover:cursor-pointer focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1">
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
<Icon name="plus" className="mr-2 h-4 w-4" />
|
||||
<Tooltip content={t("add_filter")}>
|
||||
<div>{t("add_filter")}</div>
|
||||
</Tooltip>
|
||||
@@ -67,7 +70,7 @@ export const FilterType = () => {
|
||||
childrenClassName="w-full">
|
||||
<div className="flex w-full items-center justify-between">
|
||||
{t(option.label)}
|
||||
{filterValue?.value === option.value && <Check className="h-4 w-4" />}
|
||||
{filterValue?.value === option.value && <Icon name="check" className="h-4 w-4" />}
|
||||
</div>
|
||||
</DropdownItem>
|
||||
</DropdownMenuItem>
|
||||
|
||||
@@ -8,8 +8,7 @@ import {
|
||||
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc";
|
||||
import { AnimatedPopover, Avatar, Divider } from "@calcom/ui";
|
||||
import { Layers, User } from "@calcom/ui/components/icon";
|
||||
import { AnimatedPopover, Avatar, Divider, Icon } from "@calcom/ui";
|
||||
|
||||
import { useFilterContext } from "../context/provider";
|
||||
|
||||
@@ -87,7 +86,7 @@ export const TeamAndSelfList = () => {
|
||||
{isSuccess && data?.length > 0 && data[0].isOrg && (
|
||||
<FilterCheckboxField
|
||||
id="all"
|
||||
icon={<Layers className="h-4 w-4" />}
|
||||
icon={<Icon name="layers" className="h-4 w-4" />}
|
||||
checked={isAll}
|
||||
onChange={(e) => {
|
||||
setConfigFilters({
|
||||
@@ -141,7 +140,7 @@ export const TeamAndSelfList = () => {
|
||||
|
||||
<FilterCheckboxField
|
||||
id="yours"
|
||||
icon={<User className="h-4 w-4" />}
|
||||
icon={<Icon name="user" className="h-4 w-4" />}
|
||||
checked={selectedUserId === session.data?.user.id}
|
||||
onChange={(e) => {
|
||||
if (e.target.checked) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useFilterContext } from "@calcom/features/insights/context/provider";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Button, Tooltip } from "@calcom/ui";
|
||||
import { X } from "@calcom/ui/components/icon";
|
||||
import { Button, Icon, Tooltip } from "@calcom/ui";
|
||||
|
||||
import { DateSelect } from "./DateSelect";
|
||||
import { Download } from "./Download/index";
|
||||
@@ -28,7 +27,7 @@ const ClearFilters = () => {
|
||||
onClick={() => {
|
||||
clearFilters();
|
||||
}}>
|
||||
<X className="mr-1 h-4 w-4" />
|
||||
<Icon name="x" className="mr-1 h-4 w-4" />
|
||||
{t("clear")}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
@@ -58,7 +57,7 @@ export const Filters = () => {
|
||||
color="secondary"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
StartIcon={Settings}
|
||||
StartIcon="settings"
|
||||
className="h-[38px]"
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -68,7 +67,7 @@ export const Filters = () => {
|
||||
color="secondary"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
StartIcon={Download}
|
||||
StartIcon="download"
|
||||
className="h-[38px]"
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Action } from "kbar";
|
||||
import {
|
||||
KBarAnimator,
|
||||
KBarPortal,
|
||||
@@ -9,7 +10,6 @@ import {
|
||||
useMatches,
|
||||
useRegisterActions,
|
||||
} from "kbar";
|
||||
import type { Action } from "kbar";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useMemo } from "react";
|
||||
|
||||
@@ -18,8 +18,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { isMac } from "@calcom/lib/isMac";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { Tooltip } from "@calcom/ui";
|
||||
import { Search, ArrowUp, ArrowDown, CornerDownLeft, Command } from "@calcom/ui/components/icon";
|
||||
import { Icon, Tooltip } from "@calcom/ui";
|
||||
|
||||
type shortcutArrayType = {
|
||||
shortcuts?: string[];
|
||||
@@ -242,7 +241,7 @@ export const KBarContent = () => {
|
||||
<KBarPositioner>
|
||||
<KBarAnimator className="bg-default z-10 w-full max-w-screen-sm overflow-hidden rounded-md shadow-lg">
|
||||
<div className="border-subtle flex items-center justify-center border-b">
|
||||
<Search className="text-default mx-3 h-4 w-4" />
|
||||
<Icon name="search" className="text-default mx-3 h-4 w-4" />
|
||||
<KBarSearch
|
||||
defaultPlaceholder={t("kbar_search_placeholder")}
|
||||
className="bg-default placeholder:text-subtle text-default w-full rounded-sm py-2.5 focus-visible:outline-none"
|
||||
@@ -250,11 +249,11 @@ export const KBarContent = () => {
|
||||
</div>
|
||||
<RenderResults />
|
||||
<div className="text-subtle border-subtle hidden items-center space-x-1 border-t px-2 py-1.5 text-xs sm:flex">
|
||||
<ArrowUp className="h-4 w-4" />
|
||||
<ArrowDown className="h-4 w-4" /> <span className="pr-2">{t("navigate")}</span>
|
||||
<CornerDownLeft className="h-4 w-4" />
|
||||
<Icon name="arrow-up" className="h-4 w-4" />
|
||||
<Icon name="arrow-down" className="h-4 w-4" /> <span className="pr-2">{t("navigate")}</span>
|
||||
<Icon name="corner-down-left" className="h-4 w-4" />
|
||||
<span className="pr-2">{t("open")}</span>
|
||||
{isMac ? <Command className="h-3 w-3" /> : "CTRL"}
|
||||
{isMac ? <Icon name="command" className="h-3 w-3" /> : "CTRL"}
|
||||
<span className="pr-1">+ K </span>
|
||||
<span className="pr-2">{t("close")}</span>
|
||||
</div>
|
||||
@@ -274,7 +273,7 @@ export const KBarTrigger = () => {
|
||||
color="minimal"
|
||||
onClick={query.toggle}
|
||||
className="text-default hover:bg-subtle todesktop:hover:!bg-transparent lg:hover:bg-emphasis lg:hover:text-emphasis group flex rounded-md px-3 py-2 text-sm font-medium transition lg:px-2">
|
||||
<Search className="h-4 w-4 flex-shrink-0 text-inherit" />
|
||||
<Icon name="search" className="h-4 w-4 flex-shrink-0 text-inherit" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { TimeRange, WorkingHours } from "@calcom/types/schedule";
|
||||
import { Button, DialogTrigger, Tooltip } from "@calcom/ui";
|
||||
import { Edit2, Trash2 } from "@calcom/ui/components/icon";
|
||||
import { Button, DialogTrigger, Icon, Tooltip } from "@calcom/ui";
|
||||
|
||||
import DateOverrideInputDialog from "./DateOverrideInputDialog";
|
||||
|
||||
@@ -86,7 +85,7 @@ const DateOverrideList = ({
|
||||
className="text-default"
|
||||
color="minimal"
|
||||
variant="icon"
|
||||
StartIcon={Edit2}
|
||||
StartIcon="pencil"
|
||||
/>
|
||||
</DialogTrigger>
|
||||
}
|
||||
@@ -105,7 +104,7 @@ const DateOverrideList = ({
|
||||
})}
|
||||
color="destructive"
|
||||
variant="icon"
|
||||
StartIcon={Trash2}
|
||||
StartIcon="trash-2"
|
||||
onClick={() => {
|
||||
replace([...fields.filter((currentItem) => currentItem.id !== item.id)]);
|
||||
}}
|
||||
|
||||
@@ -12,10 +12,10 @@ import {
|
||||
DialogFooter,
|
||||
DialogTrigger,
|
||||
Form,
|
||||
Icon,
|
||||
InputField,
|
||||
showToast,
|
||||
} from "@calcom/ui";
|
||||
import { Plus } from "@calcom/ui/components/icon";
|
||||
|
||||
export function NewScheduleButton({
|
||||
name = "new-schedule",
|
||||
@@ -65,7 +65,7 @@ export function NewScheduleButton({
|
||||
return (
|
||||
<Dialog name={name} clearQueryParamsOnClose={["copy-schedule-id"]}>
|
||||
<DialogTrigger asChild>
|
||||
<Button variant="fab" data-testid={name} StartIcon={Plus}>
|
||||
<Button variant="fab" data-testid={name} StartIcon="plus">
|
||||
{t("new")}
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Fragment, useCallback, useEffect, useMemo, useState, useRef } from "react";
|
||||
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import type {
|
||||
ArrayPath,
|
||||
Control,
|
||||
@@ -22,15 +22,15 @@ import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
|
||||
import type { TimeRange } from "@calcom/types/schedule";
|
||||
import {
|
||||
Button,
|
||||
CheckboxField,
|
||||
Dropdown,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuTrigger,
|
||||
Icon,
|
||||
Select,
|
||||
SkeletonText,
|
||||
Switch,
|
||||
CheckboxField,
|
||||
} from "@calcom/ui";
|
||||
import { Copy, Plus, Trash } from "@calcom/ui/components/icon";
|
||||
|
||||
export type { TimeRange };
|
||||
|
||||
@@ -150,7 +150,7 @@ const CopyButton = ({
|
||||
tooltip={labels?.copyTime ?? t("copy_times_to_tooltip")}
|
||||
color="minimal"
|
||||
variant="icon"
|
||||
StartIcon={Copy}
|
||||
StartIcon="copy"
|
||||
/>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
@@ -294,7 +294,7 @@ export const DayRanges = <TFieldValues extends FieldValues>({
|
||||
type="button"
|
||||
color="minimal"
|
||||
variant="icon"
|
||||
StartIcon={Plus}
|
||||
StartIcon="plus"
|
||||
onClick={() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const slotRange: any = getDateSlotRange(
|
||||
@@ -342,7 +342,7 @@ const RemoveTimeButton = ({
|
||||
type="button"
|
||||
variant="icon"
|
||||
color="destructive"
|
||||
StartIcon={Trash}
|
||||
StartIcon="trash"
|
||||
onClick={() => remove(index)}
|
||||
className={className}
|
||||
tooltip={labels?.deleteTime ?? t("delete")}
|
||||
|
||||
@@ -9,13 +9,13 @@ import {
|
||||
Badge,
|
||||
Button,
|
||||
Dropdown,
|
||||
DropdownItem,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownItem,
|
||||
DropdownMenuTrigger,
|
||||
Icon,
|
||||
showToast,
|
||||
} from "@calcom/ui";
|
||||
import { Globe, MoreHorizontal, Trash, Star, Copy } from "@calcom/ui/components/icon";
|
||||
|
||||
export function ScheduleListItem({
|
||||
schedule,
|
||||
@@ -69,7 +69,7 @@ export function ScheduleListItem({
|
||||
))}
|
||||
{(schedule.timeZone || displayOptions?.timeZone) && (
|
||||
<p className="my-1 flex items-center first-letter:text-xs">
|
||||
<Globe className="h-3.5 w-3.5" />
|
||||
<Icon name="globe" className="h-3.5 w-3.5" />
|
||||
{schedule.timeZone ?? displayOptions?.timeZone}
|
||||
</p>
|
||||
)}
|
||||
@@ -84,7 +84,7 @@ export function ScheduleListItem({
|
||||
type="button"
|
||||
variant="icon"
|
||||
color="secondary"
|
||||
StartIcon={MoreHorizontal}
|
||||
StartIcon="ellipsis"
|
||||
/>
|
||||
</DropdownMenuTrigger>
|
||||
{!isPending && data && (
|
||||
@@ -93,7 +93,7 @@ export function ScheduleListItem({
|
||||
{!schedule.isDefault && (
|
||||
<DropdownItem
|
||||
type="button"
|
||||
StartIcon={Star}
|
||||
StartIcon="star"
|
||||
onClick={() => {
|
||||
updateDefault({
|
||||
scheduleId: schedule.id,
|
||||
@@ -108,7 +108,7 @@ export function ScheduleListItem({
|
||||
<DropdownItem
|
||||
type="button"
|
||||
data-testid={`schedule-duplicate${schedule.id}`}
|
||||
StartIcon={Copy}
|
||||
StartIcon="copy"
|
||||
onClick={() => {
|
||||
duplicateFunction({
|
||||
scheduleId: schedule.id,
|
||||
@@ -121,7 +121,7 @@ export function ScheduleListItem({
|
||||
<DropdownItem
|
||||
type="button"
|
||||
color="destructive"
|
||||
StartIcon={Trash}
|
||||
StartIcon="trash"
|
||||
data-testid="delete-schedule"
|
||||
onClick={() => {
|
||||
if (!isDeletable) {
|
||||
|
||||
@@ -16,27 +16,13 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { IdentityProvider, MembershipRole, UserPermissionRole } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { VerticalTabItemProps } from "@calcom/ui";
|
||||
import { Badge, Button, ErrorBoundary, Skeleton, useMeta, VerticalTabItem } from "@calcom/ui";
|
||||
import {
|
||||
ArrowLeft,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
CreditCard,
|
||||
Key,
|
||||
Loader,
|
||||
Lock,
|
||||
Menu,
|
||||
Plus,
|
||||
Terminal,
|
||||
User,
|
||||
Users,
|
||||
} from "@calcom/ui/components/icon";
|
||||
import { Badge, Button, ErrorBoundary, Icon, Skeleton, useMeta, VerticalTabItem } from "@calcom/ui";
|
||||
|
||||
const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "my_account",
|
||||
href: "/settings/my-account",
|
||||
icon: User,
|
||||
icon: "user",
|
||||
children: [
|
||||
{ name: "profile", href: "/settings/my-account/profile" },
|
||||
{ name: "general", href: "/settings/my-account/general" },
|
||||
@@ -51,7 +37,7 @@ const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "security",
|
||||
href: "/settings/security",
|
||||
icon: Key,
|
||||
icon: "key",
|
||||
children: [
|
||||
{ name: "password", href: "/settings/security/password" },
|
||||
{ name: "impersonation", href: "/settings/security/impersonation" },
|
||||
@@ -61,13 +47,13 @@ const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "billing",
|
||||
href: "/settings/billing",
|
||||
icon: CreditCard,
|
||||
icon: "credit-card",
|
||||
children: [{ name: "manage_billing", href: "/settings/billing" }],
|
||||
},
|
||||
{
|
||||
name: "developer",
|
||||
href: "/settings/developer",
|
||||
icon: Terminal,
|
||||
icon: "terminal",
|
||||
children: [
|
||||
//
|
||||
{ name: "webhooks", href: "/settings/developer/webhooks" },
|
||||
@@ -118,13 +104,13 @@ const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "teams",
|
||||
href: "/teams",
|
||||
icon: Users,
|
||||
icon: "users",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: "admin",
|
||||
href: "/settings/admin",
|
||||
icon: Lock,
|
||||
icon: "lock",
|
||||
children: [
|
||||
//
|
||||
{ name: "features", href: "/settings/admin/flags" },
|
||||
@@ -191,7 +177,10 @@ const BackButtonInSidebar = ({ name }: { name: string }) => {
|
||||
href="/"
|
||||
className="hover:bg-subtle todesktop:mt-10 [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default text-emphasis group my-6 flex h-6 max-h-6 w-full flex-row items-center rounded-md px-3 py-2 text-sm font-medium leading-4"
|
||||
data-testid={`vertical-tab-${name}`}>
|
||||
<ArrowLeft className="h-4 w-4 stroke-[2px] ltr:mr-[10px] rtl:ml-[10px] rtl:rotate-180 md:mt-0" />
|
||||
<Icon
|
||||
name="arrow-left"
|
||||
className="h-4 w-4 stroke-[2px] ltr:mr-[10px] rtl:ml-[10px] rtl:rotate-180 md:mt-0"
|
||||
/>
|
||||
<Skeleton title={name} as="p" className="max-w-36 min-h-4 truncate" loadingClassName="ms-3">
|
||||
{name}
|
||||
</Skeleton>
|
||||
@@ -274,7 +263,7 @@ const SettingsSidebarContainer = ({
|
||||
tabsWithPermissions.splice(teamsIndex + 1, 0, {
|
||||
name: "other_teams",
|
||||
href: "/settings/organizations/teams/other",
|
||||
icon: Users,
|
||||
icon: "users",
|
||||
children: [],
|
||||
});
|
||||
}
|
||||
@@ -300,7 +289,10 @@ const SettingsSidebarContainer = ({
|
||||
<div className={`${!tab.children?.length ? "!mb-3" : ""}`}>
|
||||
<div className="[&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis text-default group flex h-9 w-full flex-row items-center rounded-md px-2 text-sm font-medium leading-none">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
<Icon
|
||||
name={tab.icon}
|
||||
className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0"
|
||||
/>
|
||||
)}
|
||||
{!tab.icon && tab?.avatar && (
|
||||
<img
|
||||
@@ -342,7 +334,10 @@ const SettingsSidebarContainer = ({
|
||||
<Link href={tab.href}>
|
||||
<div className="hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default text-default group flex h-9 w-full flex-row items-center rounded-md px-2 py-[10px] text-sm font-medium leading-none">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
<Icon
|
||||
name={tab.icon}
|
||||
className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0"
|
||||
/>
|
||||
)}
|
||||
<Skeleton
|
||||
title={tab.name}
|
||||
@@ -388,9 +383,9 @@ const SettingsSidebarContainer = ({
|
||||
}>
|
||||
<div className="me-3">
|
||||
{teamMenuState[index].teamMenuOpen ? (
|
||||
<ChevronDown className="h-4 w-4" />
|
||||
<Icon name="chevron-down" className="h-4 w-4" />
|
||||
) : (
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
<Icon name="chevron-right" className="h-4 w-4" />
|
||||
)}
|
||||
</div>
|
||||
{!team.parentId && (
|
||||
@@ -464,7 +459,7 @@ const SettingsSidebarContainer = ({
|
||||
name={t("add_a_team")}
|
||||
href={`${WEBAPP_URL}/settings/teams/new`}
|
||||
textClassNames="px-3 items-center mt-2 text-emphasis font-medium text-sm"
|
||||
icon={Plus}
|
||||
icon="plus"
|
||||
disableChevron
|
||||
/>
|
||||
)}
|
||||
@@ -478,7 +473,10 @@ const SettingsSidebarContainer = ({
|
||||
<Link href={tab.href}>
|
||||
<div className="hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default text-default group flex h-9 w-full flex-row items-center rounded-md px-2 py-[10px] text-sm font-medium leading-none">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
<Icon
|
||||
name={tab.icon}
|
||||
className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0"
|
||||
/>
|
||||
)}
|
||||
<Skeleton
|
||||
title={t("org_admin_other_teams")}
|
||||
@@ -524,9 +522,9 @@ const SettingsSidebarContainer = ({
|
||||
}>
|
||||
<div className="me-3">
|
||||
{otherTeamMenuState[index].teamMenuOpen ? (
|
||||
<ChevronDown className="h-4 w-4" />
|
||||
<Icon name="chevron-down" className="h-4 w-4" />
|
||||
) : (
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
<Icon name="chevron-right" className="h-4 w-4" />
|
||||
)}
|
||||
</div>
|
||||
{!otherTeam.parentId && (
|
||||
@@ -585,14 +583,14 @@ const MobileSettingsContainer = (props: { onSideContainerOpen?: () => void }) =>
|
||||
<>
|
||||
<nav className="bg-muted border-muted sticky top-0 z-20 flex w-full items-center justify-between border-b py-2 sm:relative lg:hidden">
|
||||
<div className="flex items-center space-x-3 ">
|
||||
<Button StartIcon={Menu} color="minimal" variant="icon" onClick={props.onSideContainerOpen}>
|
||||
<Button StartIcon="menu" color="minimal" variant="icon" onClick={props.onSideContainerOpen}>
|
||||
<span className="sr-only">{t("show_navigation")}</span>
|
||||
</Button>
|
||||
|
||||
<button
|
||||
className="hover:bg-emphasis flex items-center space-x-2 rounded-md px-3 py-1 rtl:space-x-reverse"
|
||||
onClick={() => router.back()}>
|
||||
<ArrowLeft className="text-default h-4 w-4" />
|
||||
<Icon name="arrow-left" className="text-default h-4 w-4" />
|
||||
<p className="text-emphasis font-semibold">{t("settings")}</p>
|
||||
</button>
|
||||
</div>
|
||||
@@ -650,7 +648,7 @@ export default function SettingsLayout({
|
||||
<div className="mx-auto max-w-full justify-center lg:max-w-4xl">
|
||||
<ShellHeader />
|
||||
<ErrorBoundary>
|
||||
<Suspense fallback={<Loader />}>{children}</Suspense>
|
||||
<Suspense fallback={<Icon name="loader" />}>{children}</Suspense>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</div>
|
||||
@@ -704,7 +702,7 @@ export function ShellHeader() {
|
||||
<div className="flex w-full items-center">
|
||||
{meta.backButton && (
|
||||
<a href="javascript:history.back()">
|
||||
<ArrowLeft className="mr-7" />
|
||||
<Icon name="arrow-left" className="mr-7" />
|
||||
</a>
|
||||
)}
|
||||
<div>
|
||||
|
||||
@@ -18,27 +18,13 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { IdentityProvider, MembershipRole, UserPermissionRole } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { VerticalTabItemProps } from "@calcom/ui";
|
||||
import { Badge, Button, ErrorBoundary, Skeleton, useMeta, VerticalTabItem } from "@calcom/ui";
|
||||
import {
|
||||
ArrowLeft,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
CreditCard,
|
||||
Key,
|
||||
Loader,
|
||||
Lock,
|
||||
Menu,
|
||||
Plus,
|
||||
Terminal,
|
||||
User,
|
||||
Users,
|
||||
} from "@calcom/ui/components/icon";
|
||||
import { Badge, Button, ErrorBoundary, Icon, Skeleton, useMeta, VerticalTabItem } from "@calcom/ui";
|
||||
|
||||
const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "my_account",
|
||||
href: "/settings/my-account",
|
||||
icon: User,
|
||||
icon: "user",
|
||||
children: [
|
||||
{ name: "profile", href: "/settings/my-account/profile" },
|
||||
{ name: "general", href: "/settings/my-account/general" },
|
||||
@@ -52,7 +38,7 @@ const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "security",
|
||||
href: "/settings/security",
|
||||
icon: Key,
|
||||
icon: "key",
|
||||
children: [
|
||||
{ name: "password", href: "/settings/security/password" },
|
||||
{ name: "impersonation", href: "/settings/security/impersonation" },
|
||||
@@ -62,13 +48,13 @@ const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "billing",
|
||||
href: "/settings/billing",
|
||||
icon: CreditCard,
|
||||
icon: "credit-card",
|
||||
children: [{ name: "manage_billing", href: "/settings/billing" }],
|
||||
},
|
||||
{
|
||||
name: "developer",
|
||||
href: "/settings/developer",
|
||||
icon: Terminal,
|
||||
icon: "terminal",
|
||||
children: [
|
||||
//
|
||||
{ name: "webhooks", href: "/settings/developer/webhooks" },
|
||||
@@ -106,13 +92,13 @@ const tabs: VerticalTabItemProps[] = [
|
||||
{
|
||||
name: "teams",
|
||||
href: "/teams",
|
||||
icon: Users,
|
||||
icon: "users",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: "admin",
|
||||
href: "/settings/admin",
|
||||
icon: Lock,
|
||||
icon: "lock",
|
||||
children: [
|
||||
//
|
||||
{ name: "features", href: "/settings/admin/flags" },
|
||||
@@ -179,7 +165,10 @@ const BackButtonInSidebar = ({ name }: { name: string }) => {
|
||||
href="/"
|
||||
className="hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default text-emphasis group my-6 flex h-6 max-h-6 w-full flex-row items-center rounded-md px-3 py-2 text-sm font-medium leading-4"
|
||||
data-testid={`vertical-tab-${name}`}>
|
||||
<ArrowLeft className="h-4 w-4 stroke-[2px] ltr:mr-[10px] rtl:ml-[10px] rtl:rotate-180 md:mt-0" />
|
||||
<Icon
|
||||
name="arrow-left"
|
||||
className="h-4 w-4 stroke-[2px] ltr:mr-[10px] rtl:ml-[10px] rtl:rotate-180 md:mt-0"
|
||||
/>
|
||||
<Skeleton title={name} as="p" className="max-w-36 min-h-4 truncate" loadingClassName="ms-3">
|
||||
{name}
|
||||
</Skeleton>
|
||||
@@ -260,7 +249,7 @@ const SettingsSidebarContainer = ({
|
||||
tabsWithPermissions.splice(teamsIndex + 1, 0, {
|
||||
name: "other_teams",
|
||||
href: "/settings/organizations/teams/other",
|
||||
icon: Users,
|
||||
icon: "users",
|
||||
children: [],
|
||||
});
|
||||
}
|
||||
@@ -286,7 +275,10 @@ const SettingsSidebarContainer = ({
|
||||
<div className={`${!tab.children?.length ? "!mb-3" : ""}`}>
|
||||
<div className="[&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis text-default group flex h-9 w-full flex-row items-center rounded-md px-2 text-sm font-medium leading-none">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
<Icon
|
||||
name={tab.icon}
|
||||
className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0"
|
||||
/>
|
||||
)}
|
||||
{!tab.icon && tab?.avatar && (
|
||||
<img
|
||||
@@ -328,7 +320,10 @@ const SettingsSidebarContainer = ({
|
||||
<Link href={tab.href}>
|
||||
<div className="hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default text-default group flex h-9 w-full flex-row items-center rounded-md px-2 py-[10px] text-sm font-medium leading-none">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
<Icon
|
||||
name={tab.icon}
|
||||
className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0"
|
||||
/>
|
||||
)}
|
||||
<Skeleton
|
||||
title={tab.name}
|
||||
@@ -374,9 +369,9 @@ const SettingsSidebarContainer = ({
|
||||
}>
|
||||
<div className="me-3">
|
||||
{teamMenuState[index].teamMenuOpen ? (
|
||||
<ChevronDown className="h-4 w-4" />
|
||||
<Icon name="chevron-down" className="h-4 w-4" />
|
||||
) : (
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
<Icon name="chevron-right" className="h-4 w-4" />
|
||||
)}
|
||||
</div>
|
||||
{!team.parentId && (
|
||||
@@ -458,7 +453,7 @@ const SettingsSidebarContainer = ({
|
||||
name={t("add_a_team")}
|
||||
href={`${WEBAPP_URL}/settings/teams/new`}
|
||||
textClassNames="px-3 items-center mt-2 text-emphasis font-medium text-sm"
|
||||
icon={Plus}
|
||||
icon="plus"
|
||||
disableChevron
|
||||
/>
|
||||
)}
|
||||
@@ -472,7 +467,10 @@ const SettingsSidebarContainer = ({
|
||||
<Link href={tab.href}>
|
||||
<div className="hover:bg-subtle [&[aria-current='page']]:bg-emphasis [&[aria-current='page']]:text-emphasis group-hover:text-default text-default group flex h-9 w-full flex-row items-center rounded-md px-2 py-[10px] text-sm font-medium leading-none">
|
||||
{tab && tab.icon && (
|
||||
<tab.icon className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0" />
|
||||
<Icon
|
||||
name={tab.icon}
|
||||
className="h-[16px] w-[16px] stroke-[2px] ltr:mr-3 rtl:ml-3 md:mt-0"
|
||||
/>
|
||||
)}
|
||||
<Skeleton
|
||||
title={t("org_admin_other_teams")}
|
||||
@@ -518,9 +516,9 @@ const SettingsSidebarContainer = ({
|
||||
}>
|
||||
<div className="me-3">
|
||||
{otherTeamMenuState[index].teamMenuOpen ? (
|
||||
<ChevronDown className="h-4 w-4" />
|
||||
<Icon name="chevron-down" className="h-4 w-4" />
|
||||
) : (
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
<Icon name="chevron-right" className="h-4 w-4" />
|
||||
)}
|
||||
</div>
|
||||
{!otherTeam.parentId && (
|
||||
@@ -579,14 +577,14 @@ const MobileSettingsContainer = (props: { onSideContainerOpen?: () => void }) =>
|
||||
<>
|
||||
<nav className="bg-muted border-muted sticky top-0 z-20 flex w-full items-center justify-between border-b py-2 sm:relative lg:hidden">
|
||||
<div className="flex items-center space-x-3 ">
|
||||
<Button StartIcon={Menu} color="minimal" variant="icon" onClick={props.onSideContainerOpen}>
|
||||
<Button StartIcon="menu" color="minimal" variant="icon" onClick={props.onSideContainerOpen}>
|
||||
<span className="sr-only">{t("show_navigation")}</span>
|
||||
</Button>
|
||||
|
||||
<button
|
||||
className="hover:bg-emphasis flex items-center space-x-2 rounded-md px-3 py-1 rtl:space-x-reverse"
|
||||
onClick={() => router.back()}>
|
||||
<ArrowLeft className="text-default h-4 w-4" />
|
||||
<Icon name="arrow-left" className="text-default h-4 w-4" />
|
||||
<p className="text-emphasis font-semibold">{t("settings")}</p>
|
||||
</button>
|
||||
</div>
|
||||
@@ -644,7 +642,7 @@ export default function SettingsLayout({
|
||||
<div className="mx-auto max-w-full justify-center lg:max-w-4xl">
|
||||
<ShellHeader />
|
||||
<ErrorBoundary>
|
||||
<Suspense fallback={<Loader />}>{children}</Suspense>
|
||||
<Suspense fallback={<Icon name="loader" />}>{children}</Suspense>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</div>
|
||||
@@ -698,7 +696,7 @@ export function ShellHeader() {
|
||||
<div className="flex w-full items-center">
|
||||
{meta.backButton && (
|
||||
<a href="javascript:history.back()">
|
||||
<ArrowLeft className="mr-7" />
|
||||
<Icon name="arrow-left" className="mr-7" />
|
||||
</a>
|
||||
)}
|
||||
<div>
|
||||
|
||||
@@ -41,12 +41,12 @@ import classNames from "@calcom/lib/classNames";
|
||||
import {
|
||||
APP_NAME,
|
||||
DESKTOP_APP_LINK,
|
||||
ENABLE_PROFILE_SWITCHER,
|
||||
IS_VISUAL_REGRESSION_TESTING,
|
||||
JOIN_DISCORD,
|
||||
ROADMAP,
|
||||
WEBAPP_URL,
|
||||
IS_VISUAL_REGRESSION_TESTING,
|
||||
TOP_BANNER_HEIGHT,
|
||||
ENABLE_PROFILE_SWITCHER,
|
||||
WEBAPP_URL,
|
||||
} from "@calcom/lib/constants";
|
||||
import { useFormbricks } from "@calcom/lib/formbricks-client";
|
||||
import getBrandColours from "@calcom/lib/getBrandColours";
|
||||
@@ -58,7 +58,6 @@ import type { User } from "@calcom/prisma/client";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import useEmailVerifyCheck from "@calcom/trpc/react/hooks/useEmailVerifyCheck";
|
||||
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
|
||||
import type { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import {
|
||||
Avatar,
|
||||
Button,
|
||||
@@ -73,38 +72,14 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
ErrorBoundary,
|
||||
HeadSeo,
|
||||
Icon,
|
||||
Logo,
|
||||
showToast,
|
||||
SkeletonText,
|
||||
Tooltip,
|
||||
useCalcomTheme,
|
||||
type IconName,
|
||||
} from "@calcom/ui";
|
||||
import type { LucideIcon } from "@calcom/ui/components/icon";
|
||||
import {
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
BarChart,
|
||||
Calendar,
|
||||
ChevronDown,
|
||||
Clock,
|
||||
Copy,
|
||||
Download,
|
||||
ExternalLink,
|
||||
FileText,
|
||||
Grid,
|
||||
HelpCircle,
|
||||
Link as LinkIcon,
|
||||
LogOut,
|
||||
Map,
|
||||
Moon,
|
||||
MoreHorizontal,
|
||||
Settings,
|
||||
User as UserIcon,
|
||||
Users,
|
||||
Sparkles,
|
||||
Zap,
|
||||
Check,
|
||||
} from "@calcom/ui/components/icon";
|
||||
import { Discord } from "@calcom/ui/components/icon/Discord";
|
||||
|
||||
import { useOrgBranding } from "../ee/organizations/context/provider";
|
||||
@@ -481,7 +456,8 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
{user.name || "Nameless User"}
|
||||
</span>
|
||||
</span>
|
||||
<ChevronDown
|
||||
<Icon
|
||||
name="chevron-down"
|
||||
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 rtl:mr-4"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
@@ -506,9 +482,7 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem
|
||||
type="button"
|
||||
StartIcon={(props: { className?: string }) => (
|
||||
<UserIcon className={classNames("text-default", props.className)} aria-hidden="true" />
|
||||
)}
|
||||
CustomStartIcon={<Icon name="user" className="text-default h-4 w-4" aria-hidden="true" />}
|
||||
href="/settings/my-account/profile">
|
||||
{t("my_profile")}
|
||||
</DropdownItem>
|
||||
@@ -516,9 +490,9 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem
|
||||
type="button"
|
||||
StartIcon={(props: { className?: string }) => (
|
||||
<Settings className={classNames("text-default", props.className)} aria-hidden="true" />
|
||||
)}
|
||||
CustomStartIcon={
|
||||
<Icon name="settings" className="text-default h-4 w-4" aria-hidden="true" />
|
||||
}
|
||||
href="/settings/my-account/general">
|
||||
{t("my_settings")}
|
||||
</DropdownItem>
|
||||
@@ -526,9 +500,7 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem
|
||||
type="button"
|
||||
StartIcon={(props: { className?: string }) => (
|
||||
<Moon className={classNames("text-default", props.className)} aria-hidden="true" />
|
||||
)}
|
||||
CustomStartIcon={<Icon name="moon" className="text-default h-4 w-4" aria-hidden="true" />}
|
||||
href="/settings/my-account/out-of-office">
|
||||
{t("out_of_office")}
|
||||
</DropdownItem>
|
||||
@@ -536,7 +508,7 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem
|
||||
StartIcon={() => <Discord className="text-default h-4 w-4" />}
|
||||
CustomStartIcon={<Discord className="text-default h-4 w-4" />}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href={JOIN_DISCORD}>
|
||||
@@ -544,22 +516,21 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
</DropdownItem>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem StartIcon={Map} target="_blank" href={ROADMAP}>
|
||||
<DropdownItem StartIcon="map" target="_blank" href={ROADMAP}>
|
||||
{t("visit_roadmap")}
|
||||
</DropdownItem>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem
|
||||
type="button"
|
||||
StartIcon={(props: { className?: string }) => (
|
||||
<HelpCircle aria-hidden="true" {...props} />
|
||||
)}
|
||||
StartIcon="circle-help"
|
||||
aria-hidden="true"
|
||||
onClick={() => setHelpOpen(true)}>
|
||||
{t("help")}
|
||||
</DropdownItem>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem className="todesktop:hidden hidden lg:flex">
|
||||
<DropdownItem StartIcon={Download} target="_blank" rel="noreferrer" href={DESKTOP_APP_LINK}>
|
||||
<DropdownItem StartIcon="download" target="_blank" rel="noreferrer" href={DESKTOP_APP_LINK}>
|
||||
{t("download_desktop_app")}
|
||||
</DropdownItem>
|
||||
</DropdownMenuItem>
|
||||
@@ -569,7 +540,8 @@ function UserDropdown({ small }: UserDropdownProps) {
|
||||
<DropdownMenuItem>
|
||||
<DropdownItem
|
||||
type="button"
|
||||
StartIcon={(props: { className?: string }) => <LogOut aria-hidden="true" {...props} />}
|
||||
StartIcon="log-out"
|
||||
aria-hidden="true"
|
||||
onClick={() => signOut({ callbackUrl: "/auth/logout" })}>
|
||||
{t("sign_out")}
|
||||
</DropdownItem>
|
||||
@@ -589,7 +561,7 @@ export type NavigationItemType = {
|
||||
onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
|
||||
target?: HTMLAnchorElement["target"];
|
||||
badge?: React.ReactNode;
|
||||
icon?: SVGComponent | LucideIcon;
|
||||
icon?: IconName;
|
||||
child?: NavigationItemType[];
|
||||
pro?: true;
|
||||
onlyMobile?: boolean;
|
||||
@@ -612,31 +584,31 @@ const navigation: NavigationItemType[] = [
|
||||
{
|
||||
name: "event_types_page_title",
|
||||
href: "/event-types",
|
||||
icon: LinkIcon,
|
||||
icon: "link",
|
||||
},
|
||||
{
|
||||
name: "bookings",
|
||||
href: "/bookings/upcoming",
|
||||
icon: Calendar,
|
||||
icon: "calendar",
|
||||
badge: <UnconfirmedBookingBadge />,
|
||||
isCurrent: ({ pathname }) => pathname?.startsWith("/bookings") ?? false,
|
||||
},
|
||||
{
|
||||
name: "availability",
|
||||
href: "/availability",
|
||||
icon: Clock,
|
||||
icon: "clock",
|
||||
},
|
||||
{
|
||||
name: "teams",
|
||||
href: "/teams",
|
||||
icon: Users,
|
||||
icon: "users",
|
||||
onlyDesktop: true,
|
||||
badge: <TeamInviteBadge />,
|
||||
},
|
||||
{
|
||||
name: "apps",
|
||||
href: "/apps",
|
||||
icon: Grid,
|
||||
icon: "grid-3x3",
|
||||
isCurrent: ({ pathname: path, item }) => {
|
||||
// During Server rendering path is /v2/apps but on client it becomes /apps(weird..)
|
||||
return (path?.startsWith(item.href) ?? false) && !(path?.includes("routing-forms/") ?? false);
|
||||
@@ -666,23 +638,23 @@ const navigation: NavigationItemType[] = [
|
||||
{
|
||||
name: MORE_SEPARATOR_NAME,
|
||||
href: "/more",
|
||||
icon: MoreHorizontal,
|
||||
icon: "ellipsis",
|
||||
},
|
||||
{
|
||||
name: "Routing Forms",
|
||||
href: "/apps/routing-forms/forms",
|
||||
icon: FileText,
|
||||
icon: "file-text",
|
||||
isCurrent: ({ pathname }) => pathname?.startsWith("/apps/routing-forms/") ?? false,
|
||||
},
|
||||
{
|
||||
name: "workflows",
|
||||
href: "/workflows",
|
||||
icon: Zap,
|
||||
icon: "zap",
|
||||
},
|
||||
{
|
||||
name: "insights",
|
||||
href: "/insights",
|
||||
icon: BarChart,
|
||||
icon: "bar-chart",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -764,7 +736,8 @@ const NavigationItem: React.FC<{
|
||||
)}
|
||||
aria-current={current ? "page" : undefined}>
|
||||
{item.icon && (
|
||||
<item.icon
|
||||
<Icon
|
||||
name={item.icon}
|
||||
className="todesktop:!text-blue-500 mr-2 h-4 w-4 flex-shrink-0 rtl:ml-2 md:ltr:mx-auto lg:ltr:mr-2 [&[aria-current='page']]:text-inherit"
|
||||
aria-hidden="true"
|
||||
aria-current={current ? "page" : undefined}
|
||||
@@ -835,7 +808,8 @@ const MobileNavigationItem: React.FC<{
|
||||
aria-current={current ? "page" : undefined}>
|
||||
{item.badge && <div className="absolute right-1 top-1">{item.badge}</div>}
|
||||
{item.icon && (
|
||||
<item.icon
|
||||
<Icon
|
||||
name={item.icon}
|
||||
className="[&[aria-current='page']]:text-emphasis mx-auto mb-1 block h-5 w-5 flex-shrink-0 text-center text-inherit"
|
||||
aria-hidden="true"
|
||||
aria-current={current ? "page" : undefined}
|
||||
@@ -860,10 +834,12 @@ const MobileNavigationMoreItem: React.FC<{
|
||||
<li className="border-subtle border-b last:border-b-0" key={item.name}>
|
||||
<Link href={item.href} className="hover:bg-subtle flex items-center justify-between p-5 transition">
|
||||
<span className="text-default flex items-center font-semibold ">
|
||||
{item.icon && <item.icon className="h-5 w-5 flex-shrink-0 ltr:mr-3 rtl:ml-3" aria-hidden="true" />}
|
||||
{item.icon && (
|
||||
<Icon name={item.icon} className="h-5 w-5 flex-shrink-0 ltr:mr-3 rtl:ml-3" aria-hidden="true" />
|
||||
)}
|
||||
{isLocaleReady ? t(item.name) : <SkeletonText />}
|
||||
</span>
|
||||
<ArrowRight className="text-subtle h-5 w-5" />
|
||||
<Icon name="arrow-right" className="text-subtle h-5 w-5" />
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
@@ -902,7 +878,7 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
{
|
||||
name: "view_public_page",
|
||||
href: publicPageUrl,
|
||||
icon: ExternalLink,
|
||||
icon: "external-link",
|
||||
target: "__blank",
|
||||
},
|
||||
{
|
||||
@@ -913,12 +889,12 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
navigator.clipboard.writeText(publicPageUrl);
|
||||
showToast(t("link_copied"), "success");
|
||||
},
|
||||
icon: Copy,
|
||||
icon: "copy",
|
||||
},
|
||||
{
|
||||
name: "settings",
|
||||
href: user?.org ? `/settings/organizations/profile` : "/settings/my-account/profile",
|
||||
icon: Settings,
|
||||
icon: "settings",
|
||||
},
|
||||
];
|
||||
return (
|
||||
@@ -960,13 +936,19 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
color="minimal"
|
||||
onClick={() => window.history.back()}
|
||||
className="todesktop:block hover:text-emphasis text-subtle group hidden text-sm font-medium">
|
||||
<ArrowLeft className="group-hover:text-emphasis text-subtle h-4 w-4 flex-shrink-0" />
|
||||
<Icon
|
||||
name="arrow-left"
|
||||
className="group-hover:text-emphasis text-subtle h-4 w-4 flex-shrink-0"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
color="minimal"
|
||||
onClick={() => window.history.forward()}
|
||||
className="todesktop:block hover:text-emphasis text-subtle group hidden text-sm font-medium">
|
||||
<ArrowRight className="group-hover:text-emphasis text-subtle h-4 w-4 flex-shrink-0" />
|
||||
<Icon
|
||||
name="arrow-right"
|
||||
className="group-hover:text-emphasis text-subtle h-4 w-4 flex-shrink-0"
|
||||
/>
|
||||
</button>
|
||||
{!!orgBranding && (
|
||||
<div data-testid="user-dropdown-trigger" className="flex items-center">
|
||||
@@ -987,7 +969,7 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
|
||||
<div>
|
||||
<Tips />
|
||||
{bottomNavItems.map(({ icon: Icon, ...item }, index) => (
|
||||
{bottomNavItems.map((item, index) => (
|
||||
<Tooltip side="right" content={t(item.name)} className="lg:hidden" key={item.name}>
|
||||
<ButtonOrLink
|
||||
id={item.name}
|
||||
@@ -1002,8 +984,9 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
index === 0 && "mt-3"
|
||||
)}
|
||||
onClick={item.onClick}>
|
||||
{!!Icon && (
|
||||
{!!item.icon && (
|
||||
<Icon
|
||||
name={item.icon}
|
||||
className={classNames(
|
||||
"h-4 w-4 flex-shrink-0 [&[aria-current='page']]:text-inherit",
|
||||
"me-3 md:mx-auto lg:ltr:mr-2 lg:rtl:ml-2"
|
||||
@@ -1049,7 +1032,7 @@ export function ShellMain(props: LayoutProps) {
|
||||
onClick={() =>
|
||||
typeof props.backPath === "string" ? router.push(props.backPath as string) : router.back()
|
||||
}
|
||||
StartIcon={ArrowLeft}
|
||||
StartIcon="arrow-left"
|
||||
aria-label="Go Back"
|
||||
className="rounded-md ltr:mr-2 rtl:ml-2"
|
||||
/>
|
||||
@@ -1145,7 +1128,7 @@ function TopNav() {
|
||||
<button className="hover:bg-muted hover:text-subtle text-muted rounded-full p-1 focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2">
|
||||
<span className="sr-only">{t("settings")}</span>
|
||||
<Link href="/settings/my-account/profile">
|
||||
<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>
|
||||
</button>
|
||||
<UserDropdown small />
|
||||
@@ -1200,7 +1183,8 @@ function ProfileDropdown() {
|
||||
<span className="block w-20 overflow-hidden overflow-ellipsis whitespace-nowrap">
|
||||
{currentOption.label}
|
||||
</span>
|
||||
<ChevronDown
|
||||
<Icon
|
||||
name="chevron-down"
|
||||
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 rtl:mr-4"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
@@ -1240,7 +1224,9 @@ function ProfileDropdown() {
|
||||
<Avatar alt={option.label || ""} size="xsm" />
|
||||
<span className="ml-2">{option.label}</span>
|
||||
</span>
|
||||
{isSelected ? <Check className="ml-2 inline h-4 w-4" aria-hidden="true" /> : null}
|
||||
{isSelected ? (
|
||||
<Icon name="check" className="ml-2 inline h-4 w-4" aria-hidden="true" />
|
||||
) : null}
|
||||
</DropdownItem>
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
showToast,
|
||||
TimezoneSelect,
|
||||
} from "@calcom/ui";
|
||||
import { Plus } from "@calcom/ui/components/icon";
|
||||
|
||||
import type { SliderUser } from "./AvailabilitySliderTable";
|
||||
|
||||
@@ -72,7 +71,11 @@ const DateOverride = ({ workingHours, disabled }: { workingHours: WorkingHours[]
|
||||
excludedDates={excludedDates}
|
||||
onChange={(ranges) => ranges.forEach((range) => append({ ranges: [range] }))}
|
||||
Trigger={
|
||||
<Button color="secondary" StartIcon={Plus} data-testid="add-override" disabled={disabled}>
|
||||
<Button
|
||||
color="secondary"
|
||||
StartIcon="plus"
|
||||
data-testid="add-override"
|
||||
disabled={disabled}>
|
||||
{t("add_an_override")}
|
||||
</Button>
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { keepPreviousData } from "@tanstack/react-query";
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
||||
import { useMemo, useRef, useCallback, useEffect, useState } from "react";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";
|
||||
@@ -10,11 +9,10 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { MembershipRole } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc";
|
||||
import type { UserProfile } from "@calcom/types/UserProfile";
|
||||
import { Button, ButtonGroup, DataTable } from "@calcom/ui";
|
||||
import { UserAvatar } from "@calcom/ui";
|
||||
import { Button, ButtonGroup, DataTable, Icon, UserAvatar } from "@calcom/ui";
|
||||
|
||||
import { UpgradeTip } from "../../tips/UpgradeTip";
|
||||
import { TBContext, createTimezoneBuddyStore } from "../store";
|
||||
import { createTimezoneBuddyStore, TBContext } from "../store";
|
||||
import { AvailabilityEditSheet } from "./AvailabilityEditSheet";
|
||||
import { TimeDial } from "./TimeDial";
|
||||
|
||||
@@ -139,13 +137,13 @@ export function AvailabilitySliderTable(props: { userTimeFormat: number | null }
|
||||
<Button
|
||||
color="minimal"
|
||||
variant="icon"
|
||||
StartIcon={ChevronLeftIcon}
|
||||
StartIcon="chevron-left"
|
||||
onClick={() => setBrowsingDate(browsingDate.subtract(1, "day"))}
|
||||
/>
|
||||
<Button
|
||||
onClick={() => setBrowsingDate(browsingDate.add(1, "day"))}
|
||||
color="minimal"
|
||||
StartIcon={ChevronRightIcon}
|
||||
StartIcon="chevron-right"
|
||||
variant="icon"
|
||||
/>
|
||||
</ButtonGroup>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Button, ButtonGroup } from "@calcom/ui";
|
||||
import { Button, ButtonGroup, Icon } from "@calcom/ui";
|
||||
|
||||
import { useTroubleshooterStore } from "../store";
|
||||
|
||||
@@ -53,7 +52,7 @@ export function TroubleshooterHeader({ extraDays, isMobile }: { extraDays: numbe
|
||||
className="group rtl:ml-1 rtl:rotate-180"
|
||||
variant="icon"
|
||||
color="minimal"
|
||||
StartIcon={ChevronLeft}
|
||||
StartIcon="chevron-left"
|
||||
aria-label="Previous Day"
|
||||
onClick={() => addToSelectedDate(-extraDays)}
|
||||
/>
|
||||
@@ -61,7 +60,7 @@ export function TroubleshooterHeader({ extraDays, isMobile }: { extraDays: numbe
|
||||
className="group rtl:mr-1 rtl:rotate-180"
|
||||
variant="icon"
|
||||
color="minimal"
|
||||
StartIcon={ChevronRight}
|
||||
StartIcon="chevron-right"
|
||||
aria-label="Next Day"
|
||||
onClick={() => addToSelectedDate(extraDays)}
|
||||
/>
|
||||
|
||||
Loaded 100 of 294 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user