Added auth functionality, initial work with views and field types

This commit is contained in:
Francisco Gaona
2025-12-22 03:31:55 +01:00
parent 859dca6c84
commit 0fe56c0e03
170 changed files with 11599 additions and 435 deletions

View File

@@ -0,0 +1,14 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>
<template>
<div :class="cn('relative flex w-full flex-col gap-2', props.class)">
<slot />
</div>
</template>

View File

@@ -0,0 +1,22 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
align?: 'start' | 'end' | 'center' | 'block-end'
class?: HTMLAttributes['class']
}>()
const alignClasses = {
start: 'justify-start',
end: 'justify-end',
center: 'justify-center',
'block-end': 'justify-end items-end',
}
</script>
<template>
<div :class="cn('flex flex-wrap items-center gap-2', alignClasses[props.align || 'start'], props.class)">
<slot />
</div>
</template>

View File

@@ -0,0 +1,28 @@
<script setup lang="ts">
import type { ButtonVariants } from '../button'
import { Button } from '../button'
import type { HTMLAttributes } from 'vue'
interface Props {
variant?: ButtonVariants['variant']
size?: ButtonVariants['size']
class?: HTMLAttributes['class']
disabled?: boolean
}
const props = withDefaults(defineProps<Props>(), {
variant: 'default',
size: 'default',
})
</script>
<template>
<Button
:variant="props.variant"
:size="props.size"
:class="props.class"
:disabled="props.disabled"
>
<slot />
</Button>
</template>

View File

@@ -0,0 +1,14 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
</script>
<template>
<span :class="cn('text-sm text-muted-foreground', props.class)">
<slot />
</span>
</template>

View File

@@ -0,0 +1,22 @@
<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
placeholder?: string
class?: HTMLAttributes['class']
}>()
const model = defineModel<string>()
</script>
<template>
<textarea
v-model="model"
:placeholder="props.placeholder"
:class="cn(
'flex min-h-[80px] w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none',
props.class
)"
/>
</template>

View File

@@ -0,0 +1,5 @@
export { default as InputGroup } from './InputGroup.vue'
export { default as InputGroupTextarea } from './InputGroupTextarea.vue'
export { default as InputGroupAddon } from './InputGroupAddon.vue'
export { default as InputGroupButton } from './InputGroupButton.vue'
export { default as InputGroupText } from './InputGroupText.vue'