diff --git a/.changeset/grumpy-mayflies-rhyme.md b/.changeset/grumpy-mayflies-rhyme.md new file mode 100644 index 0000000000..e8ede41448 --- /dev/null +++ b/.changeset/grumpy-mayflies-rhyme.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/theme": patch +--- + +bump `tailwind-merge` version (#3614) diff --git a/packages/core/theme/package.json b/packages/core/theme/package.json index 316a7accbb..f24a2f4464 100644 --- a/packages/core/theme/package.json +++ b/packages/core/theme/package.json @@ -57,7 +57,7 @@ "lodash.omit": "^4.5.0", "clsx": "^1.2.1", "tailwind-variants": "^0.1.20", - "tailwind-merge": "^1.14.0" + "tailwind-merge": "^2.5.2" }, "peerDependencies": { "tailwindcss": ">=3.4.0" diff --git a/packages/core/theme/src/utils/cn.ts b/packages/core/theme/src/utils/cn.ts index d1f24280bc..7cff18742a 100644 --- a/packages/core/theme/src/utils/cn.ts +++ b/packages/core/theme/src/utils/cn.ts @@ -10,7 +10,7 @@ import {twMergeConfig} from "./tw-merge-config"; * * So we can use classes like `text-small` or `text-default-500` and override them. */ -const twMerge = extendTailwindMerge(twMergeConfig); +const twMerge = extendTailwindMerge({extend: twMergeConfig}); export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); diff --git a/packages/core/theme/src/utils/tw-merge-config.ts b/packages/core/theme/src/utils/tw-merge-config.ts index bd5776fe0f..144cb81cf8 100644 --- a/packages/core/theme/src/utils/tw-merge-config.ts +++ b/packages/core/theme/src/utils/tw-merge-config.ts @@ -1,7 +1,6 @@ -import type {Config} from "tailwind-merge"; export const COMMON_UNITS = ["small", "medium", "large"]; -export const twMergeConfig: Partial = { +export const twMergeConfig = { theme: { opacity: ["disabled"], spacing: ["divider"], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7cdd99275a..653149079d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3118,8 +3118,8 @@ importers: specifier: ^4.5.0 version: 4.5.0 tailwind-merge: - specifier: ^1.14.0 - version: 1.14.0 + specifier: ^2.5.2 + version: 2.5.4 tailwind-variants: specifier: ^0.1.20 version: 0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.8.0(@swc/helpers@0.5.13))(@types/node@15.14.9)(typescript@4.9.5))) @@ -9491,8 +9491,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.50: - resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} + electron-to-chromium@1.5.51: + resolution: {integrity: sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -9579,8 +9579,8 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-iterator-helpers@1.1.0: - resolution: {integrity: sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==} + es-iterator-helpers@1.2.0: + resolution: {integrity: sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==} engines: {node: '>= 0.4'} es-module-lexer@0.9.3: @@ -14682,6 +14682,9 @@ packages: tailwind-merge@1.14.0: resolution: {integrity: sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==} + tailwind-merge@2.5.4: + resolution: {integrity: sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==} + tailwind-variants@0.1.20: resolution: {integrity: sha512-AMh7x313t/V+eTySKB0Dal08RHY7ggYK0MSn/ad8wKWOrDUIzyiWNayRUm2PIJ4VRkvRnfNuyRuKbLV3EN+ewQ==} engines: {node: '>=16.x', pnpm: '>=7.x'} @@ -22518,7 +22521,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001677 - electron-to-chromium: 1.5.50 + electron-to-chromium: 1.5.51 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -23462,7 +23465,7 @@ snapshots: dependencies: jake: 10.9.2 - electron-to-chromium@1.5.50: {} + electron-to-chromium@1.5.51: {} emittery@0.13.1: {} @@ -23578,7 +23581,7 @@ snapshots: es-errors@1.3.0: {} - es-iterator-helpers@1.1.0: + es-iterator-helpers@1.2.0: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -23588,6 +23591,7 @@ snapshots: function-bind: 1.1.2 get-intrinsic: 1.2.4 globalthis: 1.0.4 + gopd: 1.0.1 has-property-descriptors: 1.0.2 has-proto: 1.0.3 has-symbols: 1.0.3 @@ -24051,7 +24055,7 @@ snapshots: array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 - es-iterator-helpers: 1.1.0 + es-iterator-helpers: 1.2.0 eslint: 7.32.0 estraverse: 5.3.0 hasown: 2.0.2 @@ -30158,6 +30162,8 @@ snapshots: tailwind-merge@1.14.0: {} + tailwind-merge@2.5.4: {} + tailwind-variants@0.1.20(tailwindcss@3.4.14(ts-node@10.9.2(@swc/core@1.8.0(@swc/helpers@0.5.13))(@types/node@15.14.9)(typescript@4.9.5))): dependencies: tailwind-merge: 1.14.0