This commit is contained in:
2026-05-03 20:44:04 +08:00
parent 9c7c96bb27
commit 71fc2afb57
29 changed files with 0 additions and 6463 deletions
-14
View File
@@ -1,14 +0,0 @@
<script setup lang="ts">
import { Button } from '@/components/ui/button'
</script>
<template>
<Button>Hello world</Button>
<h1>You did it!</h1>
<p>
Visit <a href="https://vuejs.org/" target="_blank" rel="noopener">vuejs.org</a> to read the
documentation
</p>
</template>
<style scoped></style>
@@ -1,28 +0,0 @@
<script setup lang="ts">
import type { PrimitiveProps } from 'reka-ui'
import type { HTMLAttributes } from 'vue'
import type { ButtonVariants } from '.'
import { Primitive } from 'reka-ui'
import { cn } from '@/lib/utils'
import { buttonVariants } from '.'
interface Props extends PrimitiveProps {
variant?: ButtonVariants['variant']
size?: ButtonVariants['size']
class?: HTMLAttributes['class']
}
const props = withDefaults(defineProps<Props>(), {
as: 'button',
})
</script>
<template>
<Primitive
:as="as"
:as-child="asChild"
:class="cn(buttonVariants({ variant, size }), props.class)"
>
<slot />
</Primitive>
</template>
@@ -1,38 +0,0 @@
import type { VariantProps } from "class-variance-authority"
import { cva } from "class-variance-authority"
export { default as Button } from "./Button.vue"
export const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
destructive:
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
outline:
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
"default": "h-9 px-4 py-2",
"xs": "h-7 rounded px-2",
"sm": "h-8 rounded-md px-3 text-xs",
"lg": "h-10 rounded-md px-8",
"icon": "h-9 w-9",
"icon-sm": "size-8",
"icon-lg": "size-10",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
},
)
export type ButtonVariants = VariantProps<typeof buttonVariants>
-142
View File
@@ -1,142 +0,0 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import 'tailwindcss';
@import 'tw-animate-css';
@custom-variant dark (&:is(.dark *));
@theme inline {
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
}
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.25 0.042 242);
--card: oklch(1 0 0);
--card-foreground: oklch(0.25 0.042 242);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.25 0.042 242);
--primary: oklch(0.588 0.139 242);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.955 0.014 242);
--secondary-foreground: oklch(0.25 0.069 242);
--muted: oklch(0.97 0.003 242);
--muted-foreground: oklch(0.52 0.028 242);
--accent: oklch(0.965 0.004 242);
--accent-foreground: oklch(0.25 0.042 242);
--destructive: oklch(0.584 0.239 28.5);
--destructive-foreground: oklch(1 0 0);
--border: oklch(0.925 0.007 242);
--input: oklch(0.925 0.007 242);
--ring: oklch(0.588 0.139 242 / 0.9);
--chart-1: oklch(0.25 0.139 242);
--chart-2: oklch(0.35 0.139 242);
--chart-3: oklch(0.55 0.139 242);
--chart-4: oklch(0.75 0.139 242);
--chart-5: oklch(0.85 0.13 242);
--sidebar: oklch(0.984 0.003 242);
--sidebar-foreground: oklch(0.25 0.042 242);
--sidebar-primary: oklch(0.588 0.139 242);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.965 0.004 242);
--sidebar-accent-foreground: oklch(0.25 0.042 242);
--sidebar-border: oklch(0.925 0.007 242);
--sidebar-ring: oklch(0.925 0.007 242);
--font-sans: 'Nunito Sans', sans-serif;
--font-heading: 'Lora', sans-serif;
--radius: 0.625rem;
--shadow-2xs: 0 1px 0 0 oklch(0.55 0.021 242 / 0.05);
--shadow-xs: 0 1px 2px 0 oklch(0.55 0.021 242 / 0.05);
--shadow-sm: 0 1px 3px 0 oklch(0.55 0.021 242 / 0.1), 0 1px 2px -1px oklch(0.55 0.021 242 / 0.1);
--shadow-md:
0 4px 6px -1px oklch(0.55 0.021 242 / 0.1), 0 2px 4px -2px oklch(0.55 0.021 242 / 0.1);
--shadow-lg:
0 10px 15px -3px oklch(0.55 0.021 242 / 0.1), 0 4px 6px -4px oklch(0.55 0.021 242 / 0.1);
--shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.1), 0 8px 10px -6px oklch(0.55 0.021 242 / 0.1);
--shadow-2xl: 0 25px 50px -12px oklch(0.55 0.021 242 / 0.15);
}
.dark {
--background: oklch(0.15 0.014 242);
--foreground: oklch(0.98 0 0);
--card: oklch(0.17 0.014 242);
--card-foreground: oklch(0.98 0 0);
--popover: oklch(0.18 0.014 242);
--popover-foreground: oklch(0.98 0 0);
--primary: oklch(0.588 0.139 242);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.668 0.139 242 / 0.25);
--secondary-foreground: oklch(0.9 0.139 242);
--muted: oklch(0.25 0.01 242);
--muted-foreground: oklch(0.75 0.021 242);
--accent: oklch(0.38 0.014 242);
--accent-foreground: oklch(0.98 0 0);
--destructive: oklch(0.69 0.2 23.9);
--destructive-foreground: oklch(0 0 0);
--border: oklch(0.29 0.01 242);
--input: oklch(0.29 0.01 242);
--ring: oklch(0.668 0.139 242);
--chart-1: oklch(0.35 0.139 242);
--chart-2: oklch(0.55 0.139 242);
--chart-3: oklch(0.75 0.139 242);
--chart-4: oklch(0.9 0.139 242);
--chart-5: oklch(0.99 0.11 242);
--sidebar: oklch(0.11 0.01 242);
--sidebar-foreground: oklch(0.98 0 0);
--sidebar-primary: oklch(1 0 0);
--sidebar-primary-foreground: oklch(0.2 0.01 242);
--sidebar-accent: oklch(0.24 0.01 242);
--sidebar-accent-foreground: oklch(0.98 0 0);
--sidebar-border: oklch(0.28 0.01 242);
--sidebar-ring: oklch(0.668 0.139 242);
--shadow-2xs: 0 1px 3px 0 hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 3px 0 hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 1px 3px 0 hsl(0 0% 0% / 0.25);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}
-7
View File
@@ -1,7 +0,0 @@
import type { ClassValue } from "clsx"
import { clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
-13
View File
@@ -1,13 +0,0 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import './index.css'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.mount('#app')
-8
View File
@@ -1,8 +0,0 @@
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [],
})
export default router
-12
View File
@@ -1,12 +0,0 @@
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})