diff --git a/.changeset/rare-bears-cross.md b/.changeset/rare-bears-cross.md new file mode 100644 index 0000000000..dafbee0a32 --- /dev/null +++ b/.changeset/rare-bears-cross.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/theme": patch +--- + +fix(chip): fix isOneChar compound variants avoid chip malformed(#2350) diff --git a/packages/core/theme/src/components/chip.ts b/packages/core/theme/src/components/chip.ts index 92cbd76ae9..4cb6a07f69 100644 --- a/packages/core/theme/src/components/chip.ts +++ b/packages/core/theme/src/components/chip.ts @@ -25,6 +25,7 @@ const chip = tv({ base: [ "relative", "max-w-fit", + "min-w-min", "inline-flex", "items-center", "justify-between", @@ -414,6 +415,8 @@ const chip = tv({ // isOneChar / size { isOneChar: true, + hasStartContent: false, + hasEndContent: false, size: "sm", class: { base: "w-5 h-5 min-w-unit-5 min-h-5", @@ -421,6 +424,8 @@ const chip = tv({ }, { isOneChar: true, + hasStartContent: false, + hasEndContent: false, size: "md", class: { base: "w-6 h-6 min-w-unit-6 min-h-6", @@ -428,6 +433,8 @@ const chip = tv({ }, { isOneChar: true, + hasStartContent: false, + hasEndContent: false, size: "lg", class: { base: "w-7 h-7 min-w-unit-7 min-h-7", @@ -437,6 +444,8 @@ const chip = tv({ { isOneChar: true, isCloseable: false, + hasStartContent: false, + hasEndContent: false, class: { base: "px-0 justify-center", content: "px-0 flex-none", @@ -445,6 +454,8 @@ const chip = tv({ { isOneChar: true, isCloseable: true, + hasStartContent: false, + hasEndContent: false, class: { base: "w-auto", },