From b56c72f9923953d8256a15e3950495449ef4efae Mon Sep 17 00:00:00 2001 From: sudongyuer <976499226@qq.com> Date: Wed, 14 Feb 2024 13:28:41 +0800 Subject: [PATCH 1/4] fix(chip): add min width avoid chip malformed(#2350) --- packages/core/theme/src/components/chip.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/theme/src/components/chip.ts b/packages/core/theme/src/components/chip.ts index 92cbd76ae9..e557225ad1 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", From f222691bc2768001ab4107bbf7655ac775cbcb41 Mon Sep 17 00:00:00 2001 From: Tsuki <976499226@qq.com> Date: Mon, 19 Feb 2024 14:59:36 +0800 Subject: [PATCH 2/4] chore: add change log --- .changeset/rare-bears-cross.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rare-bears-cross.md diff --git a/.changeset/rare-bears-cross.md b/.changeset/rare-bears-cross.md new file mode 100644 index 0000000000..c85c376afc --- /dev/null +++ b/.changeset/rare-bears-cross.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/theme": patch +--- + +fix(chip): add min width avoid chip malformed (#2350) From a25b3c766cdc8a62ade0861d3190db0ad5cb026e Mon Sep 17 00:00:00 2001 From: Tsuki <976499226@qq.com> Date: Tue, 20 Feb 2024 11:18:36 +0800 Subject: [PATCH 3/4] fix(chip): fix isOneChar compound variants avoid chip malformed(#2350) --- packages/core/theme/src/components/chip.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/core/theme/src/components/chip.ts b/packages/core/theme/src/components/chip.ts index e557225ad1..4cb6a07f69 100644 --- a/packages/core/theme/src/components/chip.ts +++ b/packages/core/theme/src/components/chip.ts @@ -415,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", @@ -422,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", @@ -429,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", @@ -438,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", @@ -446,6 +454,8 @@ const chip = tv({ { isOneChar: true, isCloseable: true, + hasStartContent: false, + hasEndContent: false, class: { base: "w-auto", }, From fccf5ae34ececfb46434b2a4583d16d28caf859e Mon Sep 17 00:00:00 2001 From: Tsuki <976499226@qq.com> Date: Tue, 20 Feb 2024 11:25:40 +0800 Subject: [PATCH 4/4] chore: update change log --- .changeset/rare-bears-cross.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/rare-bears-cross.md b/.changeset/rare-bears-cross.md index c85c376afc..dafbee0a32 100644 --- a/.changeset/rare-bears-cross.md +++ b/.changeset/rare-bears-cross.md @@ -2,4 +2,4 @@ "@nextui-org/theme": patch --- -fix(chip): add min width avoid chip malformed (#2350) +fix(chip): fix isOneChar compound variants avoid chip malformed(#2350)