From 08be35257044486b62ab7b14242c6303c158998b Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Fri, 7 Jun 2024 17:37:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BD=94=EB=93=9C=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintcache | 2 +- packages/wow-icons/src/CloseButton.tsx | 17 ------------ packages/wow-ui/package.json | 1 - .../src/components/Chip/Chip.stories.ts | 1 - packages/wow-ui/src/components/Chip/index.tsx | 26 +++++++++---------- 5 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 packages/wow-icons/src/CloseButton.tsx diff --git a/.eslintcache b/.eslintcache index 3521e394..14cabf2a 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts":"1","/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx":"2","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts":"3","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts":"4","/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx":"5","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts":"6","/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx":"7"},{"size":3427,"mtime":1717049872156,"results":"8","hashOfConfig":"9"},{"size":5010,"mtime":1717580527026,"results":"10","hashOfConfig":"11"},{"size":2033,"mtime":1717580378191,"results":"12","hashOfConfig":"11"},{"size":57,"mtime":1716631427241,"results":"13","hashOfConfig":"9"},{"size":489,"mtime":1717052438980,"results":"14","hashOfConfig":"9"},{"size":423,"mtime":1716631402622,"results":"15","hashOfConfig":"9"},{"size":328,"mtime":1716654901735,"results":"16","hashOfConfig":"9"},{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8oyd96",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8a6h2i",{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts",["38"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx",["39","40","41"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts",[],[],"/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx",["42"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx",[],[],{"ruleId":"43","severity":1,"message":"44","line":3,"column":18,"nodeType":"45","endLine":3,"endColumn":37},{"ruleId":"43","severity":1,"message":"46","line":2,"column":21,"nodeType":"45","endLine":2,"endColumn":41},{"ruleId":"43","severity":1,"message":"47","line":3,"column":24,"nodeType":"45","endLine":3,"endColumn":44},{"ruleId":"48","severity":1,"message":"49","line":27,"column":18,"nodeType":"50","messageId":"51","endLine":27,"endColumn":28},{"ruleId":"43","severity":1,"message":"52","line":1,"column":21,"nodeType":"45","endLine":1,"endColumn":45},"import/no-unresolved","Unable to resolve path to module '@/components/Chip'.","Literal","Unable to resolve path to module '@styled-system/css'.","Unable to resolve path to module '@styled-system/jsx'.","@typescript-eslint/naming-convention","Interface name `_ChipProps` must match one of the following formats: PascalCase","Identifier","doesNotMatchFormat","Unable to resolve path to module '@styled-system/css/css'."] \ No newline at end of file +[{"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts":"1","/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx":"2","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts":"3","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts":"4","/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx":"5","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts":"6","/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx":"7"},{"size":2913,"mtime":1717748077365,"results":"8","hashOfConfig":"9"},{"size":4993,"mtime":1717748373367,"results":"10","hashOfConfig":"9"},{"size":2033,"mtime":1717580378191,"results":"11","hashOfConfig":"9"},{"size":57,"mtime":1716631427241,"results":"12","hashOfConfig":"13"},{"size":489,"mtime":1717052438980,"results":"14","hashOfConfig":"13"},{"size":423,"mtime":1716631402622,"results":"15","hashOfConfig":"13"},{"size":328,"mtime":1716654901735,"results":"16","hashOfConfig":"13"},{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8a6h2i",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"8oyd96",{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts",["38"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx",["39","40","41"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts",[],[],"/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx",["42"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx",[],[],{"ruleId":"43","severity":1,"message":"44","line":3,"column":18,"nodeType":"45","endLine":3,"endColumn":37},{"ruleId":"43","severity":1,"message":"46","line":2,"column":21,"nodeType":"45","endLine":2,"endColumn":41},{"ruleId":"43","severity":1,"message":"47","line":3,"column":24,"nodeType":"45","endLine":3,"endColumn":44},{"ruleId":"48","severity":1,"message":"49","line":27,"column":18,"nodeType":"50","messageId":"51","endLine":27,"endColumn":28},{"ruleId":"43","severity":1,"message":"52","line":1,"column":21,"nodeType":"45","endLine":1,"endColumn":45},"import/no-unresolved","Unable to resolve path to module '@/components/Chip'.","Literal","Unable to resolve path to module '@styled-system/css'.","Unable to resolve path to module '@styled-system/jsx'.","@typescript-eslint/naming-convention","Interface name `_ChipProps` must match one of the following formats: PascalCase","Identifier","doesNotMatchFormat","Unable to resolve path to module '@styled-system/css/css'."] \ No newline at end of file diff --git a/packages/wow-icons/src/CloseButton.tsx b/packages/wow-icons/src/CloseButton.tsx deleted file mode 100644 index 252a3f59..00000000 --- a/packages/wow-icons/src/CloseButton.tsx +++ /dev/null @@ -1,17 +0,0 @@ -const CloseButton = (color: string, size: number) => ( - - - -); - -export default CloseButton; diff --git a/packages/wow-ui/package.json b/packages/wow-ui/package.json index c33f0594..4ff885d0 100644 --- a/packages/wow-ui/package.json +++ b/packages/wow-ui/package.json @@ -58,7 +58,6 @@ "test": "jest" }, "devDependencies": { - "wowds-tokens": "workspace:^", "@chromatic-com/storybook": "^1.3.3", "@rollup/plugin-typescript": "^11.1.6", "@storybook/addon-a11y": "^7.5.3", diff --git a/packages/wow-ui/src/components/Chip/Chip.stories.ts b/packages/wow-ui/src/components/Chip/Chip.stories.ts index 44ede2bf..bbcf455f 100644 --- a/packages/wow-ui/src/components/Chip/Chip.stories.ts +++ b/packages/wow-ui/src/components/Chip/Chip.stories.ts @@ -103,7 +103,6 @@ type Story = StoryObj; export const Default: Story = { args: { label: "Chip", - variant: "default", as: "button", }, }; diff --git a/packages/wow-ui/src/components/Chip/index.tsx b/packages/wow-ui/src/components/Chip/index.tsx index 75f22784..70def496 100644 --- a/packages/wow-ui/src/components/Chip/index.tsx +++ b/packages/wow-ui/src/components/Chip/index.tsx @@ -13,7 +13,7 @@ import type { /** * @template T 렌더링할 요소 또는 컴포넌트 타입 * - * @param {T} [as] 렌더링할 요소 또는 컴포넌트. 기본값은 button이며, Chip의 경우 input으로 사용될 수 있음 + * @param {T} [element] 렌더링할 요소 또는 컴포넌트. 기본값은 button이며, Chip의 경우 input으로 사용될 수 있음 * @param {boolean} [defaultChecked=false] 칩의 토글의 default 활성화 상태 * @param {boolean} [isChecked=false] 외부에서 제어할 활성 상태. * @param {string} label 칩 버튼에 들어갈 텍스트 @@ -50,10 +50,12 @@ const ChipLabel = ({ }) => { return ( {label} @@ -131,22 +133,18 @@ const chipLabel = cva({ flexDirection: "row", alignItems: "center", justifyContent: "center", - "&[data-selected=true]": { - color: "white", - }, - "&[data-selected=false]": { - color: "mono.950", - }, }, variants: { - disabled: { - true: { + type: { + checked: { + color: "white", + }, + unchecked: { + color: "mono.950", + }, + disabled: { color: "darkDisabled", - "&[data-selected=false]": { - color: "darkDisabled", - }, }, - false: {}, }, }, });