Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

♻️ Replace clsx + tailwind-merge with cn (#3150)

Luke Vellada9742b84fbd
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 4627cfe34..beff7f3a7 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -32,8 +32,8 @@
"@tiptap/react": "3.27.3",
"@tiptap/starter-kit": "3.27.3",
"class-variance-authority": "^0.7.1",
- "clsx": "^1.2.1",
"cmdk": "^1.1.1",
+ "cn": "^0.2.4",
"date-fns": "^4.4.0",
"input-otp": "^1.4.2",
"lucide-react": "^0.479.0",
@@ -48,8 +48,7 @@
"react-markdown": "^10.1.0",
"rehype-sanitize": "^6.0.0",
"remark-breaks": "^4.0.0",
- "sonner": "^2.0.6",
- "tailwind-merge": "^3.6.0"
+ "sonner": "^2.0.6"
},
"devDependencies": {
"@rallly/tsconfig": "workspace:*",
diff --git a/packages/ui/src/lib/utils.ts b/packages/ui/src/lib/utils.ts
index 73803b0ce..fe0d16987 100644
--- a/packages/ui/src/lib/utils.ts
+++ b/packages/ui/src/lib/utils.ts
@@ -1,7 +1 @@
-import type { ClassValue } from "clsx";
-import clsx from "clsx";
-import { twMerge } from "tailwind-merge";
-
-export function cn(...inputs: ClassValue[]) {
- return twMerge(clsx(inputs));
-}
+export { cn } from "cn";
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 83bf705df..83c59714d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -815,12 +815,12 @@ importers:
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
- clsx:
- specifier: ^1.2.1
- version: 1.2.1
cmdk:
specifier: ^1.1.1
+ cn:
+ specifier: ^0.2.4
+ version: 0.2.4
date-fns:
specifier: ^4.4.0
version: 4.4.0
@@ -866,9 +866,6 @@ importers:
sonner:
specifier: ^2.0.6
- tailwind-merge:
- specifier: ^3.6.0
- version: 3.6.0
devDependencies:
'@rallly/tsconfig':
specifier: workspace:*
@@ -7095,10 +7092,6 @@ packages:
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==}
- engines: {node: '>=6'}
-
resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
engines: {node: '>=6'}
@@ -7109,6 +7102,11 @@ packages:
react: ^18 || ^19 || ^19.0.0-rc
react-dom: ^18 || ^19 || ^19.0.0-rc
+ resolution: {integrity: sha512-SzQvoh5FwizWtQg9+JueKdjWhlfCZMdu5DqNHm9q1wUlRVmKb9WXlepR9bTTbPwzEOyX1ujJ6lcCppmn3bNUCg==}
+ engines: {node: '>=20'}
+ hasBin: true
+
resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -10993,9 +10991,6 @@ packages:
resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==}
engines: {node: '>=20'}
- resolution: {integrity: sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w==}
-
resolution: {integrity: sha512-wAQiIxAPqk0MNTPptVe/xoyWi27y+NRGnTwvn4PQnbvB9kp8QUBiGl/wsfoVBHnQxTmhXJSNt9NHTmcz9EivFA==}
engines: {node: '>=12.13.0'}
@@ -19439,8 +19434,6 @@ snapshots:
strip-ansi: 6.0.1
wrap-ansi: 7.0.0
-
@@ -19455,6 +19448,8 @@ snapshots:
- '@types/react'
- '@types/react-dom'
+
dependencies:
convert-to-spaces: 2.0.1
@@ -24541,8 +24536,6 @@ snapshots:
-
dependencies:
prism-react-renderer: 2.4.1([email protected])