Initial mock up of the app
This commit is contained in:
KM
2024-01-22 12:03:56 +01:00
commit 6e4dc5e9db
239 changed files with 32153 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<script setup>
import { TabsRoot, useForwardPropsEmits } from "radix-vue";
const props = defineProps({
defaultValue: { type: String, required: false },
orientation: { type: String, required: false },
dir: { type: String, required: false },
activationMode: { type: String, required: false },
modelValue: { type: String, required: false },
asChild: { type: Boolean, required: false },
as: { type: null, required: false },
});
const emits = defineEmits(["update:modelValue"]);
const forwarded = useForwardPropsEmits(props, emits);
</script>
<template>
<TabsRoot v-bind="forwarded">
<slot />
</TabsRoot>
</template>

View File

@@ -0,0 +1,26 @@
<script setup>
import { TabsContent } from "radix-vue";
import { cn } from "@/lib/utils";
const props = defineProps({
value: { type: String, required: true },
forceMount: { type: Boolean, required: false },
asChild: { type: Boolean, required: false },
as: { type: null, required: false },
class: { type: String, required: false },
});
</script>
<template>
<TabsContent
:class="
cn(
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
props.class
)
"
v-bind="props"
>
<slot />
</TabsContent>
</template>

View File

@@ -0,0 +1,25 @@
<script setup>
import { TabsList } from "radix-vue";
import { cn } from "@/lib/utils";
const props = defineProps({
loop: { type: Boolean, required: false },
asChild: { type: Boolean, required: false },
as: { type: null, required: false },
class: { type: String, required: false },
});
</script>
<template>
<TabsList
v-bind="props"
:class="
cn(
'gap-1 bg-inherit p-4 rounded-lg ',
props.class
)
"
>
<slot />
</TabsList>
</template>

View File

@@ -0,0 +1,26 @@
<script setup>
import { TabsTrigger } from "radix-vue";
import { cn } from "@/lib/utils";
const props = defineProps({
value: { type: String, required: true },
disabled: { type: Boolean, required: false },
asChild: { type: Boolean, required: false },
as: { type: null, required: false },
class: { type: String, required: false },
});
</script>
<template>
<TabsTrigger
v-bind="props"
:class="
cn(
'items-center justify-center whitespace-nowrap rounded-lg px-3 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=inactive]:hover:bg-zinc-900 data-[state=active]:bg-zinc-900 data-[state=active]:ring-emerald-600 ring- data-[state=active]:ring-1 py-2',
props.class
)
"
>
<slot />
</TabsTrigger>
</template>

View File

@@ -0,0 +1,4 @@
export { default as Tabs } from "./Tabs.vue";
export { default as TabsTrigger } from "./TabsTrigger.vue";
export { default as TabsList } from "./TabsList.vue";
export { default as TabsContent } from "./TabsContent.vue";