+
Default
@@ -79,7 +80,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -97,7 +97,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -115,7 +114,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -129,12 +127,11 @@ function App() {
TAG
- // primary
+
Primary
@@ -152,7 +149,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -170,7 +166,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -188,7 +183,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -202,12 +196,11 @@ function App() {
TAG
- // secondary
+
Secondary
@@ -225,7 +218,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -243,7 +235,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
@@ -261,7 +252,6 @@ function App() {
style={{
display: "flex",
justifyContent: "center",
- alignItems: "center",
gap: "3px",
}}
>
diff --git a/apps/docs/src/index.css b/apps/docs/src/index.css
index 4e11abb..544c531 100644
--- a/apps/docs/src/index.css
+++ b/apps/docs/src/index.css
@@ -7,36 +7,41 @@
}
body {
- background-color: rgb(0, 0, 0);
+ background-color: #1e1e1e;
}
@font-face {
font-family: "SUIT";
- src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Light.woff2") format("woff2");
+ src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Light.woff2")
+ format("woff2");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: "SUIT";
- src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2") format("woff2");
+ src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2")
+ format("woff2");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "SUIT";
- src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Medium.woff2") format("woff2");
+ src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Medium.woff2")
+ format("woff2");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "SUIT";
- src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-SemiBold.woff2") format("woff2");
+ src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-SemiBold.woff2")
+ format("woff2");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "SUIT";
- src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Bold.woff2") format("woff2");
+ src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Bold.woff2")
+ format("woff2");
font-weight: 700;
font-style: normal;
}
diff --git a/packages/ui/Tag/style.css.ts b/packages/ui/Tag/style.css.ts
index afba3ff..af9e58f 100644
--- a/packages/ui/Tag/style.css.ts
+++ b/packages/ui/Tag/style.css.ts
@@ -13,6 +13,8 @@ export const root = style({
display: "flex",
justifyContent: "center",
alignItems: "center",
+ width: "fit-content",
+ height: "fit-content",
});
const sprinkleProperties = defineProperties({
From 8666c06330e591552e03d3819bc0c3bda1a6b575 Mon Sep 17 00:00:00 2001
From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com>
Date: Sun, 2 Jun 2024 04:03:47 +0900
Subject: [PATCH 05/10] =?UTF-8?q?chore:=20App.tsx=20=EB=B3=B5=EA=B5=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/docs/src/App.tsx | 251 ++++++------------------------------------
1 file changed, 31 insertions(+), 220 deletions(-)
diff --git a/apps/docs/src/App.tsx b/apps/docs/src/App.tsx
index 5bba3e6..ae949d4 100644
--- a/apps/docs/src/App.tsx
+++ b/apps/docs/src/App.tsx
@@ -1,10 +1,9 @@
import "./App.css";
-import { Button, Test } from "@sopt-makers/ui";
import { ChangeEvent, useState } from "react";
import SearchField from "../../../packages/ui/Input/SearchField";
-import TAG from "../../../packages/ui/TAG/TAG";
+import { Test } from "@sopt-makers/ui";
import TextArea from "../../../packages/ui/Input/TextArea";
import TextField from "../../../packages/ui/Input/TextField";
@@ -48,224 +47,36 @@ function App() {
};
return (
-
-
Default
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
Primary
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
Secondary
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
-
- TAG
-
-
- TAG
-
-
- TAG
-
-
-
+ <>
+
+
+ placeholder="Placeholder..."
+ required
+ labelText="Label"
+ descriptionText="description"
+ validationFn={inputValidation}
+ value={input}
+ onChange={handleInputChange}
+ />
+
+
+ >
);
}
From dc9940efe8c6b74b953cbb9fd8f9e9f9d0bc35e7 Mon Sep 17 00:00:00 2001
From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com>
Date: Sun, 2 Jun 2024 15:11:55 +0900
Subject: [PATCH 06/10] =?UTF-8?q?fix:=20index=20=ED=99=95=EC=9E=A5?=
=?UTF-8?q?=EC=9E=90=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/ui/Tag/{index.ts => index.tsx} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename packages/ui/Tag/{index.ts => index.tsx} (100%)
diff --git a/packages/ui/Tag/index.ts b/packages/ui/Tag/index.tsx
similarity index 100%
rename from packages/ui/Tag/index.ts
rename to packages/ui/Tag/index.tsx
From f014b4b0ec6b2073ad51aab5db04af984c5bcdc3 Mon Sep 17 00:00:00 2001
From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com>
Date: Sun, 2 Jun 2024 15:28:25 +0900
Subject: [PATCH 07/10] =?UTF-8?q?fix:=20border=20->=20boxShadow=EB=A1=9C?=
=?UTF-8?q?=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/ui/Tag/constants.ts | 12 ++++++------
packages/ui/Tag/style.css.ts | 2 +-
packages/ui/Tag/utils.ts | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/packages/ui/Tag/constants.ts b/packages/ui/Tag/constants.ts
index 4f2fd51..ff699e0 100644
--- a/packages/ui/Tag/constants.ts
+++ b/packages/ui/Tag/constants.ts
@@ -10,18 +10,18 @@ export const bgColors: Record = {
"default-solid": theme.colors.gray700,
"primary-solid": theme.colors.orangeAlpha200,
"secondary-solid": theme.colors.blueAlpha200,
- "default-line": "none",
- "primary-line": "none",
- "secondary-line": "none",
+ "default-line": "unset",
+ "primary-line": "unset",
+ "secondary-line": "unset",
};
export const borders: Record = {
"default-solid": "none",
"primary-solid": "none",
"secondary-solid": "none",
- "default-line": `1px solid ${theme.colors.gray300}`,
- "primary-line": `1px solid ${theme.colors.orange700}`,
- "secondary-line": `1px solid ${theme.colors.blue700}`,
+ "default-line": `0 0 0 1px ${theme.colors.gray300} inset`,
+ "primary-line": `0 0 0 1px ${theme.colors.orange700} inset`,
+ "secondary-line": `0 0 0 1px ${theme.colors.blue700} inset`,
};
export const textColors: Record = {
diff --git a/packages/ui/Tag/style.css.ts b/packages/ui/Tag/style.css.ts
index af9e58f..7f5969e 100644
--- a/packages/ui/Tag/style.css.ts
+++ b/packages/ui/Tag/style.css.ts
@@ -20,7 +20,7 @@ export const root = style({
const sprinkleProperties = defineProperties({
properties: {
backgroundColor: bgColors,
- border: borders,
+ boxShadow: borders,
color: textColors,
borderRadius: borderRadiuses,
padding: paddings,
diff --git a/packages/ui/Tag/utils.ts b/packages/ui/Tag/utils.ts
index 96017e4..cfa73e4 100644
--- a/packages/ui/Tag/utils.ts
+++ b/packages/ui/Tag/utils.ts
@@ -14,7 +14,7 @@ function createTagStyle(
) {
return sprinkles({
backgroundColor: `${variantTheme}-${typeTheme}`,
- border: `${variantTheme}-${typeTheme}`,
+ boxShadow: `${variantTheme}-${typeTheme}`,
color: variantTheme,
borderRadius: shapeTheme,
padding: sizeTheme,
From 39c614bb681b9c1fb9c3086e9212dbfbc682fc1a Mon Sep 17 00:00:00 2001
From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com>
Date: Sat, 8 Jun 2024 16:57:51 +0900
Subject: [PATCH 08/10] =?UTF-8?q?docs:=20storybook=20=EC=9E=91=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/ui/index.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/ui/index.ts b/packages/ui/index.ts
index 8cd806e..4f9a4d1 100644
--- a/packages/ui/index.ts
+++ b/packages/ui/index.ts
@@ -8,6 +8,7 @@ export type { DialogOptionType } from "./Dialog";
export { ToastProvider, useToast, Toast } from "./Toast";
export type { ToastOptionType } from "./Toast";
export { TextField, TextArea, SearchField } from './Input';
+export { default as Tag } from "./Tag";
// test component
export { default as Test } from "./Test";
From e1de3d8b38eb572715a87b6e1a4bb488bdfd9344 Mon Sep 17 00:00:00 2001
From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com>
Date: Sat, 8 Jun 2024 17:38:43 +0900
Subject: [PATCH 09/10] =?UTF-8?q?fix:=20Tag=20children=EC=97=90=EC=84=9C?=
=?UTF-8?q?=20span=ED=83=9C=EA=B7=B8=20=EC=A0=9C=EA=B1=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/ui/Tag/Tag.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/ui/Tag/Tag.tsx b/packages/ui/Tag/Tag.tsx
index 2b2af67..92383ff 100644
--- a/packages/ui/Tag/Tag.tsx
+++ b/packages/ui/Tag/Tag.tsx
@@ -19,7 +19,7 @@ function Tag({
const style = createTagStyle(type, variant, shape, size);
return (
- {children}
+ {children}
);
}
From da6bacdf61c0ae241e53549d709e9266e84ed18f Mon Sep 17 00:00:00 2001
From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com>
Date: Sat, 8 Jun 2024 19:13:06 +0900
Subject: [PATCH 10/10] =?UTF-8?q?fix:=20children=EC=9D=84=20string?=
=?UTF-8?q?=EB=A7=8C=20=ED=97=88=EC=9A=A9=ED=95=98=EA=B3=A0,=20Tag=20?=
=?UTF-8?q?=EC=9E=90=EC=B2=B4=EB=A5=BC=20span=EC=9C=BC=EB=A1=9C=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/docs/src/stories/Tag.stories.tsx | 42 +++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 apps/docs/src/stories/Tag.stories.tsx
diff --git a/apps/docs/src/stories/Tag.stories.tsx b/apps/docs/src/stories/Tag.stories.tsx
new file mode 100644
index 0000000..2bd216c
--- /dev/null
+++ b/apps/docs/src/stories/Tag.stories.tsx
@@ -0,0 +1,42 @@
+import { Meta, StoryObj } from "@storybook/react";
+
+import { type HTMLAttributes } from "react";
+import { Tag } from "@sopt-makers/ui";
+
+interface TagOwnProps extends HTMLAttributes {
+ children?: string;
+ size?: "sm" | "md" | "lg";
+ shape?: "rect" | "pill";
+ variant?: "default" | "primary" | "secondary";
+ type?: "solid" | "line";
+}
+
+type TagStoryProps = TagOwnProps & { children: string };
+
+export default {
+ title: "Components/Tag",
+ component: Tag,
+ tags: ["autodocs"],
+} as Meta;
+
+// 기본 태그 스토리
+export const Default: StoryObj = {
+ args: {
+ children: "Default Tag",
+ size: "sm",
+ shape: "rect",
+ variant: "default",
+ type: "solid",
+ },
+};
+
+// 커스텀 버튼 스토리
+export const Another: StoryObj = {
+ args: {
+ children: "Another Tag",
+ size: "md",
+ shape: "pill",
+ variant: "primary",
+ type: "line",
+ },
+};