feat: upgrade tailwind v4 (#24598)

* chore: refactor config files to prevent migration tool errors

* refactor: upgrade with the tailwind migration tool

* chore: restore pre-commit command + mc

* refactor(wip): update dependencies and migrate to Tailwind CSS v4 (mainly web)

* chore: resolve Tailwind v4 migration conflicts from merging main

* chore: remove unused Tailwind packages from config and update dependencies for v4 migration

* chore: uncomment Tailwind CSS utility classes in globals.css

* fix: resolve token conflicts between calcom and coss ui

* fix: textarea scrollbar

* Fix CUI-16

* fix: added @tailwindcss/forms plugin and cleaned up CSS classes in various components to remove unnecessary dark mode styles

* fix: selects and inputs of different sizes

* fix: remove unnecessary leading-20 class from modal titles in various components

* fix: update Checkbox component styles to remove unnecessary border on checked state

* fix: clean up styles in RequiresConfirmationController, Checkbox, and Radio components to enhance consistency

* fix: update button and filter component styles to remove unnecessary rounded classes for consistency

* fix: calendar

* fix: update KBarSearch

* fix: refine styles in Empty and Checkbox components for improved consistency

* Fix focus state email input

* fix: update button hover and active states to use 'not-disabled' instead of 'enabled'

* fix: line-height issues

* fix: update class name for muted background in BookingListItem component

* fix: sidebar spacing

* chore: update class names to use new Tailwind CSS color utilities

* fix embed

* chore: upgrade Tailwind CSS to version 4.1.16 and update related dependencies

* Map css variables and add a playground test for heavy css customization

* suggestion for coss-ui

* refactor: update CSS variable usage and clean up styles

- Replace instances of `--cal-brand-color` with `--cal-brand` in embed-related HTML files.
- Remove the now-unnecessary `addAppCssVars` function from the embed core.
- Import theme tokens in the embed core styles for better consistency.
- Clean up whitespace and formatting in CSS files for improved readability.
- Add a comment in `tokens.css` regarding its usage in both embed and webapp contexts.

* Handle within tokens.css instead of fixing coss-ui

* Remove initial, not needed. Also, remove tailwind.config.js as tailwidn scans the html automaically

* fix: examples app breaking

* fix: modal not resizing correctly

* feat: upgrade atoms to tailwind v4

* fix: atoms build breaking

* fix: atoms build breaking

* chore: upgrate examples/base to tailwind 4

* chore: update globals.css

* fix: add missing scheduler css variables

* fix: PlatformAdditionalCalendarSelector

* chore: update global styles

* chore: update tailwindcss and postcss dependencies to stable versions

* chore: remove unneeded class

* fix: dialog and toast animation

* fix: replace flex-shrink-0 with shrink-0 for consistent styling in various components

* fix: dialog modal for Apple connect

* add margin in SaveFilterSegmentButton

* Fix radix button nested states

* add cursor pointer to buttons but keep dsabled state

* Fix commandK selectors and adds cursor pointer

* Fix teams filter

* fix - round checkboxes

* fix filter checkbox

* fix select indicator's margin

* command group font size

* style: fix badge and tooltip radius

* chore: remove unneeded files

* Delete PR_REVIEW_MANAGED_EVENT_REASSIGNMENT.md

* remove ui-playground leftover

* fix: add missing react phone input styles in atoms

* Delete managed-event-reassignment-flow-and-architecture.mermaid

* fix: inter font not loading

* Add theme to skeleton container so that it can support dark mode

* fix: create custom stack-y-* utilities post tw4 upgrade

* fix: typo

* fix: atoms stack class + remove unused css file

* fix default radius valiue

* fix space-y in embed

* fix skeleton background

* Hardcode radius values to match production

* fix border in embed

* add missing externalThemeClass

* feat: create a custom stack-y-* utility

* fix: add stack utility to atom global css

* fix: Skeleton loader class modalbox

* Add stack-y utility in embed

* fix: add missing stack utilities in atoms globals.css

* update yarn.lock

* add popover portla

* update

---------

Co-authored-by: Sean Brydon <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
Co-authored-by: Ryukemeister <[email protected]>
Co-authored-by: cal.com <[email protected]>
Co-authored-by: Eunjae Lee <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-11-25 17:32:28 -03:00
1 parent 625c260e40
commit d6546c3107
447 files changed
+14783 -28932

No files matched your search

+2 -2
View File
@@ -23,13 +23,13 @@
"devDependencies": {
"@calcom/eslint-config": "workspace:*",
"@playwright/test": "^1.45.3",
"@tailwindcss/postcss": "^4.0.0",
"@types/node": "^20.3.1",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"dotenv": "^17.2.1",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.9.0-beta"
}
}
@@ -1,6 +1,5 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
"@tailwindcss/postcss": {},
},
};
@@ -6,10 +6,10 @@ const poppins = Poppins({ subsets: ["latin"], weight: ["400", "800"] });
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function Navbar({ username }: { username?: string }) {
return (
<nav className="flex h-[75px] w-[100%] items-center justify-between bg-black px-14 py-3 text-white">
<div className={`flex h-[100%] items-center text-lg ${poppins.className}`}>
<nav className="flex h-[75px] w-full items-center justify-between bg-black px-14 py-3 text-white">
<div className={`flex h-full items-center text-lg ${poppins.className}`}>
<Link href="/">
<h1 className="bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] bg-clip-text text-2xl font-bold text-transparent">
<h1 className="bg-linear-to-r from-[#8A2387] via-[#E94057] to-[#F27121] bg-clip-text text-2xl font-bold text-transparent">
CalSync
</h1>
</Link>
@@ -109,16 +109,16 @@ export default function App({ Component, pageProps }: AppProps) {
<div>
<BookerEmbed
customClassNames={{
bookerContainer: "!bg-[#F5F2FE] [&_button:!rounded-full] border-subtle border",
bookerContainer: "bg-[#F5F2FE]! [&_button:!rounded-full] border-subtle border",
datePickerCustomClassNames: {
datePickerDatesActive: "!bg-[#D7CEF5]",
datePickerDatesActive: "bg-[#D7CEF5]!",
},
eventMetaCustomClassNames: {
eventMetaTitle: "text-[#7151DC]",
},
availableTimeSlotsCustomClassNames: {
availableTimeSlotsHeaderContainer: "!bg-[#F5F2FE]",
availableTimes: "!bg-[#D7CEF5]",
availableTimeSlotsHeaderContainer: "bg-[#F5F2FE]!",
availableTimes: "bg-[#D7CEF5]!",
},
}}
username={username}
@@ -1,6 +1,5 @@
import { Navbar } from "@/components/Navbar";
import { Inter } from "next/font/google";
// eslint-disable-next-line @calcom/eslint/deprecated-imports-next-router
import { useRouter } from "next/router";
import { useRef, useCallback } from "react";
@@ -56,7 +55,7 @@ export default function Availability(props: { calUsername: string; calEmail: str
id={router.query.scheduleId as string}
ref={availabilityRef}
enableOverrides={true}
customClassNames={{
/* customClassNames={{
subtitlesClassName: "text-red-500",
ctaClassName: "border p-4 rounded-md",
editableHeadingClassName: "underline font-semibold",
@@ -65,15 +64,15 @@ export default function Availability(props: { calUsername: string; calEmail: str
schedule: "bg-blue-50 border-2 border-blue-200 rounded-lg p-4",
scheduleDay: "bg-green-50 border border-green-300 rounded-md mb-2",
dayRanges: "bg-yellow-50 p-3 rounded border-l-4 border-yellow-400",
timeRangeField: "!text-2xl bg-red-50 border-2 border-red-300 rounded-xl px-4 py-2",
timeRangeField: "text-2xl! bg-red-50 border-2 border-red-300 rounded-xl px-4 py-2",
labelAndSwitchContainer: "bg-purple-50 border border-purple-200 rounded p-2",
scheduleContainer: "bg-gray-100 border-4 border-gray-400 rounded-2xl shadow-lg",
timePicker: {
container: "!bg-blue-900",
valueContainer: "!bg-pink-500",
value: "!bg-yellow-500",
input: "!bg-green-500",
dropdown: "!bg-cyan-500",
container: "bg-blue-900!",
valueContainer: "bg-pink-500!",
value: "bg-yellow-500!",
input: "bg-green-500!",
dropdown: "bg-cyan-500!",
},
},
dateOverrideClassNames: {
@@ -82,7 +81,7 @@ export default function Availability(props: { calUsername: string; calEmail: str
description: "text-white",
button: "text-black",
},
}}
}} */
onFormStateChange={handleFormStateChange}
onUpdateSuccess={() => {
console.log("Updated successfully");
@@ -113,20 +113,20 @@ export default function Bookings(props: { calUsername: string; calEmail: string
duration={eventTypeDuration}
confirmButtonDisabled={false}
customClassNames={{
bookerContainer: "!bg-[#F5F2FE] [&_button:!rounded-full] border-subtle border",
bookerContainer: "bg-[#F5F2FE]! [&_button:!rounded-full] border-subtle border",
datePickerCustomClassNames: {
datePickerDatesActive: "!bg-[#D7CEF5]",
datePickerDatesActive: "bg-[#D7CEF5]!",
},
eventMetaCustomClassNames: {
eventMetaTitle: "text-[#7151DC]",
},
availableTimeSlotsCustomClassNames: {
availableTimeSlotsHeaderContainer: "!bg-[#F5F2FE]",
availableTimes: "!bg-[#D7CEF5]",
availableTimeSlotsHeaderContainer: "bg-[#F5F2FE]!",
availableTimes: "bg-[#D7CEF5]!",
},
confirmStep: {
confirmButton: "!bg-purple-700",
backButton: "text-purple-700 hover:!bg-purple-700 hover:!text-white",
confirmButton: "bg-purple-700!",
backButton: "text-purple-700 hover:bg-purple-700! hover:text-white!",
},
}}
{...(isTeamEvent
@@ -122,7 +122,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
<div data-testid="event-type-settings-atom">
<EventTypeSettings
customClassNames={{
atomsWrapper: "!w-[50vw] !m-auto",
atomsWrapper: "w-[50vw]! m-auto!",
eventAdvancedTab: {
destinationCalendar: {
@@ -578,8 +578,8 @@ export default function Bookings(props: { calUsername: string; calEmail: string
container: "border border-purple-200 bg-purple-100 rounded-lg",
label: "text-purple-700",
description: "text-purple-500",
children: "space-y-4",
intervalLimitContainer: "space-y-2",
children: "stack-y-4",
intervalLimitContainer: "stack-y-2",
intervalLimitItem: {
addLimitButton: "text-purple-500 hover:bg-purple-200 rounded-md",
limitText: "border border-purple-300 rounded-md text-purple-900 bg-white",
@@ -600,13 +600,13 @@ export default function Bookings(props: { calUsername: string; calEmail: string
container: "border border-purple-200 bg-purple-100 rounded-lg",
label: "text-purple-700",
description: "text-purple-500",
children: "space-y-4",
children: "stack-y-4",
},
totalDurationLimit: {
container: "border border-purple-200 bg-purple-100 rounded-lg",
label: "text-purple-700",
description: "text-purple-500",
children: "space-y-4",
children: "stack-y-4",
intervalLimitItem: {
addLimitButton: "text-purple-500 hover:bg-purple-200 rounded-md",
limitText: "border border-purple-300 rounded-md text-purple-900 bg-white",
@@ -627,7 +627,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
container: "border border-purple-200 bg-purple-100 rounded-lg",
label: "text-purple-700",
description: "text-purple-500",
children: "space-y-4",
children: "stack-y-4",
rollingLimit: {
container: "flex items-center space-x-2",
textField: "border border-purple-300 rounded-md text-purple-900 bg-white",
@@ -652,7 +652,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
container: "border border-purple-200 bg-purple-100 rounded-lg",
label: "text-purple-700",
description: "text-purple-500",
children: "space-y-4",
children: "stack-y-4",
offsetInput: {
container: "flex items-center space-x-2",
label: "text-purple-700",
@@ -691,7 +691,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
addOn: "text-purple-500",
},
multipleDuration: {
container: "space-y-2",
container: "stack-y-2",
availableDurationsSelect: {
container: "mb-4",
label: "text-purple-700",
@@ -15,9 +15,9 @@ export default function Home(props: { calUsername: string; calEmail: string }) {
<main className={`flex min-h-screen flex-col ${inter.className} items-center justify-center`}>
<Navbar username={props.calUsername} />
<div
className={` h-[100vh] w-full items-center justify-center gap-y-3 font-mono lg:flex ${inter.className} gap-16 `}>
className={` h-screen w-full items-center justify-center gap-y-3 font-mono lg:flex ${inter.className} gap-16 `}>
<div className="ml-32">
<h1 className={`${poppins.className} w-[100%] pb-3 text-7xl font-bold`}>
<h1 className={`${poppins.className} w-full pb-3 text-7xl font-bold`}>
The all in one Scheduling marketplace
</h1>
<p className={`w-[70%] font-normal ${inter.className} pb-3 text-2xl`}>
@@ -26,22 +26,22 @@ export default function Home(props: { calUsername: string; calEmail: string }) {
<div data-testid="connect-atoms" className="flex flex-row gap-4">
<Connect.GoogleCalendar
redir="http://localhost:4321/calendars"
className="h-[40px] bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
className="h-[40px] bg-linear-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
/>
<Connect.OutlookCalendar
isMultiCalendar={true}
redir="http://localhost:4321/calendars"
className="h-[40px] bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
className="h-[40px] bg-linear-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
/>
<Connect.AppleCalendar
onSuccess={() => {
router.push(`/calendars`);
}}
isMultiCalendar={true}
className="h-[40px] bg-gradient-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
className="h-[40px] bg-linear-to-r from-[#8A2387] via-[#E94057] to-[#F27121] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
/>
<StripeConnect
className="h-[40px] bg-gradient-to-r from-[#E94057] via-[#E94057] to-[#E94057] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
className="h-[40px] bg-linear-to-r from-[#E94057] via-[#E94057] to-[#E94057] text-center text-base font-semibold text-transparent text-white hover:bg-orange-700"
errorRedir="http://localhost:4321/availability"
onCheckSuccess={() => {
console.log("stripe account connected successfully".toLocaleUpperCase());
@@ -1,6 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
:root {
--foreground-rgb: 0, 0, 0;
@@ -1,19 +0,0 @@
import type { Config } from "tailwindcss";
const config: Config = {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},
plugins: [],
};
export default config;