feat: v3 of UI components (#19136)

* ui playground

* add types to ui

* push avatar ignore ts and eslint errors

* feat: V3 UI avatar  (#18997)

* avatar playground

* add overflow-hidden back for loading indicator

* update lock

* feat: v3/badge  (#18999)

* badge intro

* fix text on small badge

* add dark mode warning

* feat: v3/button (#19014)

* TOC

* wip buttons

* shadows

* secondary

* semantic colours

* minimal buttons

* update disabled states

* checkbox

* dropdown v3

* load icons

* fix design sections

* fix icon gap

* fix

* remove client component from rsc

* use peer as avatar

* gif

* fix button gap - dropdown iocn

* support start icon in dropdowns

* add alert demo + v3 component + darken semantic text

* base inputs and text field

* wip input

* input field addon/suffix

* toast page

* wip select

* match designs for input and select rounded

* fix

* fix select isloading transform

* fix multi icons transition rotation

* fix group heading

* range slider demo + range slider

* range slider popover design

* v3 dialog

* fix slider thumb size

* wrap in suspense for useSearchParam difference in next14+

* base of tabs + horizontal tabs

* fix select sizing to match input 36px

* fix dark mode hover on button

* target domState class for light/dark so we work on portal elements

* fix default bg on popover

* lightmode toasts + eleveation token

* empty screen

* intro to split button concept

* mass colour updates

* intro to themes

* remove i18n from label with name

* bouncy buttons

* feat: small select

* nav item dumb component

* full demo

* settings demo

* fix tabs

* fix mt

* fix dropdown feedback from loom

* alert fixes mentioned in loom

* push font-cal

* move to fumadocs

* fix avatar

* colors table

* add typeography

* icon + spacing guide

* add border radius and shadow tables

* fix colours and border radius

* remove prose undline via fumas fork

* fix icon buttons sizes

* button group component

* fix horizontal tabs

* tab fixes

* switches

* pagination component

* show toasts components raw

* sync with airtable

* add use client

* 10px on input again

* 10px in select also

* fix input height

* fix files merge

* fix loading state for icon buttons

* fix button fab

* Enable addon to now overflow to next line in DS

* use cal font for dialog text

* add avatar square variant

* fix select padding and menu size

* fix type errors

* fix type errors

* add switch small size and fix type errors

* fix ref types on input

* update web styles

* remove addonFilled to fix type errors

* push dialog fixes

* fix checkbox display

* remove prose from alert examples

* remove prose from all our component examples

* badge rounded-lg on lg size

* update colors

* force w/h on icon buttons instead of inheriting

* remove border-focus

* remove border-focus from tailwind config

* update tokens to match new colours

* add new border subtle tokens and add to toasts

* fix lg button padding

* fix and drastically improve rtl rests

* multi select use badges

* use badge design for select pills

* fix avatar alignment

* fix tests and remove redudant ones

* fix tests and remove redudant ones

* update atoms globals css

* extract tokens.css

* extract app.css

* force flex for atoms

* add @calcom/ui/css

* revert ui playground styles abstraction

* fix input focus states

* fix focus states for buttons

* feat: v3/app work (#19233)

* globals.css for app + event types listing search

* few app wide NITS

* fix select foucs within styling

* fix formbuilder switch styles

* fix disabled state of nested inputs

* workflow fixes

* webhook form fixes

* i18n on tabs info

* booking filters + tab

* fix filters spacing

* make first item so we get correct border radius if not default

* round radio group in create event types + make button small

* profile page

* update editor br

* button nits in existing places in the app

* fix timezone select and multilist in guest form

* fix text area on public booking page

* size small event types create

* margin on routing filter

* filters improvments

* routing insights fixes

* fix date filter range

* ooo fixes

* fix teams/members bulk actions

* create team UI

* i18n in useTabs instead of in tab component now

* Add event type setup border to availability

* fix bulk actions on org members table

* onboarding fixes

* fix input types with ref stripe comparision

* i18n fixes for platform

* update globals of atoms

* fix form builder firstname/lastname switch + correct footer useage

* fix select

* Revert "add @calcom/ui/css"

This reverts commit 0dd8f9012907a278cfede4a98f289cb0744c9244.

* revert tokens css

* Revert "extract app.css"

This reverts commit 10b998604816ad3310c24b36a02a638dabc5be24.

* linear nits

* workflow dropdown

* fix page theme heading sizes to match cards

* fix stepper for team creation

* adjust margin to FilterSearchField

* fix ooo icon

* fix booker and dark mode due to darkgray 50

* more dark mode fixes

* add size prop

---------

Co-authored-by: Eunjae Lee <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>

* remove ui-playground

* fix grow missing from merge

* add search icon data-test-id back to search

* fix FormAction style

* fix datatestid for apps and tabs

* change selector for team invitation e2e

* fix use data-testid from item instaed of using names

* rename upper case O

* fix unit tests data-testid

* fix unit tests data-testid

* more data-testid changes

* add data-testid to apps tab

* data-testid to installed appPage

* fix embed tests

* fix filter-popover-trigger

* use text-error and use dataId for locator

* more e2e improvment

* pass in single testId as button is now duplicate

* show field-error instead

* add test to eventtype tabs

* Add css vars to embed too\

* add scrollbar and change dialog overlay colour

* fix type

* use attribute instead of class for tab detection

* await promise

* use new tokens for sprite generation

* add correct testing Ids to e2e instead of button:text

* use testIds for creation of orgs

* Webhook receiver wait for 10 seconds

---------

Co-authored-by: Eunjae Lee <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>
Co-authored-by: Hariom <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-02-14 16:31:21 -05:00
1 parent 0f67faeef3
commit 5d709cf63c
145 files changed
+17438 -10708

No files matched your search

@@ -214,7 +214,8 @@ export const EventMeta = ({
menuPosition="absolute"
timezoneSelectCustomClassname={classNames?.eventMetaTimezoneSelect}
classNames={{
control: () => "!min-h-0 p-0 w-full border-0 bg-transparent focus-within:ring-0",
control: () =>
"!min-h-0 p-0 w-full border-0 bg-transparent focus-within:ring-0 shadow-none!",
menu: () => "!w-64 max-w-[90vw] mb-1 ",
singleValue: () => "text-text py-1",
indicatorsContainer: () => "ml-auto",
@@ -2,7 +2,7 @@ import type { Dispatch, SetStateAction } from "react";
import { useFilterQuery } from "@calcom/features/bookings/lib/useFilterQuery";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Badge, Button, Icon, Tooltip } from "@calcom/ui";
import { Badge, Button, Tooltip } from "@calcom/ui";
export interface FilterToggleProps {
setIsFiltersVisible: Dispatch<SetStateAction<boolean>>;
@@ -19,8 +19,7 @@ export function FilterToggle({ setIsFiltersVisible }: FilterToggleProps) {
}
return (
<Button color="secondary" onClick={toggleFiltersVisibility} className="mb-4">
<Icon name="filter" className="h-4 w-4" />
<Button color="secondary" onClick={toggleFiltersVisibility} className="mb-4" StartIcon="filter">
<Tooltip content={t("filters")}>
<div className="mx-2">{t("filters")}</div>
</Tooltip>
@@ -28,7 +28,7 @@ export function FiltersContainer({ isFiltersVisible }: FiltersContainerProps) {
return (
<div ref={animationParentRef}>
{isFiltersVisible ? (
<div className="no-scrollbar flex w-full space-x-2 overflow-x-scroll rtl:space-x-reverse">
<div className="no-scrollbar mb-2 flex w-full space-x-2 overflow-x-scroll rtl:space-x-reverse">
<PeopleFilter />
<EventTypeFilter />
<TeamsFilter />
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
import { classNames } from "@calcom/lib";
import { Button, Icon } from "@calcom/ui";
import type { IconName } from "@calcom/ui";
import type { IconName, ButtonProps } from "@calcom/ui";
export type ActionItem<TData> =
| {
@@ -26,12 +26,12 @@ type ResponsiveButtonProps = {
icon: IconName;
onClick?: () => void;
children: string;
};
} & ButtonProps;
const ResponsiveButton = forwardRef<HTMLButtonElement, ResponsiveButtonProps>(
({ className, icon, onClick, children }, ref) => {
({ icon, onClick, children, ...rest }, ref) => {
return (
<Button ref={ref} onClick={onClick} title={children}>
<Button ref={ref} onClick={onClick} title={children} {...rest}>
<Icon name={icon} size={18} className="sm:hidden" />
<Icon name={icon} size={16} className="mr-2 hidden shrink-0 sm:inline" />
<span className="sr-only shrink-0 md:not-sr-only">{children}</span>
@@ -51,7 +51,7 @@ const Root = forwardRef<
<div
ref={ref}
className={classNames(
"bg-brand-default text-brand fixed bottom-0 left-0 z-40 flex w-full items-center space-x-1 overflow-x-auto px-2 py-2 sm:space-x-2 md:bottom-4 md:left-1/2 md:z-auto md:w-fit md:-translate-x-1/2 md:transform md:space-x-3 md:overflow-x-hidden md:rounded-lg md:px-4",
"bg-default text-emphasis shadow-outline-gray-rested fixed bottom-0 left-0 z-40 flex w-full items-center space-x-1 overflow-x-auto border px-2 py-2 sm:space-x-2 md:bottom-4 md:left-1/2 md:z-auto md:w-fit md:-translate-x-1/2 md:transform md:space-x-3 md:overflow-x-hidden md:rounded-lg md:px-4",
className
)}
style={{ ...style }}
@@ -47,8 +47,12 @@ function AddFilterButtonComponent<TData>(
<div className="flex items-center space-x-2">
<Popover>
<PopoverTrigger asChild>
<Button ref={ref} color="secondary" data-testid="add-filter-button">
<Icon name="sliders-horizontal" className="mr-2 h-4 w-4" />
<Button
ref={ref}
color="secondary"
data-testid="add-filter-button"
StartIcon="sliders-horizontal"
className="h-full">
{t("filter")}
</Button>
</PopoverTrigger>
@@ -1,6 +1,6 @@
import { useDataTable } from "@calcom/features/data-table";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Icon, Button, Tooltip } from "@calcom/ui";
import { Button, Tooltip } from "@calcom/ui";
export const ClearFiltersButton = ({ exclude }: { exclude?: string[] }) => {
const { t } = useLocale();
@@ -13,14 +13,13 @@ export const ClearFiltersButton = ({ exclude }: { exclude?: string[] }) => {
return (
<Tooltip content={t("clear_filters")}>
<Button
color="minimal"
data-testid="clear-filters-button"
variant="icon"
color="secondary"
target="_blank"
rel="noreferrer"
className="min-w-24 h-[38px] border-0"
className="min-w-24"
StartIcon="x"
onClick={() => clearAll(exclude)}>
<Icon name="x" className="mr-1 h-4 w-4" />
{t("clear")}
</Button>
</Tooltip>
@@ -147,7 +147,7 @@ export const DateRangeFilter = ({ column }: DateRangeFilterProps) => {
return (
<Popover>
<PopoverTrigger asChild>
<Button color="secondary" className="items-center capitalize">
<Button color="secondary" className="items-center capitalize" EndIcon="chevron-down">
{!isCustomPreset && <span>{t(selectedPreset.labelKey, selectedPreset.i18nOptions)}</span>}
{isCustomPreset &&
(endDate ? (
@@ -157,7 +157,6 @@ export const DateRangeFilter = ({ column }: DateRangeFilterProps) => {
) : (
<span>{format(startDate.toDate(), "LLL dd, y")} - End</span>
))}
<Icon name="chevron-down" className="ml-2 h-4 w-4" />
</Button>
</PopoverTrigger>
<PopoverContent className="flex w-fit p-0" align="end">
@@ -2,7 +2,7 @@
import startCase from "lodash/startCase";
import type { IconName } from "@calcom/ui";
import { Button, Icon, Popover, PopoverContent, PopoverTrigger, Badge } from "@calcom/ui";
import { Button, Popover, PopoverContent, PopoverTrigger, Badge } from "@calcom/ui";
import { useFilterValue } from "../../hooks";
import { type FilterableColumn, type FilterValue, ZFilterValue, ColumnFilterType } from "../../lib/types";
@@ -137,11 +137,11 @@ export function FilterPopover({ column }: FilterPopoverProps) {
<Button
color="secondary"
className="items-center"
StartIcon={icon}
EndIcon="chevron-down"
data-testid={`filter-popover-trigger-${column.id}`}>
<Icon name={icon} className="mr-2 h-4 w-4" />
<span>{startCase(column.title)}</span>
<AppliedFilterValue column={column} filterValue={filterValue} />
<Icon name="chevron-down" className="ml-2 h-4 w-4" />
</Button>
</PopoverTrigger>
<PopoverContent className="p-0" align="start">
@@ -31,7 +31,7 @@ export const LockedSwitch = (
setUnlockedFields(fieldName, !enabled || undefined);
}}
checked={fieldState[fieldName]}
small={!options.simple}
size="sm"
/>
) : null;
};
@@ -58,7 +58,7 @@ export const LockedIndicator = (
<Badge
variant={isLocked ? "gray" : "green"}
className={classNames(
"ml-2 transform justify-between gap-1.5 p-1",
"ml-2 transform justify-between p-1",
isManagedEventType && !options.simple && "w-28"
)}>
{!options.simple && (
@@ -78,7 +78,7 @@ export const LockedIndicator = (
setUnlockedFields(fieldName, !enabled || undefined);
}}
checked={isLocked}
small={!options.simple}
size="sm"
/>
)}
</Badge>
@@ -236,7 +236,8 @@ const AddNewTeamsFormChild = ({
disabled={createTeamsMutation.isPending}
onClick={handleCounterIncrease}
aria-label={t("add_a_team")}
className="my-1">
className="my-1"
data-testId="add_a_team">
{t("add_a_team")}
</Button>
)}
@@ -120,7 +120,6 @@ export const CreateANewTeamForm = (props: CreateANewTeamFormProps) => {
rules={{ required: t("team_url_required") }}
render={({ field: { value } }) => (
<TextField
className="mt-2"
name="slug"
placeholder="acme"
label={t("team_url")}
@@ -31,7 +31,9 @@ export default function DeleteBulkTeamMembers({ users, onRemove, isOrg, teamId }
return (
<Dialog>
<DialogTrigger asChild>
<DataTableSelectionBar.Button icon="ban">{t("Delete")}</DataTableSelectionBar.Button>
<DataTableSelectionBar.Button icon="ban" color="destructive">
{t("Delete")}
</DataTableSelectionBar.Button>
</DialogTrigger>
<ConfirmationDialogContent
variety="danger"
@@ -94,7 +94,9 @@ export function EventTypesList({ table, teamId }: Props) {
<>
<Popover>
<PopoverTrigger asChild>
<DataTableSelectionBar.Button icon="link">{t("add_to_event_type")}</DataTableSelectionBar.Button>
<DataTableSelectionBar.Button icon="link" color="secondary">
{t("add_to_event_type")}
</DataTableSelectionBar.Button>
</PopoverTrigger>
<PopoverContent className="w-[200px] p-0 shadow-md" align="start" sideOffset={12}>
<Command>
@@ -433,8 +433,8 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
}
}}
className={classNames("gap-2", props.token && "opacity-50")}
StartIcon="link"
data-testid="copy-invite-link-button">
<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>
@@ -674,7 +674,6 @@ function MemberListContent(props: Props) {
type="button"
color="primary"
StartIcon="plus"
className="rounded-md"
onClick={() => props.setShowMemberInvitationModal(true)}
data-testid="new-member-button">
{t("add")}
@@ -698,6 +697,7 @@ function MemberListContent(props: Props) {
</p>
{numberOfSelectedRows >= 2 && (
<DataTableSelectionBar.Button
color="secondary"
onClick={() => setDynamicLinkVisible(!dynamicLinkVisible)}
icon="handshake">
{t("group_meeting")}
@@ -91,8 +91,8 @@ const ProfileView = ({ team }: ProfileViewProps) => {
}}>
<div className="border-subtle mt-6 flex items-center rounded-t-xl border p-6 text-sm">
<div>
<p className="font-semibold">{t("theme")}</p>
<p className="text-default">{t("theme_applies_note")}</p>
<p className="mt-0.5 text-base font-semibold leading-none">{t("theme")}</p>
<p className="text-default text-sm leading-normal">{t("theme_applies_note")}</p>
</div>
</div>
<div className="border-subtle flex flex-col justify-between border-x px-6 py-8 sm:flex-row">
@@ -1,11 +1,8 @@
"use client";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { TeamsListing } from "../components";
const TeamListingView = () => {
const { t } = useLocale();
return <TeamsListing />;
};
@@ -64,7 +64,7 @@ export const TimeTimeUnitInput = (props: Props) => {
label=""
disabled={props.disabled}
defaultValue={form.getValues("time") ?? props.defaultTime ?? 24}
className="-mt-2 rounded-r-none text-sm focus:ring-0"
className="rounded-r-none text-sm focus:ring-0"
{...form.register("time", { valueAsNumber: true })}
addOnSuffix={
<TimeUnitAddonSuffix
@@ -239,7 +239,7 @@ export default function WorkflowListPage({ workflows }: Props) {
workflow?.team.logo,
workflow.team?.name as string
)}
size="xxs"
size="xs"
className="mt-[3px] inline-flex justify-center"
/>
<div>{workflow.team.name}</div>
@@ -917,7 +917,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
emailSubjectFormRef?.(e);
refEmailSubject.current = e;
}}
rows={1}
rows={2}
disabled={props.readOnly || !hasActiveTeamPlan}
className="my-0 focus:ring-transparent"
required
@@ -21,6 +21,7 @@ export const tabs = [
href: "embedTabName=embed-code",
icon: "code" as const,
type: "code",
"data-testid": "HTML",
Component: forwardRef<
HTMLTextAreaElement | HTMLIFrameElement | null,
{ embedType: EmbedType; calLink: string; previewState: PreviewState; namespace: string }
@@ -75,6 +76,7 @@ export const tabs = [
{
name: "React",
href: "embedTabName=embed-react",
"data-testid": "react",
icon: "code" as const,
type: "code",
Component: forwardRef<
@@ -126,6 +128,7 @@ export const tabs = [
href: "embedTabName=embed-preview",
icon: "trello" as const,
type: "iframe",
"data-testid": "Preview",
Component: forwardRef<
HTMLIFrameElement | HTMLTextAreaElement | null,
{ calLink: string; embedType: EmbedType; previewState: PreviewState; namespace: string }
@@ -2,20 +2,20 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
const SkeletonEventType = () => {
return (
<div className="dark:bg-darkgray-100 bg-default h-24 w-full">
<div className="bg-default h-24 w-full">
<div className="p-5">
<div className="flex space-x-2 rtl:space-x-reverse">
<div className="dark:bg-darkgray-400 h-2 w-1/6 rounded-md bg-neutral-200" />
<div className="dark:bg-darkgray-400 h-2 w-1/6 rounded-md bg-neutral-200" />
<div className="bg-subtle h-2 w-1/6 rounded-md" />
<div className="bg-subtle h-2 w-1/6 rounded-md" />
</div>
<div className="flex space-x-2 py-2 rtl:space-x-reverse">
<div className="dark:bg-darkgray-400 h-2 w-1/12 rounded-md bg-neutral-200" />
<div className="dark:bg-darkgray-400 h-2 w-1/6 rounded-md bg-neutral-200" />
<div className="dark:bg-darkgray-400 h-2 w-1/12 rounded-md bg-neutral-200" />
<div className="bg-subtle h-2 w-1/12 rounded-md" />
<div className="bg-subtle h-2 w-1/6 rounded-md" />
<div className="bg-subtle h-2 w-1/12 rounded-md" />
</div>
<div className="flex space-x-2 py-1 rtl:space-x-reverse">
<div className="dark:bg-darkgray-200 h-6 w-1/6 rounded-md bg-neutral-300" />
<div className="dark:bg-darkgray-200 h-6 w-1/6 rounded-md bg-neutral-300" />
<div className="bg-subtle h-6 w-1/6 rounded-md" />
<div className="bg-subtle h-6 w-1/6 rounded-md" />
</div>
</div>
</div>
@@ -26,7 +26,7 @@ function EmptyPage({ name }: { name: string }) {
const { t } = useLocale();
return (
<div className="relative text-center">
<div className="dark:divide-darkgray-100 flex flex-col divide-y-2 blur-[3px]">
<div className="flex flex-col divide-y-2 blur-[3px]">
<SkeletonEventType />
<SkeletonEventType />
<SkeletonEventType />
@@ -55,7 +55,6 @@ export const MultiplePrivateLinksController = ({
color="minimal"
size="sm"
type="button"
className="hover:stroke-3 hover:text-emphasis min-w-fit !py-0 px-0 hover:bg-transparent"
aria-label="copy link"
onClick={() => {
navigator.clipboard.writeText(singleUseURL);
@@ -184,7 +184,7 @@ export default function RequiresConfirmationController({
);
}}
className={classNames(
"border-default !m-0 block w-16 rounded-r-none border-r-0 text-sm [appearance:textfield] focus:z-10 focus:border-r",
"border-default h-8! !m-0 block w-16 rounded-r-none border-r-0 text-sm [appearance:textfield] focus:z-10 focus:border-r",
customClassNames?.conditionalConfirmationRadio?.timeInput
)}
defaultValue={metadata?.requiresConfirmationThreshold?.time || 30}
@@ -92,7 +92,7 @@ export const EventAppsTab = ({ eventType }: { eventType: EventType }) => {
<div className="before:border-0">
{(isManagedEventType || isChildrenManagedEventType) && (
<Alert
severity={appsDisableProps.isLocked ? "neutral" : "green"}
severity={appsDisableProps.isLocked ? "neutral" : "info"}
className="mb-2"
title={
<Trans i18nKey={`${lockedText}_${isManagedEventType ? "for_members" : "by_team_admins"}`}>
@@ -576,7 +576,7 @@ const UseCommonScheduleSettingsToggle = ({
const { t } = useLocale();
const { useHostSchedulesForTeamEvent, toggleScheduleState } = useCommonScheduleState(eventType.schedule);
return (
<>
<div className="border-subtle space-y-6 rounded-lg border p-6">
<SettingsToggle
checked={!useHostSchedulesForTeamEvent}
onCheckedChange={toggleScheduleState}
@@ -598,7 +598,7 @@ const UseCommonScheduleSettingsToggle = ({
/>
</div>
)}
</>
</div>
);
};
@@ -327,7 +327,7 @@ const MinimumBookingNoticeInput = React.forwardRef<
label={t("minimum_booking_notice")}
type="number"
placeholder="0"
className={classNames("mb-0 h-9 rounded-[4px] ltr:mr-2 rtl:ml-2", customClassNames?.input)}
className={classNames("mb-0 h-9 ltr:mr-2 rtl:ml-2", customClassNames?.input)}
min={0}
/>
<input type="hidden" ref={ref} {...passThroughProps} />
@@ -115,7 +115,7 @@ export const EventWebhooksTab = ({ eventType }: Pick<EventTypeSetupProps, "event
<>
{(isManagedEventType || isChildrenManagedEventType) && (
<Alert
severity={webhooksDisableProps.isLocked ? "neutral" : "green"}
severity={webhooksDisableProps.isLocked ? "neutral" : "info"}
className="mb-2"
title={
<Trans
@@ -132,9 +132,8 @@ const WorkflowListItem = (props: ItemProps) => {
{!workflow.readOnly && (
<div className="flex-none">
<Link href={`/workflows/${workflow.id}`} passHref={true} target="_blank">
<Button type="button" color="minimal" className="mr-4">
<Button type="button" color="minimal" className="mr-4" EndIcon="external-link">
<div className="hidden ltr:mr-2 rtl:ml-2 sm:block">{t("edit")}</div>
<Icon name="external-link" className="text-default -mt-[2px] h-4 w-4 stroke-2" />
</Button>
</Link>
</div>
@@ -244,7 +243,7 @@ function EventWorkflowsTab(props: Props) {
<>
{(isManagedEventType || isChildrenManagedEventType) && (
<Alert
severity={workflowsDisableProps.isLocked ? "neutral" : "green"}
severity={workflowsDisableProps.isLocked ? "neutral" : "info"}
className="mb-2"
title={
<Trans i18nKey={`${lockedText}_${isManagedEventType ? "for_members" : "by_team_admins"}`}>
@@ -236,8 +236,6 @@ export const Components: Record<FieldType, Component> = {
const placeholder = props.placeholder;
const { t } = useLocale();
value = value || [];
const inputClassName =
"dark:placeholder:text-muted focus:border-emphasis border-subtle block w-full rounded-md border-default text-sm focus:ring-black disabled:bg-emphasis disabled:hover:cursor-not-allowed dark:selection:bg-green-500 disabled:dark:text-subtle bg-default";
return (
<>
{value.length ? (
@@ -252,7 +250,6 @@ export const Components: Record<FieldType, Component> = {
id={`${props.name}.${index}`}
disabled={readOnly}
value={value[index]}
className={inputClassName}
onChange={(e) => {
value[index] = e.target.value.toLowerCase();
setValue(value);
@@ -353,7 +350,7 @@ export const Components: Record<FieldType, Component> = {
}
setValue(newValue);
}}
className="border-default dark:border-default hover:bg-subtle checked:hover:bg-brand-default checked:bg-brand-default dark:checked:bg-brand-default dark:bg-darkgray-100 dark:hover:bg-subtle dark:checked:hover:bg-brand-default h-4 w-4 cursor-pointer rounded transition ltr:mr-2 rtl:ml-2"
className="border-default dark:border-default hover:bg-subtle checked:hover:bg-brand-default checked:bg-brand-default dark:checked:bg-brand-default dark:hover:bg-subtle dark:checked:hover:bg-brand-default h-4 w-4 cursor-pointer rounded transition ltr:mr-2 rtl:ml-2"
value={option.value}
checked={value.includes(option.value)}
/>
@@ -248,7 +248,6 @@ export const FormBuilder = function FormBuilder({
onCheckedChange={(checked) => {
update(index, { ...field, hidden: !checked });
}}
classNames={{ container: "p-2 hover:bg-subtle rounded transition" }}
tooltip={t("show_on_booking_page")}
/>
)}
@@ -487,12 +486,9 @@ function FieldEditDialog({
return (
<Dialog open={dialog.isOpen} onOpenChange={onOpenChange} modal={false}>
<DialogContent
className="max-h-none p-0"
data-testid="edit-field-dialog"
forceOverlayWhenNoModal={true}>
<DialogContent className="max-h-none" data-testid="edit-field-dialog" forceOverlayWhenNoModal={true}>
<Form id="form-builder" form={fieldForm} handleSubmit={handleSubmit}>
<div className="h-auto max-h-[85vh] overflow-auto px-8 pb-7 pt-8">
<div className="h-auto max-h-[85vh] overflow-auto">
<DialogHeader title={t("add_a_booking_question")} subtitle={t("booking_questions_description")} />
<SelectField
defaultValue={fieldTypesConfigMap.text}
@@ -648,7 +644,7 @@ function FieldEditDialog({
})()}
</div>
<DialogFooter className="relative rounded px-8" showDivider>
<DialogFooter className="relative">
<DialogClose color="secondary">{t("cancel")}</DialogClose>
<Button data-testid="field-add-save" type="submit">
{isFieldEditMode ? t("save") : t("add")}
@@ -805,7 +801,7 @@ function VariantFields({
onCheckedChange={(checked) => {
fieldForm.setValue("variant", checked ? otherVariant : defaultVariant);
}}
classNames={{ container: "p-2 mt-2 sm:hover:bg-muted rounded transition" }}
classNames={{ container: "mt-2" }}
tooltip={t("Toggle Variant")}
/>
) : (
@@ -249,6 +249,7 @@ export const ComponentForField = ({
`Value ${value} is not valid for type ${componentConfig.propsType} for field ${field.name}`
);
}
if (componentConfig.propsType === "text") {
return (
<WithLabel field={field} htmlFor={field.name} readOnly={readOnly} noLabel={noLabel}>
@@ -44,7 +44,7 @@ const Download = () => {
EndIcon="file-down"
color="secondary"
{...(isPending && { loading: isPending })}
className="self-end sm:self-baseline">
className="h-full self-end sm:self-baseline">
{t("download")}
</Button>
</DropdownMenuTrigger>
@@ -73,7 +73,7 @@ export const OrgTeamsFilter = () => {
<Avatar
alt={`${placeholder} logo`}
imageSrc={getPlaceholderAvatar(imageUrl, placeholder)}
size="xsm"
size="xs"
className="mr-2"
/>
) : null;
@@ -43,8 +43,8 @@ export function ScheduleListItem({
return (
<li key={schedule.id}>
<div className="hover:bg-muted flex items-center justify-between py-5 transition ltr:pl-4 rtl:pr-4 sm:ltr:pl-0 sm:rtl:pr-0">
<div className="group flex w-full items-center justify-between sm:px-6">
<div className="hover:bg-muted flex items-center justify-between px-3 py-5 transition sm:px-4">
<div className="group flex w-full items-center justify-between ">
<Link
href={`/availability/${schedule.id}`}
className="flex-grow truncate text-sm"
@@ -87,7 +87,6 @@ export function ScheduleListItem({
<DropdownMenuTrigger asChild>
<Button
data-testid="schedule-more"
className="mx-5"
type="button"
variant="icon"
color="secondary"
@@ -96,8 +95,8 @@ export function ScheduleListItem({
</DropdownMenuTrigger>
{!isPending && data && (
<DropdownMenuContent>
<DropdownMenuItem className="min-w-40 focus:ring-muted">
{!schedule.isDefault && (
{!schedule.isDefault && (
<DropdownMenuItem className="min-w-40 focus:ring-muted">
<DropdownItem
type="button"
StartIcon="star"
@@ -109,8 +108,8 @@ export function ScheduleListItem({
}}>
{t("set_as_default")}
</DropdownItem>
)}
</DropdownMenuItem>
</DropdownMenuItem>
)}
<DropdownMenuItem className="outline-none">
<DropdownItem
type="button"
@@ -4,11 +4,18 @@ import { useSearchParams } from "next/navigation";
import { useState, useEffect } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Icon } from "@calcom/ui";
import type { ButtonProps } from "@calcom/ui";
import { Button } from "@calcom/ui";
import { CreateOrEditOutOfOfficeEntryModal } from "./CreateOrEditOutOfOfficeModal";
const CreateNewOutOfOfficeEntry = () => {
const CreateNewOutOfOfficeEntry = ({
size,
...rest
}: {
size?: ButtonProps["size"];
"data-testid"?: string;
}) => {
const { t } = useLocale();
const params = useSearchParams();
@@ -25,10 +32,12 @@ const CreateNewOutOfOfficeEntry = () => {
<>
<Button
color="primary"
size={size ?? "base"}
className="flex items-center justify-between px-4"
StartIcon="plus"
onClick={() => setOpenModal(true)}
data-testid="add_entry_ooo">
<Icon name="plus" size={16} /> {t("add")}
data-testid={rest["data-testid"]}>
{t("add")}
</Button>
{openModal && (
<CreateOrEditOutOfOfficeEntryModal
@@ -140,6 +140,7 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
}
}}>
<DialogContent
enableOverflow
onOpenAutoFocus={(event) => {
event.preventDefault();
}}>
@@ -245,7 +246,7 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
onChange={(e) => setSearchText(e.target.value)}
value={searchText}
/>
<div className="scroll-bar flex h-[150px] flex-col gap-0.5 overflow-y-scroll rounded-md border p-1">
<div className="scroll-bar bg-default mt-2 flex h-[150px] flex-col gap-0.5 overflow-y-scroll rounded-[10px] border p-1">
{memberListOptions.map((member) => (
<label
key={member.value}
@@ -20,6 +20,7 @@ import {
Tooltip,
} from "@calcom/ui";
import CreateNewOutOfOfficeEntryButton from "./CreateNewOutOfOfficeEntryButton";
import { CreateOrEditOutOfOfficeEntryModal } from "./CreateOrEditOutOfOfficeModal";
import type { BookingRedirectForm } from "./CreateOrEditOutOfOfficeModal";
@@ -53,6 +54,7 @@ export const OutOfOfficeEntriesList = () => {
className="mt-6"
headline={t("ooo_empty_title")}
description={t("ooo_empty_description")}
buttonRaw={<CreateNewOutOfOfficeEntryButton size="sm" />}
customIcon={
<div className="mt-4 h-[102px]">
<div className="flex h-full flex-col items-center justify-center p-2 md:mt-0 md:p-0">
@@ -63,7 +65,7 @@ export const OutOfOfficeEntriesList = () => {
<div className="dark:bg-darkgray-50 absolute -top-3 left-3 -z-10 h-[70px] w-[70px] rotate-[24deg] rounded-3xl border-2 border-[#e5e7eb] p-8 opacity-60 dark:opacity-90">
<div className="w-12" />
</div>
<div className="dark:bg-darkgray-50 relative z-0 flex h-[70px] w-[70px] items-center justify-center rounded-3xl border-2 border-[#e5e7eb] bg-white">
<div className="dark:bg-darkgray-50 text-inverted relative z-0 flex h-[70px] w-[70px] items-center justify-center rounded-3xl border-2 border-[#e5e7eb] bg-white">
<Icon name="clock" size={28} />
<div className="dark:bg-darkgray-50 absolute right-4 top-5 h-[12px] w-[12px] rotate-[56deg] bg-white text-lg font-bold" />
<span className="absolute right-4 top-3 font-sans text-sm font-extrabold">z</span>
@@ -121,7 +123,7 @@ export const OutOfOfficeEntriesList = () => {
<Button
className="self-center rounded-lg border"
type="button"
color="minimal"
color="secondary"
variant="icon"
data-testid={`ooo-edit-${item.toUser?.username || "n-a"}`}
StartIcon="pencil"
@@ -146,7 +148,7 @@ export const OutOfOfficeEntriesList = () => {
<Button
className="self-center rounded-lg border"
type="button"
color="minimal"
color="destructive"
variant="icon"
disabled={deleteOutOfOfficeEntryMutation.isPending}
StartIcon="trash-2"
@@ -39,7 +39,9 @@ export function DeleteBulkUsers({ users, onRemove }: Props) {
return (
<Dialog>
<DialogTrigger asChild>
<DataTableSelectionBar.Button icon="ban">{t("Delete")}</DataTableSelectionBar.Button>
<DataTableSelectionBar.Button icon="ban" color="destructive">
{t("Delete")}
</DataTableSelectionBar.Button>
</DialogTrigger>
<ConfirmationDialogContent
variety="danger"
@@ -35,11 +35,17 @@ export function DynamicLink<T extends { username: string | null }>({
<div className="items-center truncate p-2 md:max-w-[300px]">
<p className="text-center md:text-left">{domainWithoutHttps}</p>
</div>
<div className="ml-auto flex items-center justify-center md:justify-start">
<Button StartIcon="copy" size="sm" onClick={() => copyToClipboard(dynamicLinkOfSelectedUsers)}>
{!isCopied ? t("copy") : t("copied")}
<div className="ml-auto flex items-center justify-center gap-1 md:justify-start">
<Button
variant="icon"
StartIcon={isCopied ? "check" : "copy"}
size="sm"
onClick={() => copyToClipboard(dynamicLinkOfSelectedUsers)}
color="secondary">
<span className="sr-only">{!isCopied ? t("copy") : t("copied")}</span>
</Button>
<Button
color="secondary"
EndIcon="external-link"
size="sm"
href={dynamicLinkOfSelectedUsers}
@@ -98,7 +98,9 @@ export function EventTypesList({ table, orgTeams }: Props) {
<>
<Popover>
<PopoverTrigger asChild>
<DataTableSelectionBar.Button icon="link">{t("add_to_event_type")}</DataTableSelectionBar.Button>
<DataTableSelectionBar.Button icon="link" color="secondary">
{t("add_to_event_type")}
</DataTableSelectionBar.Button>
</PopoverTrigger>
<PopoverContent className="w-[200px] p-0 shadow-md" align="start" sideOffset={12}>
<Command>
@@ -332,7 +332,9 @@ function MassAssignAttributesBulkActionComponent({ table, filters }: Props) {
}
}}>
<PopoverTrigger asChild>
<DataTableSelectionBar.Button icon="tags">{t("add_attributes")}</DataTableSelectionBar.Button>
<DataTableSelectionBar.Button icon="tags" color="secondary">
{t("add_attributes")}
</DataTableSelectionBar.Button>
</PopoverTrigger>
{/* We dont really use shadows much - but its needed here */}
<PopoverContent className="p-0 shadow-md" align="start" sideOffset={12}>
@@ -87,7 +87,9 @@ export function TeamListBulkAction({ table }: Props) {
<>
<Popover>
<PopoverTrigger asChild>
<DataTableSelectionBar.Button icon="users">{t("add_to_team")}</DataTableSelectionBar.Button>
<DataTableSelectionBar.Button icon="users" color="secondary">
{t("add_to_team")}
</DataTableSelectionBar.Button>
</PopoverTrigger>
{/* We dont really use shadows much - but its needed here */}
<PopoverContent className="w-[200px] p-0 shadow-md" align="start" sideOffset={12}>
@@ -579,7 +579,6 @@ function UserListTableContent() {
type="button"
color="primary"
StartIcon="plus"
className="rounded-md"
onClick={() =>
dispatch({
type: "INVITE_MEMBER",
@@ -604,8 +603,12 @@ function UserListTableContent() {
</DataTableSelectionBar.Root>
)}
{numberOfSelectedRows > 0 && (
<DataTableSelectionBar.Root className="justify-center">
<p className="text-brand-subtle px-2 text-center text-xs leading-none sm:text-sm sm:font-medium">
<DataTableSelectionBar.Root
className="justify-center"
style={{
width: "max-content",
}}>
<p className="text-brand-subtle shrink-0 px-2 text-center text-xs leading-none sm:text-sm sm:font-medium">
{t("number_selected", { count: numberOfSelectedRows })}
</p>
{!isPlatformUser ? (
@@ -613,6 +616,7 @@ function UserListTableContent() {
<TeamListBulkAction table={table} />
{numberOfSelectedRows >= 2 && (
<DataTableSelectionBar.Button
color="secondary"
onClick={() => setDynamicLinkVisible(!dynamicLinkVisible)}
icon="handshake">
{t("group_meeting")}
@@ -146,7 +146,7 @@ const WebhookForm = (props: {
<Form
form={formMethods}
handleSubmit={(values) => props.onSubmit({ ...values, changeSecret, newSecret })}>
<div className="border-subtle border-x p-6">
<div className="border-subtle rounded-t-lg border p-6">
<Controller
name="subscriberUrl"
control={formMethods.control}
@@ -199,6 +199,7 @@ const WebhookForm = (props: {
<>{t("event_triggers")}</>
</Label>
<Select
grow
options={translatedTriggerOptions}
isMulti
value={selectValue}
@@ -353,7 +354,7 @@ const WebhookForm = (props: {
</Button>
</SectionBottomActions>
<div className="mt-6 rounded-md">
<div className="mb-4 mt-6 rounded-md">
<WebhookTestDisclosure />
</div>
</Form>