⚙️ chore (config): add tailwind css and components config

This commit is contained in:
Abizrh
2025-08-08 11:30:48 +07:00
parent 92d8359803
commit 2e01715df4
8 changed files with 7939 additions and 6537 deletions
+1
View File
@@ -0,0 +1 @@
@import 'tailwindcss';
+1 -1
View File
@@ -6,7 +6,7 @@ defineProps<{
<template> <template>
<div <div
class="relative flex h-dvh items-center justify-center px-4 lg:max-w-none lg:px-0" class="relative flex h-dvh items-center justify-center bg-[url('/rssa-login-page.jpg')] px-4 lg:max-w-none lg:px-0"
:class="{ 'flex-row-reverse': reverse }" :class="{ 'flex-row-reverse': reverse }"
> >
<div class="bg-muted relative hidden h-full flex-1 flex-col p-10 text-white lg:flex dark:border-r"> <div class="bg-muted relative hidden h-full flex-1 flex-col p-10 text-white lg:flex dark:border-r">
+22 -21
View File
@@ -1,28 +1,29 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PrimitiveProps } from 'radix-vue' import type { PrimitiveProps } from "reka-ui"
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from "vue"
import type { ButtonVariants } from '.' import type { ButtonVariants } from "."
import { cn } from '@/lib/utils' import { Primitive } from "reka-ui"
import { Primitive } from 'radix-vue' import { cn } from '~/lib/utils'
import { buttonVariants } from '.' import { buttonVariants } from "."
interface Props extends PrimitiveProps { interface Props extends PrimitiveProps {
variant?: ButtonVariants['variant'] variant?: ButtonVariants["variant"]
size?: ButtonVariants['size'] size?: ButtonVariants["size"]
class?: HTMLAttributes['class'] class?: HTMLAttributes["class"]
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
as: 'button', as: "button",
}) })
</script> </script>
<template> <template>
<Primitive <Primitive
:as="as" data-slot="button"
:as-child="asChild" :as="as"
:class="cn(buttonVariants({ variant, size }), props.class)" :as-child="asChild"
> :class="cn(buttonVariants({ variant, size }), props.class)"
<slot /> >
</Primitive> <slot />
</template> </Primitive>
</template>
+18 -17
View File
@@ -1,34 +1,35 @@
import type { VariantProps } from 'class-variance-authority' import type { VariantProps } from "class-variance-authority"
import { cva } from 'class-variance-authority' import { cva } from "class-variance-authority"
export { default as Button } from './Button.vue' export { default as Button } from "./Button.vue"
export const buttonVariants = cva( export const buttonVariants = cva(
'inline-flex items-center justify-center 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', "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
{ {
variants: { variants: {
variant: { variant: {
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90', default:
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
destructive: destructive:
'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline: outline:
'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground', "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
secondary: secondary:
'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
ghost: 'hover:bg-accent hover:text-accent-foreground', ghost:
link: 'text-primary underline-offset-4 hover:underline', "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline",
}, },
size: { size: {
default: 'h-9 px-4 py-2', default: "h-9 px-4 py-2 has-[>svg]:px-3",
xs: 'h-7 rounded px-2 text-xs', sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
sm: 'h-8 rounded-md px-3 text-xs', lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
lg: 'h-10 rounded-md px-8', icon: "size-9",
icon: 'h-9 w-9',
}, },
}, },
defaultVariants: { defaultVariants: {
variant: 'default', variant: "default",
size: 'default', size: "default",
}, },
}, },
) )
+20
View File
@@ -0,0 +1,20 @@
{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "new-york",
"typescript": true,
"tailwind": {
"config": "",
"css": "app/assets/css/tailwind.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "~/components/pub",
"composables": "~/composables",
"utils": "~/lib/utils",
"ui": "~/components/pub/ui",
"lib": "~/lib"
},
"iconLibrary": "lucide"
}
+2 -1
View File
@@ -20,7 +20,8 @@
"@unovis/vue": "^1.5.1", "@unovis/vue": "^1.5.1",
"embla-carousel": "^8.5.2", "embla-carousel": "^8.5.2",
"embla-carousel-vue": "^8.5.2", "embla-carousel-vue": "^8.5.2",
"h3": "^1.15.4" "h3": "^1.15.4",
"reka-ui": "^2.4.1"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^4.10.1", "@antfu/eslint-config": "^4.10.1",
+7868 -6483
View File
File diff suppressed because it is too large Load Diff
+7 -14
View File
@@ -1,18 +1,11 @@
{ {
// https://nuxt.com/docs/guide/concepts/typescript // https://nuxt.com/docs/guide/concepts/typescript
"files": [], "extends": "./.nuxt/tsconfig.json",
"references": [ "compilerOptions": {
{ "paths": {
"path": "./.nuxt/tsconfig.app.json" "~/*": [
}, "./app/*"
{ ]
"path": "./.nuxt/tsconfig.server.json"
},
{
"path": "./.nuxt/tsconfig.shared.json"
},
{
"path": "./.nuxt/tsconfig.node.json"
} }
] }
} }