Implement shopping cart functionality with UI components and API integration

- Added CartItem, CartSummary, CartEmpty, CartSidebar, and CartSheet components for managing cart display and interactions.
- Integrated useCart and useCartUI composables for cart state management and UI control.
- Implemented API endpoints for cart operations, including fetching, adding, updating, and removing items.
- Enhanced user experience with loading states and notifications using vue-sonner for cart actions.
- Configured session management for guest and authenticated users, ensuring cart persistence across sessions.

This commit completes the shopping cart feature, enabling users to add items, view their cart, and proceed to checkout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
Bastian Masanek
2025-11-03 12:43:13 +01:00
parent 9d0e77fc98
commit b372e2cf78
44 changed files with 2209 additions and 123 deletions

View File

@@ -1,10 +1,16 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import { SeparatorRoot, type SeparatorRootProps } from 'reka-ui'
import { Separator as SeparatorPrimitive } from 'reka-ui'
import { cn } from '@/lib/utils'
interface SeparatorProps {
orientation?: 'horizontal' | 'vertical'
decorative?: boolean
class?: HTMLAttributes['class']
}
const props = withDefaults(
defineProps<SeparatorRootProps & { class?: HTMLAttributes['class'] }>(),
defineProps<SeparatorProps>(),
{
orientation: 'horizontal',
decorative: true,
@@ -19,7 +25,7 @@ const delegatedProps = computed(() => {
</script>
<template>
<SeparatorRoot
<SeparatorPrimitive
v-bind="delegatedProps"
:class="
cn(