From 7e0daaedac5ba11535ec7820659414dc54fd6eb8 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 12 Dec 2022 17:12:42 +0800 Subject: [PATCH] refactor: remove form-related components (#762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement /milestone 2.1.x #### What this PR does / why we need it: 移除与表单相关的组件,比如 `VInput`、`VSelect` 等,以后均使用 FormKit 提供的表单元素 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2905 #### Does this PR introduce a user-facing change? ```release-note None ``` --- packages/components/src/components.ts | 5 - .../src/components/card/Card.story.vue | 25 ---- .../components/checkbox/CheckBox.story.vue | 36 ----- .../src/components/checkbox/CheckBox.vue | 58 -------- .../src/components/checkbox/CheckBoxGroup.vue | 54 ------- .../checkbox/__tests__/CheckBox.spec.ts | 61 -------- .../checkbox/__tests__/CheckBoxGroup.spec.ts | 124 ---------------- .../__snapshots__/CheckBox.spec.ts.snap | 8 -- .../__snapshots__/CheckBoxGroup.spec.ts.snap | 12 -- .../src/components/checkbox/index.ts | 2 - .../src/components/entity/EntityField.vue | 2 +- .../src/components/input/Input.story.vue | 31 ---- .../components/src/components/input/Input.vue | 128 ----------------- .../components/input/__tests__/Input.spec.ts | 67 --------- .../__snapshots__/Input.spec.ts.snap | 36 ----- .../components/src/components/input/index.ts | 1 - .../src/components/input/interface.ts | 1 - .../src/components/radio/Radio.story.vue | 40 ------ .../components/src/components/radio/Radio.vue | 64 --------- .../src/components/radio/RadioGroup.vue | 44 ------ .../components/radio/__tests__/Radio.spec.ts | 98 ------------- .../radio/__tests__/RadioGroup.spec.ts | 135 ------------------ .../__snapshots__/Radio.spec.ts.snap | 8 -- .../__snapshots__/RadioGroup.spec.ts.snap | 12 -- .../components/src/components/radio/index.ts | 2 - .../src/components/select/Option.vue | 11 -- .../src/components/select/Select.story.vue | 49 ------- .../src/components/select/Select.vue | 105 -------------- .../select/__tests__/Select.spec.ts | 20 --- .../__snapshots__/Select.spec.ts.snap | 31 ---- .../components/src/components/select/index.ts | 2 - .../src/components/select/interface.ts | 1 - .../src/components/space/Space.story.vue | 25 ---- .../components/textarea/Textarea.story.vue | 33 ----- .../src/components/textarea/Textarea.vue | 72 ---------- .../textarea/__tests__/Textarea.spec.ts | 70 --------- .../__snapshots__/Textarea.spec.ts.snap | 6 - .../src/components/textarea/index.ts | 1 - 38 files changed, 1 insertion(+), 1479 deletions(-) delete mode 100644 packages/components/src/components/checkbox/CheckBox.story.vue delete mode 100644 packages/components/src/components/checkbox/CheckBox.vue delete mode 100644 packages/components/src/components/checkbox/CheckBoxGroup.vue delete mode 100644 packages/components/src/components/checkbox/__tests__/CheckBox.spec.ts delete mode 100644 packages/components/src/components/checkbox/__tests__/CheckBoxGroup.spec.ts delete mode 100644 packages/components/src/components/checkbox/__tests__/__snapshots__/CheckBox.spec.ts.snap delete mode 100644 packages/components/src/components/checkbox/__tests__/__snapshots__/CheckBoxGroup.spec.ts.snap delete mode 100644 packages/components/src/components/checkbox/index.ts delete mode 100644 packages/components/src/components/input/Input.story.vue delete mode 100644 packages/components/src/components/input/Input.vue delete mode 100644 packages/components/src/components/input/__tests__/Input.spec.ts delete mode 100644 packages/components/src/components/input/__tests__/__snapshots__/Input.spec.ts.snap delete mode 100644 packages/components/src/components/input/index.ts delete mode 100644 packages/components/src/components/input/interface.ts delete mode 100644 packages/components/src/components/radio/Radio.story.vue delete mode 100644 packages/components/src/components/radio/Radio.vue delete mode 100644 packages/components/src/components/radio/RadioGroup.vue delete mode 100644 packages/components/src/components/radio/__tests__/Radio.spec.ts delete mode 100644 packages/components/src/components/radio/__tests__/RadioGroup.spec.ts delete mode 100644 packages/components/src/components/radio/__tests__/__snapshots__/Radio.spec.ts.snap delete mode 100644 packages/components/src/components/radio/__tests__/__snapshots__/RadioGroup.spec.ts.snap delete mode 100644 packages/components/src/components/radio/index.ts delete mode 100644 packages/components/src/components/select/Option.vue delete mode 100644 packages/components/src/components/select/Select.story.vue delete mode 100644 packages/components/src/components/select/Select.vue delete mode 100644 packages/components/src/components/select/__tests__/Select.spec.ts delete mode 100644 packages/components/src/components/select/__tests__/__snapshots__/Select.spec.ts.snap delete mode 100644 packages/components/src/components/select/index.ts delete mode 100644 packages/components/src/components/select/interface.ts delete mode 100644 packages/components/src/components/textarea/Textarea.story.vue delete mode 100644 packages/components/src/components/textarea/Textarea.vue delete mode 100644 packages/components/src/components/textarea/__tests__/Textarea.spec.ts delete mode 100644 packages/components/src/components/textarea/__tests__/__snapshots__/Textarea.spec.ts.snap delete mode 100644 packages/components/src/components/textarea/index.ts diff --git a/packages/components/src/components.ts b/packages/components/src/components.ts index 08e97c4a..6baaf927 100644 --- a/packages/components/src/components.ts +++ b/packages/components/src/components.ts @@ -2,17 +2,12 @@ export * from "./components/avatar"; export * from "./components/alert"; export * from "./components/button"; export * from "./components/card"; -export * from "./components/checkbox"; export * from "./components/header"; -export * from "./components/input"; export * from "./components/menu"; export * from "./components/modal"; -export * from "./components/radio"; -export * from "./components/select"; export * from "./components/space"; export * from "./components/tabs"; export * from "./components/tag"; -export * from "./components/textarea"; export * from "./components/switch"; export * from "./components/dialog"; export * from "./components/pagination"; diff --git a/packages/components/src/components/card/Card.story.vue b/packages/components/src/components/card/Card.story.vue index e47ad879..6f70a462 100644 --- a/packages/components/src/components/card/Card.story.vue +++ b/packages/components/src/components/card/Card.story.vue @@ -1,35 +1,10 @@