diff --git a/package.json b/package.json index 482316c..d306d8e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dependencies": { "@lucide/vue": "^1.16.0", "@vee-validate/zod": "^4.15.1", + "@vueuse/core": "^14.3.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "pinia": "^3.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a409bb..d9abe51 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@vee-validate/zod': specifier: ^4.15.1 version: 4.15.1(vue@3.5.34(typescript@6.0.3))(zod@3.25.76) + '@vueuse/core': + specifier: ^14.3.0 + version: 14.3.0(vue@3.5.34(typescript@6.0.3)) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 diff --git a/src/components/SiteHeader.vue b/src/components/SiteHeader.vue index 285caf1..4498007 100644 --- a/src/components/SiteHeader.vue +++ b/src/components/SiteHeader.vue @@ -1,15 +1,30 @@ - + @@ -110,38 +101,47 @@ onUnmounted(() => { - - - - {{ g.label }} - ▾ - - - - + + + + - {{ i.label }} - - - - - - {{ t('nav.marketplace') }} - + {{ g.label }} + + + + + + + {{ i.label }} + + + + + + + + + + {{ t('nav.marketplace') }} + + + + + { > {{ locale === 'fr' ? 'EN' : 'FR' }} - - - - - - - - - - - - - {{ g.label }} - - - {{ i.label }} - - - {{ t('nav.marketplace') }} - - - {{ locale === 'fr' ? 'Switch to English' : 'Passer en français' }} - + + + + + + + + + + + + + {{ t('nav.menu') }} + + + + + + {{ g.label }} + + + {{ i.label }} + + + + {{ t('nav.marketplace') }} + + + {{ locale === 'fr' ? 'Switch to English' : 'Passer en français' }} + + + + diff --git a/src/components/ui/alert/Alert.vue b/src/components/ui/alert/Alert.vue new file mode 100644 index 0000000..9feea31 --- /dev/null +++ b/src/components/ui/alert/Alert.vue @@ -0,0 +1,17 @@ + + + + + + + diff --git a/src/components/ui/alert/AlertDescription.vue b/src/components/ui/alert/AlertDescription.vue new file mode 100644 index 0000000..afeaa01 --- /dev/null +++ b/src/components/ui/alert/AlertDescription.vue @@ -0,0 +1,14 @@ + + + + + + + diff --git a/src/components/ui/alert/AlertTitle.vue b/src/components/ui/alert/AlertTitle.vue new file mode 100644 index 0000000..1f98d11 --- /dev/null +++ b/src/components/ui/alert/AlertTitle.vue @@ -0,0 +1,14 @@ + + + + + + + diff --git a/src/components/ui/alert/index.ts b/src/components/ui/alert/index.ts new file mode 100644 index 0000000..1106fd0 --- /dev/null +++ b/src/components/ui/alert/index.ts @@ -0,0 +1,24 @@ +import type { VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" + +export { default as Alert } from "./Alert.vue" +export { default as AlertDescription } from "./AlertDescription.vue" +export { default as AlertTitle } from "./AlertTitle.vue" + +export const alertVariants = cva( + "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", + { + variants: { + variant: { + default: "bg-background text-foreground", + destructive: + "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +) + +export type AlertVariants = VariantProps diff --git a/src/components/ui/badge/Badge.vue b/src/components/ui/badge/Badge.vue new file mode 100644 index 0000000..0374568 --- /dev/null +++ b/src/components/ui/badge/Badge.vue @@ -0,0 +1,17 @@ + + + + + + + diff --git a/src/components/ui/badge/index.ts b/src/components/ui/badge/index.ts new file mode 100644 index 0000000..98a768d --- /dev/null +++ b/src/components/ui/badge/index.ts @@ -0,0 +1,26 @@ +import type { VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" + +export { default as Badge } from "./Badge.vue" + +export const badgeVariants = cva( + "inline-flex gap-1 items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground hover:bg-primary/80", + secondary: + "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", + destructive: + "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80", + outline: "text-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +) + +export type BadgeVariants = VariantProps diff --git a/src/components/ui/card/Card.vue b/src/components/ui/card/Card.vue new file mode 100644 index 0000000..db8c07a --- /dev/null +++ b/src/components/ui/card/Card.vue @@ -0,0 +1,21 @@ + + + + + + + diff --git a/src/components/ui/card/CardContent.vue b/src/components/ui/card/CardContent.vue new file mode 100644 index 0000000..4c4dfc7 --- /dev/null +++ b/src/components/ui/card/CardContent.vue @@ -0,0 +1,14 @@ + + + + + + + diff --git a/src/components/ui/card/CardDescription.vue b/src/components/ui/card/CardDescription.vue new file mode 100644 index 0000000..02bddba --- /dev/null +++ b/src/components/ui/card/CardDescription.vue @@ -0,0 +1,14 @@ + + + + + + + diff --git a/src/components/ui/card/CardFooter.vue b/src/components/ui/card/CardFooter.vue new file mode 100644 index 0000000..fad3928 --- /dev/null +++ b/src/components/ui/card/CardFooter.vue @@ -0,0 +1,14 @@ + + + + + + + diff --git a/src/components/ui/card/CardHeader.vue b/src/components/ui/card/CardHeader.vue new file mode 100644 index 0000000..119700c --- /dev/null +++ b/src/components/ui/card/CardHeader.vue @@ -0,0 +1,14 @@ + + + + + + + diff --git a/src/components/ui/card/CardTitle.vue b/src/components/ui/card/CardTitle.vue new file mode 100644 index 0000000..d0c0ea7 --- /dev/null +++ b/src/components/ui/card/CardTitle.vue @@ -0,0 +1,18 @@ + + + + + + + diff --git a/src/components/ui/card/index.ts b/src/components/ui/card/index.ts new file mode 100644 index 0000000..e5c7cb2 --- /dev/null +++ b/src/components/ui/card/index.ts @@ -0,0 +1,6 @@ +export { default as Card } from "./Card.vue" +export { default as CardContent } from "./CardContent.vue" +export { default as CardDescription } from "./CardDescription.vue" +export { default as CardFooter } from "./CardFooter.vue" +export { default as CardHeader } from "./CardHeader.vue" +export { default as CardTitle } from "./CardTitle.vue" diff --git a/src/components/ui/navigation-menu/NavigationMenu.vue b/src/components/ui/navigation-menu/NavigationMenu.vue new file mode 100644 index 0000000..48d0931 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenu.vue @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuContent.vue b/src/components/ui/navigation-menu/NavigationMenuContent.vue new file mode 100644 index 0000000..35729f9 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuContent.vue @@ -0,0 +1,30 @@ + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuIndicator.vue b/src/components/ui/navigation-menu/NavigationMenuIndicator.vue new file mode 100644 index 0000000..80bfdf4 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuIndicator.vue @@ -0,0 +1,22 @@ + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuItem.vue b/src/components/ui/navigation-menu/NavigationMenuItem.vue new file mode 100644 index 0000000..0d3b9c7 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuItem.vue @@ -0,0 +1,12 @@ + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuLink.vue b/src/components/ui/navigation-menu/NavigationMenuLink.vue new file mode 100644 index 0000000..e8240b9 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuLink.vue @@ -0,0 +1,18 @@ + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuList.vue b/src/components/ui/navigation-menu/NavigationMenuList.vue new file mode 100644 index 0000000..4c175f0 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuList.vue @@ -0,0 +1,27 @@ + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuTrigger.vue b/src/components/ui/navigation-menu/NavigationMenuTrigger.vue new file mode 100644 index 0000000..4c138ba --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuTrigger.vue @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/src/components/ui/navigation-menu/NavigationMenuViewport.vue b/src/components/ui/navigation-menu/NavigationMenuViewport.vue new file mode 100644 index 0000000..9618846 --- /dev/null +++ b/src/components/ui/navigation-menu/NavigationMenuViewport.vue @@ -0,0 +1,30 @@ + + + + + + + diff --git a/src/components/ui/navigation-menu/index.ts b/src/components/ui/navigation-menu/index.ts new file mode 100644 index 0000000..e7efa86 --- /dev/null +++ b/src/components/ui/navigation-menu/index.ts @@ -0,0 +1,14 @@ +import { cva } from "class-variance-authority" + +export { default as NavigationMenu } from "./NavigationMenu.vue" +export { default as NavigationMenuContent } from "./NavigationMenuContent.vue" +export { default as NavigationMenuIndicator } from "./NavigationMenuIndicator.vue" +export { default as NavigationMenuItem } from "./NavigationMenuItem.vue" +export { default as NavigationMenuLink } from "./NavigationMenuLink.vue" +export { default as NavigationMenuList } from "./NavigationMenuList.vue" +export { default as NavigationMenuTrigger } from "./NavigationMenuTrigger.vue" +export { default as NavigationMenuViewport } from "./NavigationMenuViewport.vue" + +export const navigationMenuTriggerStyle = cva( + "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50", +) diff --git a/src/components/ui/sheet/Sheet.vue b/src/components/ui/sheet/Sheet.vue new file mode 100644 index 0000000..47b0968 --- /dev/null +++ b/src/components/ui/sheet/Sheet.vue @@ -0,0 +1,15 @@ + + + + + + + diff --git a/src/components/ui/sheet/SheetClose.vue b/src/components/ui/sheet/SheetClose.vue new file mode 100644 index 0000000..0295976 --- /dev/null +++ b/src/components/ui/sheet/SheetClose.vue @@ -0,0 +1,12 @@ + + + + + + + diff --git a/src/components/ui/sheet/SheetContent.vue b/src/components/ui/sheet/SheetContent.vue new file mode 100644 index 0000000..59e668c --- /dev/null +++ b/src/components/ui/sheet/SheetContent.vue @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + diff --git a/src/components/ui/sheet/SheetDescription.vue b/src/components/ui/sheet/SheetDescription.vue new file mode 100644 index 0000000..455c2f4 --- /dev/null +++ b/src/components/ui/sheet/SheetDescription.vue @@ -0,0 +1,20 @@ + + + + + + + diff --git a/src/components/ui/sheet/SheetFooter.vue b/src/components/ui/sheet/SheetFooter.vue new file mode 100644 index 0000000..5f481e5 --- /dev/null +++ b/src/components/ui/sheet/SheetFooter.vue @@ -0,0 +1,19 @@ + + + + + + + diff --git a/src/components/ui/sheet/SheetHeader.vue b/src/components/ui/sheet/SheetHeader.vue new file mode 100644 index 0000000..f97d24a --- /dev/null +++ b/src/components/ui/sheet/SheetHeader.vue @@ -0,0 +1,16 @@ + + + + + + + diff --git a/src/components/ui/sheet/SheetTitle.vue b/src/components/ui/sheet/SheetTitle.vue new file mode 100644 index 0000000..5870787 --- /dev/null +++ b/src/components/ui/sheet/SheetTitle.vue @@ -0,0 +1,20 @@ + + + + + + + diff --git a/src/components/ui/sheet/SheetTrigger.vue b/src/components/ui/sheet/SheetTrigger.vue new file mode 100644 index 0000000..a4fc3ee --- /dev/null +++ b/src/components/ui/sheet/SheetTrigger.vue @@ -0,0 +1,12 @@ + + + + + + + diff --git a/src/components/ui/sheet/index.ts b/src/components/ui/sheet/index.ts new file mode 100644 index 0000000..a370633 --- /dev/null +++ b/src/components/ui/sheet/index.ts @@ -0,0 +1,32 @@ +import type { VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" + +export { default as Sheet } from "./Sheet.vue" +export { default as SheetClose } from "./SheetClose.vue" +export { default as SheetContent } from "./SheetContent.vue" +export { default as SheetDescription } from "./SheetDescription.vue" +export { default as SheetFooter } from "./SheetFooter.vue" +export { default as SheetHeader } from "./SheetHeader.vue" +export { default as SheetTitle } from "./SheetTitle.vue" +export { default as SheetTrigger } from "./SheetTrigger.vue" + +export const sheetVariants = cva( + "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", + { + variants: { + side: { + top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", + bottom: + "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", + left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", + right: + "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", + }, + }, + defaultVariants: { + side: "right", + }, + }, +) + +export type SheetVariants = VariantProps diff --git a/src/views/AccommodationView.vue b/src/views/AccommodationView.vue index 73f1b8f..a84aad4 100644 --- a/src/views/AccommodationView.vue +++ b/src/views/AccommodationView.vue @@ -2,6 +2,8 @@ import { useI18n } from 'vue-i18n' import { RouterLink } from 'vue-router' import { Button } from '@/components/ui/button' +import { Card, CardContent } from '@/components/ui/card' +import { Badge } from '@/components/ui/badge' const { t, tm, rt } = useI18n() @@ -82,41 +84,35 @@ const exteriorItems = tm('accommodation.exterior.items') as string[] {{ t('accommodation.rooms.subtitle') }} - - - - - - {{ t(`accommodation.rooms.${room.key}.name`) }} - - - {{ - room.open - ? t('accommodation.statusOpen') - : t('accommodation.statusComingSoon') - }} - - - - {{ t(`accommodation.rooms.${room.key}.summary`) }} - - + + + + + + + {{ t(`accommodation.rooms.${room.key}.name`) }} + + + {{ + room.open + ? t('accommodation.statusOpen') + : t('accommodation.statusComingSoon') + }} + + + + {{ t(`accommodation.rooms.${room.key}.summary`) }} + + + @@ -131,27 +127,26 @@ const exteriorItems = tm('accommodation.exterior.items') as string[] {{ t('accommodation.cabins.subtitle') }} - - - - - {{ t(`accommodation.cabins.${cabin.key}`) }} - - - {{ t('accommodation.statusComingSoon') }} - - + + + + + + {{ t(`accommodation.cabins.${cabin.key}`) }} + + + {{ t('accommodation.statusComingSoon') }} + + + @@ -166,12 +161,10 @@ const exteriorItems = tm('accommodation.exterior.items') as string[] {{ t('accommodation.exterior.subtitle') }} - - {{ rt(item) }} + + + {{ rt(item) }} + diff --git a/src/views/ConceptView.vue b/src/views/ConceptView.vue index 50d04d6..d099c19 100644 --- a/src/views/ConceptView.vue +++ b/src/views/ConceptView.vue @@ -1,6 +1,7 @@
+ +
{{ t('accommodation.rooms.subtitle') }}
- {{ t(`accommodation.rooms.${room.key}.summary`) }} -
+ {{ t(`accommodation.rooms.${room.key}.summary`) }} +
{{ t('accommodation.cabins.subtitle') }}
{{ t('accommodation.exterior.subtitle') }}