From 5976e255fb30c7ddaac1d3df03578137c2bbb766 Mon Sep 17 00:00:00 2001 From: vben Date: Sat, 6 Jul 2024 17:25:38 +0800 Subject: [PATCH] feat: richer copyright and sidebar preferences --- cspell.json | 1 + packages/@core/ui-kit/shadcn-ui/package.json | 1 + .../ui-kit/shadcn-ui/src/components/index.ts | 2 + .../src/components/ui/input/Input.vue | 34 ++++++++++ .../src/components/ui/input/index.ts | 1 + .../ui/number-field/NumberField.vue | 28 ++++++++ .../ui/number-field/NumberFieldContent.vue | 22 +++++++ .../ui/number-field/NumberFieldDecrement.vue | 39 +++++++++++ .../ui/number-field/NumberFieldIncrement.vue | 39 +++++++++++ .../ui/number-field/NumberFieldInput.vue | 16 +++++ .../src/components/ui/number-field/index.ts | 5 ++ .../src/preferences/blocks/input-item.vue | 51 +++++++++++++++ .../preferences/blocks/layout/copyright.vue | 25 +++++++ .../src/preferences/blocks/layout/sidebar.vue | 17 ++++- .../src/preferences/blocks/layout/tabbar.vue | 3 - .../preferences/blocks/number-field-item.vue | 65 +++++++++++++++++++ .../src/preferences/blocks/select-item.vue | 2 +- .../src/preferences/blocks/switch-item.vue | 2 +- .../src/preferences/preferences-widget.vue | 24 +++++++ .../widgets/src/preferences/preferences.vue | 20 +++++- packages/locales/src/langs/en-US.yaml | 17 +++-- packages/locales/src/langs/zh-CN.yaml | 15 +++-- pnpm-lock.yaml | 12 ++++ 23 files changed, 422 insertions(+), 19 deletions(-) create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/input/Input.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/input/index.ts create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberField.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldContent.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldDecrement.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldIncrement.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldInput.vue create mode 100644 packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/index.ts create mode 100644 packages/business/widgets/src/preferences/blocks/input-item.vue create mode 100644 packages/business/widgets/src/preferences/blocks/number-field-item.vue diff --git a/cspell.json b/cspell.json index 13147587..2797d2cb 100644 --- a/cspell.json +++ b/cspell.json @@ -9,6 +9,7 @@ "taze", "acmr", "antd", + "lucide", "brotli", "defu", "iconify", diff --git a/packages/@core/ui-kit/shadcn-ui/package.json b/packages/@core/ui-kit/shadcn-ui/package.json index 553a94d8..1fa1d80f 100644 --- a/packages/@core/ui-kit/shadcn-ui/package.json +++ b/packages/@core/ui-kit/shadcn-ui/package.json @@ -49,6 +49,7 @@ "@vben-core/typings": "workspace:*", "@vueuse/core": "^10.11.0", "class-variance-authority": "^0.7.0", + "lucide-vue-next": "^0.400.0", "radix-vue": "^1.9.0", "vue": "^3.4.31", "vue-sonner": "^1.1.3" diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/index.ts b/packages/@core/ui-kit/shadcn-ui/src/components/index.ts index f36f1cad..5734d245 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/components/index.ts +++ b/packages/@core/ui-kit/shadcn-ui/src/components/index.ts @@ -34,6 +34,8 @@ export * from './ui/checkbox'; export * from './ui/dialog'; export * from './ui/dropdown-menu'; export * from './ui/hover-card'; +export * from './ui/input'; +export * from './ui/number-field'; export * from './ui/pin-input'; export * from './ui/popover'; export * from './ui/scroll-area'; diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/input/Input.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/input/Input.vue new file mode 100644 index 00000000..e041f683 --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/input/Input.vue @@ -0,0 +1,34 @@ + + + diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/input/index.ts b/packages/@core/ui-kit/shadcn-ui/src/components/ui/input/index.ts new file mode 100644 index 00000000..c5248c5c --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/input/index.ts @@ -0,0 +1 @@ +export { default as Input } from './Input.vue'; diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberField.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberField.vue new file mode 100644 index 00000000..08159459 --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberField.vue @@ -0,0 +1,28 @@ + + + diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldContent.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldContent.vue new file mode 100644 index 00000000..f10f19e1 --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldContent.vue @@ -0,0 +1,22 @@ + + + diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldDecrement.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldDecrement.vue new file mode 100644 index 00000000..1ba0189b --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldDecrement.vue @@ -0,0 +1,39 @@ + + + diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldIncrement.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldIncrement.vue new file mode 100644 index 00000000..aeafd093 --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldIncrement.vue @@ -0,0 +1,39 @@ + + + diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldInput.vue b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldInput.vue new file mode 100644 index 00000000..cd18a237 --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/NumberFieldInput.vue @@ -0,0 +1,16 @@ + + + diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/index.ts b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/index.ts new file mode 100644 index 00000000..bcdde78a --- /dev/null +++ b/packages/@core/ui-kit/shadcn-ui/src/components/ui/number-field/index.ts @@ -0,0 +1,5 @@ +export { default as NumberField } from './NumberField.vue'; +export { default as NumberFieldContent } from './NumberFieldContent.vue'; +export { default as NumberFieldDecrement } from './NumberFieldDecrement.vue'; +export { default as NumberFieldIncrement } from './NumberFieldIncrement.vue'; +export { default as NumberFieldInput } from './NumberFieldInput.vue'; diff --git a/packages/business/widgets/src/preferences/blocks/input-item.vue b/packages/business/widgets/src/preferences/blocks/input-item.vue new file mode 100644 index 00000000..4c68c643 --- /dev/null +++ b/packages/business/widgets/src/preferences/blocks/input-item.vue @@ -0,0 +1,51 @@ + + + diff --git a/packages/business/widgets/src/preferences/blocks/layout/copyright.vue b/packages/business/widgets/src/preferences/blocks/layout/copyright.vue index 96c1169b..e4dcd7db 100644 --- a/packages/business/widgets/src/preferences/blocks/layout/copyright.vue +++ b/packages/business/widgets/src/preferences/blocks/layout/copyright.vue @@ -1,6 +1,7 @@ diff --git a/packages/business/widgets/src/preferences/blocks/layout/sidebar.vue b/packages/business/widgets/src/preferences/blocks/layout/sidebar.vue index 59c6af7f..0b89fbf4 100644 --- a/packages/business/widgets/src/preferences/blocks/layout/sidebar.vue +++ b/packages/business/widgets/src/preferences/blocks/layout/sidebar.vue @@ -1,6 +1,7 @@ + + diff --git a/packages/business/widgets/src/preferences/blocks/select-item.vue b/packages/business/widgets/src/preferences/blocks/select-item.vue index 7ca1e835..0920d787 100644 --- a/packages/business/widgets/src/preferences/blocks/select-item.vue +++ b/packages/business/widgets/src/preferences/blocks/select-item.vue @@ -54,7 +54,7 @@ const slots = useSlots();