- 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)
39 lines
787 B
Vue
39 lines
787 B
Vue
<script setup lang="ts">
|
|
import { type HTMLAttributes, computed } from 'vue'
|
|
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<SeparatorProps>(),
|
|
{
|
|
orientation: 'horizontal',
|
|
decorative: true,
|
|
}
|
|
)
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props
|
|
|
|
return delegated
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<SeparatorPrimitive
|
|
v-bind="delegatedProps"
|
|
:class="
|
|
cn(
|
|
'shrink-0 bg-border',
|
|
props.orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
|
|
props.class
|
|
)
|
|
"
|
|
/>
|
|
</template>
|