From e0c96717c7cea05a985737552b9c29dbf9440299 Mon Sep 17 00:00:00 2001 From: HoshinoSuzumi Date: Mon, 26 Feb 2024 09:23:09 +0800 Subject: [PATCH] initial commit --- .gitignore | 24 + README.md | 75 + app.config.ts | 6 + app.vue | 7 + components/uni/Button/index.d.ts | 2 + components/uni/Button/index.vue | 123 + components/uni/Copyable/index.vue | 82 + components/uni/Icon/CircleError.vue | 10 + components/uni/Icon/CircleInfo.vue | 7 + components/uni/Icon/CircleSuccess.vue | 10 + components/uni/Icon/CircleWarning.vue | 10 + components/uni/Icon/Spinner.vue | 11 + components/uni/Input/index.vue | 90 + components/uni/Message/Provider.vue | 98 + components/uni/Message/index.d.ts | 20 + components/uni/Message/index.vue | 63 + components/uni/Select/index.d.ts | 6 + components/uni/Select/index.vue | 129 + components/uni/TextArea/index.vue | 112 + components/uni/Toggle/index.vue | 133 + layouts/default.vue | 13 + nuxt.config.ts | 11 + package.json | 19 + pages/index.vue | 11 + public/favicon.ico | Bin 0 -> 4286 bytes server/tsconfig.json | 3 + tailwind.config.ts | 13 + tsconfig.json | 4 + yarn.lock | 6430 +++++++++++++++++++++++++ 29 files changed, 7522 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 app.config.ts create mode 100644 app.vue create mode 100644 components/uni/Button/index.d.ts create mode 100644 components/uni/Button/index.vue create mode 100644 components/uni/Copyable/index.vue create mode 100644 components/uni/Icon/CircleError.vue create mode 100644 components/uni/Icon/CircleInfo.vue create mode 100644 components/uni/Icon/CircleSuccess.vue create mode 100644 components/uni/Icon/CircleWarning.vue create mode 100644 components/uni/Icon/Spinner.vue create mode 100644 components/uni/Input/index.vue create mode 100644 components/uni/Message/Provider.vue create mode 100644 components/uni/Message/index.d.ts create mode 100644 components/uni/Message/index.vue create mode 100644 components/uni/Select/index.d.ts create mode 100644 components/uni/Select/index.vue create mode 100644 components/uni/TextArea/index.vue create mode 100644 components/uni/Toggle/index.vue create mode 100644 layouts/default.vue create mode 100644 nuxt.config.ts create mode 100644 package.json create mode 100644 pages/index.vue create mode 100644 public/favicon.ico create mode 100644 server/tsconfig.json create mode 100644 tailwind.config.ts create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a7f73a --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + +# Logs +logs +*.log + +# Misc +.DS_Store +.fleet +.idea + +# Local env files +.env +.env.* +!.env.example diff --git a/README.md b/README.md new file mode 100644 index 0000000..f5db2a2 --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +# Nuxt 3 Minimal Starter + +Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. + +## Setup + +Make sure to install the dependencies: + +```bash +# npm +npm install + +# pnpm +pnpm install + +# yarn +yarn install + +# bun +bun install +``` + +## Development Server + +Start the development server on `http://localhost:3000`: + +```bash +# npm +npm run dev + +# pnpm +pnpm run dev + +# yarn +yarn dev + +# bun +bun run dev +``` + +## Production + +Build the application for production: + +```bash +# npm +npm run build + +# pnpm +pnpm run build + +# yarn +yarn build + +# bun +bun run build +``` + +Locally preview production build: + +```bash +# npm +npm run preview + +# pnpm +pnpm run preview + +# yarn +yarn preview + +# bun +bun run preview +``` + +Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/app.config.ts b/app.config.ts new file mode 100644 index 0000000..ee7b514 --- /dev/null +++ b/app.config.ts @@ -0,0 +1,6 @@ +export default defineAppConfig({ + ui: { + primary: 'green', + gray: 'neutral' + } +}) diff --git a/app.vue b/app.vue new file mode 100644 index 0000000..4809281 --- /dev/null +++ b/app.vue @@ -0,0 +1,7 @@ + diff --git a/components/uni/Button/index.d.ts b/components/uni/Button/index.d.ts new file mode 100644 index 0000000..5bcfbc4 --- /dev/null +++ b/components/uni/Button/index.d.ts @@ -0,0 +1,2 @@ +type ButtonType = 'normal' | 'primary' | 'danger' +type ButtonSize = 'base' | 'medium' | 'small' \ No newline at end of file diff --git a/components/uni/Button/index.vue b/components/uni/Button/index.vue new file mode 100644 index 0000000..2732e9e --- /dev/null +++ b/components/uni/Button/index.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/components/uni/Copyable/index.vue b/components/uni/Copyable/index.vue new file mode 100644 index 0000000..38c4fce --- /dev/null +++ b/components/uni/Copyable/index.vue @@ -0,0 +1,82 @@ + + + + + \ No newline at end of file diff --git a/components/uni/Icon/CircleError.vue b/components/uni/Icon/CircleError.vue new file mode 100644 index 0000000..4d84356 --- /dev/null +++ b/components/uni/Icon/CircleError.vue @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/components/uni/Icon/CircleInfo.vue b/components/uni/Icon/CircleInfo.vue new file mode 100644 index 0000000..660e8e1 --- /dev/null +++ b/components/uni/Icon/CircleInfo.vue @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/components/uni/Icon/CircleSuccess.vue b/components/uni/Icon/CircleSuccess.vue new file mode 100644 index 0000000..8a64ee6 --- /dev/null +++ b/components/uni/Icon/CircleSuccess.vue @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/components/uni/Icon/CircleWarning.vue b/components/uni/Icon/CircleWarning.vue new file mode 100644 index 0000000..5a5aebc --- /dev/null +++ b/components/uni/Icon/CircleWarning.vue @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/components/uni/Icon/Spinner.vue b/components/uni/Icon/Spinner.vue new file mode 100644 index 0000000..cab4a3f --- /dev/null +++ b/components/uni/Icon/Spinner.vue @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/components/uni/Input/index.vue b/components/uni/Input/index.vue new file mode 100644 index 0000000..6aa79d1 --- /dev/null +++ b/components/uni/Input/index.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/components/uni/Message/Provider.vue b/components/uni/Message/Provider.vue new file mode 100644 index 0000000..2de2d03 --- /dev/null +++ b/components/uni/Message/Provider.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/components/uni/Message/index.d.ts b/components/uni/Message/index.d.ts new file mode 100644 index 0000000..66b5399 --- /dev/null +++ b/components/uni/Message/index.d.ts @@ -0,0 +1,20 @@ +export type Message = { + id: string + content: string + type: MessageType + duration?: number +} + +export type MessageType = 'success' | 'warning' | 'error' | 'info' + +export type MessageProviderApi = { + destroy: (id: string) => void +} + +export type MessageApi = { + info: (content: string, duration?: number) => void + success: (content: string, duration?: number) => void + warning: (content: string, duration?: number) => void + error: (content: string, duration?: number) => void + destroyAll: () => void +} \ No newline at end of file diff --git a/components/uni/Message/index.vue b/components/uni/Message/index.vue new file mode 100644 index 0000000..7c42dce --- /dev/null +++ b/components/uni/Message/index.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/components/uni/Select/index.d.ts b/components/uni/Select/index.d.ts new file mode 100644 index 0000000..9f571c8 --- /dev/null +++ b/components/uni/Select/index.d.ts @@ -0,0 +1,6 @@ +type SelectItem = { + label: string + value: string + icon?: string + disabled?: boolean +} \ No newline at end of file diff --git a/components/uni/Select/index.vue b/components/uni/Select/index.vue new file mode 100644 index 0000000..c31b6e8 --- /dev/null +++ b/components/uni/Select/index.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/components/uni/TextArea/index.vue b/components/uni/TextArea/index.vue new file mode 100644 index 0000000..da8b955 --- /dev/null +++ b/components/uni/TextArea/index.vue @@ -0,0 +1,112 @@ + +import { textarea } from '@nuxt/ui'; + + +