From 5ad885e26cad1d22de32c59dc7ffda71fd104f41 Mon Sep 17 00:00:00 2001 From: Mark Evola Date: Fri, 15 Aug 2025 12:53:37 -0500 Subject: [PATCH 1/5] util: tailwind merge --- components.json | 2 +- package.json | 1 + pnpm-lock.yaml | 7 ++++++ src/components/ColorThumb/ColorThumb.tsx | 4 ++-- .../DrawingToolbar/DrawingToolbar.tsx | 6 ++--- src/components/LayerInfo/LayerInfo.tsx | 6 ++--- .../ReferenceWindow/ReferenceWindow.tsx | 6 ++--- .../ReferenceWindowContent.tsx | 4 ++-- src/components/ResizeGrid/ResizeGrid.tsx | 4 ++-- .../ScaleIndicator/ScaleIndicator.tsx | 4 ++-- src/components/ShapeOption/ShapeOption.tsx | 4 ++-- .../ToolbarButton/ToolbarButton.tsx | 4 ++-- src/components/Tooltip/Tooltip.tsx | 4 ++-- src/components/ui/menubar.tsx | 24 +++++++++---------- src/lib/tailwind-utils.ts | 6 +++++ 15 files changed, 50 insertions(+), 36 deletions(-) create mode 100644 src/lib/tailwind-utils.ts diff --git a/components.json b/components.json index e3b8873..1ea8f66 100644 --- a/components.json +++ b/components.json @@ -12,7 +12,7 @@ }, "aliases": { "components": "@/components", - "utils": "@/lib/utils", + "utils": "@/lib/tailwind-utils", "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" diff --git a/package.json b/package.json index 9c55dfe..42a56f9 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "react-dom": "^19.0.0", "react-streaming": "^0.3.46", "sirv": "^2.0.3", + "tailwind-merge": "^3.3.1", "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", "ts-node": "^10.9.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 59c09bb..8821ce2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -107,6 +107,9 @@ dependencies: sirv: specifier: ^2.0.3 version: 2.0.3 + tailwind-merge: + specifier: ^3.3.1 + version: 3.3.1 tailwindcss: specifier: ^3.4.17 version: 3.4.17(ts-node@10.9.2) @@ -7736,6 +7739,10 @@ packages: '@pkgr/core': 0.2.9 dev: true + /tailwind-merge@3.3.1: + resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==} + dev: false + /tailwindcss-animate@1.0.7(tailwindcss@3.4.17): resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} peerDependencies: diff --git a/src/components/ColorThumb/ColorThumb.tsx b/src/components/ColorThumb/ColorThumb.tsx index a603f54..9d00e41 100644 --- a/src/components/ColorThumb/ColorThumb.tsx +++ b/src/components/ColorThumb/ColorThumb.tsx @@ -1,6 +1,6 @@ // Components import { ColorThumb as AriaColorThumb } from "react-aria-components"; -import clsx from "clsx"; +import cn from "@/lib/tailwind-utils"; // Types import type { ComponentProps, ReactNode } from "react"; @@ -8,7 +8,7 @@ import type { ComponentProps, ReactNode } from "react"; function ColorThumb({ className, ...props }: ComponentProps<"div">): ReactNode { return (