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

+1 -1
View File
@@ -175,7 +175,7 @@ export function ShellMain(props: LayoutProps) {
props.backPath
? "relative"
: "pwa:bottom-[max(7rem,_calc(5rem_+_env(safe-area-inset-bottom)))] fixed bottom-20 z-40 ltr:right-4 rtl:left-4 md:z-auto md:ltr:right-0 md:rtl:left-0",
"flex-shrink-0 [-webkit-app-region:no-drag] md:relative md:bottom-auto md:right-auto"
"shrink-0 [-webkit-app-region:no-drag] md:relative md:bottom-auto md:right-auto"
)}>
{isLocaleReady && props.CTA}
</div>
+5 -5
View File
@@ -75,7 +75,7 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
<aside
style={!isPlatformPages ? sidebarStylingAttributes : {}}
className={classNames(
"bg-muted border-muted fixed left-0 hidden h-full w-14 flex-col overflow-y-auto overflow-x-hidden border-r md:sticky md:flex lg:w-56 lg:px-3",
"bg-cal-muted border-muted fixed left-0 hidden h-full w-14 flex-col overflow-y-auto overflow-x-hidden border-r md:sticky md:flex lg:w-56 lg:px-3",
!isPlatformPages && "max-h-screen"
)}>
<div className="flex h-full flex-col justify-between py-3 lg:pt-4">
@@ -114,7 +114,7 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
className="todesktop:block hover:text-emphasis text-subtle group hidden text-sm font-medium">
<Icon
name="arrow-left"
className="group-hover:text-emphasis text-subtle h-4 w-4 flex-shrink-0"
className="group-hover:text-emphasis text-subtle h-4 w-4 shrink-0"
/>
</button>
<button
@@ -123,7 +123,7 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
className="todesktop:block hover:text-emphasis text-subtle group hidden text-sm font-medium">
<Icon
name="arrow-right"
className="group-hover:text-emphasis text-subtle h-4 w-4 flex-shrink-0"
className="group-hover:text-emphasis text-subtle h-4 w-4 shrink-0"
/>
</button>
{!!user?.org && (
@@ -165,8 +165,8 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
<Icon
name={item.isLoading ? "rotate-cw" : 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",
"h-4 w-4 shrink-0 aria-[aria-current='page']:text-inherit",
"ml-3 md:mx-auto lg:ltr:mr-2 lg:rtl:ml-2",
item.isLoading && "animate-spin"
)}
aria-hidden="true"
+3 -3
View File
@@ -22,15 +22,15 @@ function TopNav() {
<>
<nav
style={isEmbed ? { display: "none" } : {}}
className="bg-muted border-subtle sticky top-0 z-40 flex w-full items-center justify-between border-b bg-opacity-50 px-4 py-1.5 backdrop-blur-lg sm:p-4 md:hidden">
className="bg-cal-muted/50 border-subtle sticky top-0 z-40 flex w-full items-center justify-between border-b px-4 py-1.5 backdrop-blur-lg sm:p-4 md:hidden">
<Link href="/event-types">
<Logo />
</Link>
<div className="flex items-center gap-2 self-center">
<span className="hover:bg-muted hover:text-emphasis text-default group flex items-center rounded-full text-sm font-medium transition lg:hidden">
<span className="hover:bg-cal-muted hover:text-emphasis text-default group flex items-center rounded-full text-sm font-medium transition lg:hidden">
<KBarTrigger />
</span>
<button className="hover:bg-muted hover:text-subtle text-muted rounded-full p-1 transition focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2">
<button className="hover:bg-cal-muted hover:text-subtle text-muted rounded-full p-1 transition 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">
<Icon name="settings" className="text-default h-4 w-4" aria-hidden="true" />
@@ -83,7 +83,7 @@ export function WelcomeToCalcomModal() {
<div className="mb-2 flex flex-col gap-3">
{features.map((feature) => (
<div key={feature} className="flex items-start gap-2">
<Icon name="check" className="text-muted mt-0.5 h-4 w-4 flex-shrink-0" />
<Icon name="check" className="text-muted mt-0.5 h-4 w-4 shrink-0" />
<span className="text-default text-sm font-medium leading-tight">{t(feature)}</span>
</div>
))}
@@ -272,7 +272,7 @@ const MobileNavigation = ({ isPlatformNavigation = false }: { isPlatformNavigati
<>
<nav
className={classNames(
"pwa:pb-[max(0.25rem,env(safe-area-inset-bottom))] pwa:-mx-2 bg-muted border-subtle fixed bottom-0 left-0 z-30 flex w-full border-t bg-opacity-40 px-1 shadow backdrop-blur-md md:hidden",
"pwa:pb-[max(0.25rem,env(safe-area-inset-bottom))] pwa:-mx-2 bg-cal-muted/40 border-subtle fixed bottom-0 left-0 z-30 flex w-full border-t px-1 shadow backdrop-blur-md md:hidden",
isEmbed && "hidden"
)}>
{mobileNavigationBottomItems.map((item) => (
@@ -118,7 +118,7 @@ export const NavigationItem: React.FC<{
open={isTooltipOpen}
content={
hasChildren ? (
<div className="pointer-events-auto flex flex-col space-y-1 p-1">
<div className="pointer-events-auto flex flex-col stack-y-1 p-1">
<span className="text-subtle px-2 text-xs font-semibold uppercase tracking-wide">
{t(item.name)}
</span>
@@ -164,7 +164,7 @@ export const NavigationItem: React.FC<{
}}
className={classNames(
"todesktop:py-[7px] text-default group flex w-full items-center rounded-md px-2 py-1.5 text-sm font-medium transition",
"[&[aria-current='page']]:!bg-transparent",
"aria-[aria-current='page']:bg-transparent!",
"[&[aria-current='page']]:text-emphasis mt-0.5 text-sm",
isLocaleReady
? "hover:bg-subtle todesktop:[&[aria-current='page']]:bg-emphasis todesktop:hover:bg-transparent hover:text-emphasis"
@@ -174,7 +174,7 @@ export const NavigationItem: React.FC<{
<Icon
name={item.isLoading ? "rotate-cw" : item.icon}
className={classNames(
"todesktop:!text-blue-500 mr-2 h-4 w-4 flex-shrink-0 rtl:ml-2 md:ltr:mx-auto lg:ltr:mr-2",
"todesktop:!text-blue-500 mr-2 h-4 w-4 shrink-0 rtl:ml-2 md:ltr:mx-auto lg:ltr:mr-2",
item.isLoading && "animate-spin"
)}
aria-hidden="true"
@@ -205,7 +205,7 @@ export const NavigationItem: React.FC<{
className={classNames(
"todesktop:py-[7px] text-default group flex items-center rounded-md px-2 py-1.5 text-sm font-medium transition",
item.child
? `[&[aria-current='page']]:!bg-transparent`
? `aria-[aria-current='page']:bg-transparent!`
: `[&[aria-current='page']]:bg-emphasis`,
isChild
? `[&[aria-current='page']]:text-emphasis [&[aria-current='page']]:bg-emphasis hidden h-8 pl-16 lg:flex lg:pl-11 ${
@@ -221,7 +221,7 @@ export const NavigationItem: React.FC<{
<Icon
name={item.isLoading ? "rotate-cw" : item.icon}
className={classNames(
"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",
"todesktop:!text-blue-500 mr-2 h-4 w-4 shrink-0 rtl:ml-2 md:ltr:mx-auto lg:ltr:mr-2 aria-[aria-current='page']:text-inherit",
item.isLoading && "animate-spin"
)}
aria-hidden="true"
@@ -270,13 +270,13 @@ export const MobileNavigationItem: React.FC<{
key={item.name}
href={item.href}
target={item.target}
className="[&[aria-current='page']]:text-emphasis hover:text-default text-muted relative my-2 min-w-0 flex-1 overflow-hidden rounded-md !bg-transparent p-1 text-center text-xs font-medium focus:z-10 sm:text-sm"
className="[&[aria-current='page']]:text-emphasis hover:text-default text-muted relative my-2 min-w-0 flex-1 overflow-hidden rounded-md bg-transparent! p-1 text-center text-xs font-medium focus:z-10 sm:text-sm"
aria-current={current ? "page" : undefined}>
{item.badge && <div className="absolute right-1 top-1">{item.badge}</div>}
{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"
className="[&[aria-current='page']]:text-emphasis mx-auto mb-1 block h-5 w-5 shrink-0 text-center text-inherit"
aria-hidden="true"
aria-current={current ? "page" : undefined}
/>
@@ -311,7 +311,7 @@ export const MobileNavigationMoreItem: React.FC<{
{item.icon && (
<Icon
name={item.icon}
className="h-5 w-5 flex-shrink-0 ltr:mr-3 rtl:ml-3"
className="h-5 w-5 shrink-0 ltr:mr-3 rtl:ml-3"
aria-hidden="true"
/>
)}
@@ -325,7 +325,7 @@ export const MobileNavigationMoreItem: React.FC<{
<li key={childItem.name} className="border-subtle border-t">
<Link
href={buildHref(childItem)}
className="hover:bg-muted flex items-center p-4 pl-12 transition">
className="hover:bg-cal-muted flex items-center p-4 pl-12 transition">
<span className="text-default font-medium">
{isLocaleReady ? t(childItem.name) : <SkeletonText />}
</span>
@@ -339,7 +339,7 @@ export const MobileNavigationMoreItem: React.FC<{
<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 && (
<Icon name={item.icon} className="h-5 w-5 flex-shrink-0 ltr:mr-3 rtl:ml-3" aria-hidden="true" />
<Icon name={item.icon} className="h-5 w-5 shrink-0 ltr:mr-3 rtl:ml-3" aria-hidden="true" />
)}
{isLocaleReady ? t(item.name) : <SkeletonText />}
</span>
@@ -49,14 +49,14 @@ export function ProfileDropdown() {
className={classNames(
"hover:bg-emphasis todesktop:!bg-transparent group mx-0 flex w-full cursor-pointer appearance-none items-center rounded-full px-2 py-1.5 text-left outline-none transition focus:outline-none focus:ring-0 md:rounded-none lg:rounded"
)}>
<span className="flex w-full flex-grow items-center justify-around gap-2 text-sm font-medium leading-none">
<span className="flex w-full grow items-center justify-around gap-2 text-sm font-medium leading-none">
<Avatar alt={currentOption.label || ""} size="xsm" />
<span className="block w-20 overflow-hidden overflow-ellipsis whitespace-nowrap">
<span className="block w-20 overflow-hidden text-ellipsis whitespace-nowrap">
{currentOption.label}
</span>
<Icon
name="chevron-down"
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 transition rtl:mr-4"
className="group-hover:text-subtle text-muted h-4 w-4 shrink-0 transition rtl:mr-4"
aria-hidden="true"
/>
</span>
@@ -93,7 +93,7 @@ export function UserDropdown({ small }: UserDropdownProps) {
<span
className={classNames(
small ? "h-4 w-4" : "h-5 w-5 ltr:mr-2 rtl:ml-2",
"relative flex-shrink-0 rounded-full"
"relative shrink-0 rounded-full"
)}>
<Avatar
size={small ? "xs" : "xsm"}
@@ -104,20 +104,20 @@ export function UserDropdown({ small }: UserDropdownProps) {
<span
className={classNames(
"border-muted absolute -bottom-1 -right-1 rounded-full border bg-green-500",
small ? "-bottom-0.5 -right-0.5 h-2.5 w-2.5" : "-bottom-0.5 -right-0 h-2 w-2"
small ? "-bottom-0.5 -right-0.5 h-2.5 w-2.5" : "-bottom-0.5 right-0 h-2 w-2"
)}
/>
</span>
{!small && (
<span className="flex flex-grow items-center gap-2">
<span className="w-24 flex-shrink-0 text-sm leading-none">
<span className="flex grow items-center gap-2">
<span className="w-24 shrink-0 text-sm leading-none">
<span className="text-emphasis block truncate py-0.5 font-medium leading-normal">
{isPending ? "Loading..." : user?.name ?? "Nameless User"}
</span>
</span>
<Icon
name="chevron-down"
className="group-hover:text-subtle text-muted h-4 w-4 flex-shrink-0 transition rtl:mr-4"
className="group-hover:text-subtle text-muted h-4 w-4 shrink-0 transition rtl:mr-4"
aria-hidden="true"
/>
</span>