generated from acdh-oeaw/template-app-nuxt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make the search form and app header responsive for mobile
- Loading branch information
1 parent
bf5f778
commit 3100912
Showing
14 changed files
with
269 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts" setup> | ||
import { useForwardPropsEmits } from "radix-vue"; | ||
import type { DrawerRoot, DrawerRootEmits, DrawerRootProps } from "vaul-vue"; | ||
const props = withDefaults(defineProps<DrawerRootProps>(), { | ||
shouldScaleBackground: true, | ||
}); | ||
const emits = defineEmits<DrawerRootEmits>(); | ||
const forwarded = useForwardPropsEmits(props, emits); | ||
</script> | ||
|
||
<template> | ||
<DrawerRoot v-bind="forwarded"> | ||
<slot /> | ||
</DrawerRoot> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script lang="ts" setup> | ||
import { type DialogContentEmits, type DialogContentProps, useForwardPropsEmits } from "radix-vue"; | ||
import { DrawerContent, DrawerPortal } from "vaul-vue"; | ||
import type { HtmlHTMLAttributes } from "vue"; | ||
import { cn } from "@/utils/styles"; | ||
import DrawerOverlay from "./DrawerOverlay.vue"; | ||
const props = defineProps<DialogContentProps & { class?: HtmlHTMLAttributes["class"] }>(); | ||
const emits = defineEmits<DialogContentEmits>(); | ||
const forwarded = useForwardPropsEmits(props, emits); | ||
</script> | ||
|
||
<template> | ||
<DrawerPortal> | ||
<DrawerOverlay /> | ||
<DrawerContent | ||
v-bind="forwarded" | ||
:class=" | ||
cn( | ||
'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-full pt-1.5 flex-col border bg-background', | ||
props.class, | ||
) | ||
" | ||
> | ||
<div class="mx-auto mb-1.5 h-1 w-[100px] bg-frisch-marine" /> | ||
<slot /> | ||
</DrawerContent> | ||
</DrawerPortal> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts" setup> | ||
import type { DrawerDescription, DrawerDescriptionProps } from "vaul-vue"; | ||
import { computed, type HtmlHTMLAttributes } from "vue"; | ||
import { cn } from "@/utils/styles"; | ||
const props = defineProps<DrawerDescriptionProps & { class?: HtmlHTMLAttributes["class"] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props; | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<DrawerDescription | ||
v-bind="delegatedProps" | ||
:class="cn('text-sm text-muted-foreground', props.class)" | ||
> | ||
<slot /> | ||
</DrawerDescription> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts" setup> | ||
import type { HtmlHTMLAttributes } from "vue"; | ||
import { cn } from "@/utils/styles"; | ||
const props = defineProps<{ | ||
class?: HtmlHTMLAttributes["class"]; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div :class="cn('mt-auto flex flex-col gap-2 p-4', props.class)"> | ||
<slot /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts" setup> | ||
import type { HtmlHTMLAttributes } from "vue"; | ||
import { cn } from "@/utils/styles"; | ||
const props = defineProps<{ | ||
class?: HtmlHTMLAttributes["class"]; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div :class="cn('grid gap-1.5 p-4 text-center sm:text-left', props.class)"> | ||
<slot /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts" setup> | ||
import type { DialogOverlayProps } from "radix-vue"; | ||
import { DrawerOverlay } from "vaul-vue"; | ||
import { computed, type HtmlHTMLAttributes } from "vue"; | ||
import { cn } from "@/utils/styles"; | ||
const props = defineProps<DialogOverlayProps & { class?: HtmlHTMLAttributes["class"] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props; | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<DrawerOverlay | ||
v-bind="delegatedProps" | ||
:class="cn('fixed inset-0 z-50 bg-frisch-indigo/40', props.class)" | ||
/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts" setup> | ||
import type { DrawerTitle, DrawerTitleProps } from "vaul-vue"; | ||
import { computed, type HtmlHTMLAttributes } from "vue"; | ||
import { cn } from "@/utils/styles"; | ||
const props = defineProps<DrawerTitleProps & { class?: HtmlHTMLAttributes["class"] }>(); | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props; | ||
return delegated; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<DrawerTitle | ||
v-bind="delegatedProps" | ||
:class="cn('text-lg font-semibold leading-none tracking-tight', props.class)" | ||
> | ||
<slot /> | ||
</DrawerTitle> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export { default as Drawer } from "./Drawer.vue"; | ||
export { default as DrawerContent } from "./DrawerContent.vue"; | ||
export { default as DrawerDescription } from "./DrawerDescription.vue"; | ||
export { default as DrawerFooter } from "./DrawerFooter.vue"; | ||
export { default as DrawerHeader } from "./DrawerHeader.vue"; | ||
export { default as DrawerOverlay } from "./DrawerOverlay.vue"; | ||
export { default as DrawerTitle } from "./DrawerTitle.vue"; | ||
export { DrawerClose, DrawerPortal, DrawerTrigger } from "vaul-vue"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.