{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shopping-carts-02",
  "type": "registry:component",
  "title": "Shopping Carts",
  "author": "Toby Belhome",
  "description": "Provide a seamless shopping experience with Tailwind CSS shopping cart sections. These layouts display selected products, quantities, prices, and total amounts clearly, making checkout effortless. Perfect for online stores and marketplaces aiming for modern, user-friendly, and conversion-optimized cart interfaces.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "button",
    "sheet",
    "tooltip"
  ],
  "files": [
    {
      "path": "examples/blocks/ecommerce/shopping-carts/02/cart-item.tsx",
      "content": "import Image from \"next/image\";\nimport { XIcon } from \"lucide-react\";\n\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue\n} from \"@/components/ui/select\";\nimport { Button } from \"@/components/ui/button\";\n\nimport { CartItem } from \"./type\";\n\nexport function CartListItem({ item }: { item: CartItem }) {\n  return (\n    <div key={item.id} className=\"flex items-start space-x-4\">\n      <div className=\"relative shrink-0\">\n        <Image\n          src={item.image}\n          className=\"aspect-square rounded-md object-cover\"\n          width={60}\n          height={60}\n          alt={item.title}\n          unoptimized\n        />\n      </div>\n\n      <div className=\"flex-1\">\n        <div className=\"flex justify-between\">\n          <div className=\"space-y-1\">\n            <h3 className=\"font-medium\">{item.title}</h3>\n            <span className=\"text-xs\">\n              {item.variant} | {item.size}\n            </span>\n            <p className=\"text-sm\">{item.price}</p>\n          </div>\n\n          <div className=\"flex flex-col space-x-4 sm:flex-row\">\n            <Select defaultValue={String(item.quantity)}>\n              <SelectTrigger>\n                <SelectValue placeholder=\"1\" />\n              </SelectTrigger>\n              <SelectContent>\n                <SelectItem value=\"1\">1</SelectItem>\n                <SelectItem value=\"2\">2</SelectItem>\n                <SelectItem value=\"3\">3</SelectItem>\n                <SelectItem value=\"4\">4</SelectItem>\n                <SelectItem value=\"5\">5</SelectItem>\n              </SelectContent>\n            </Select>\n\n            <Button variant=\"ghost\" size=\"icon\">\n              <XIcon size={18} />\n              <span className=\"sr-only\">Remove item</span>\n            </Button>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/shopping-carts/cart-item.tsx"
    },
    {
      "path": "examples/blocks/ecommerce/shopping-carts/02/data.ts",
      "content": "import { CartItem } from \"./type\";\n\nexport const cartItems: CartItem[] = [\n  {\n    id: 3,\n    title: \"Classic Hoodie\",\n    price: \"$45.00\",\n    variant: \"Black\",\n    size: \"Medium\",\n    quantity: 1,\n    image: \"/images/products/list1.png\",\n    in_stock: true\n  },\n  {\n    id: 4,\n    title: \"Denim Jacket\",\n    price: \"$80.00\",\n    variant: \"Blue\",\n    size: \"Large\",\n    quantity: 2,\n    image: \"/images/products/list2.png\",\n    in_stock: false\n  },\n  {\n    id: 5,\n    title: \"Slim Fit Jeans\",\n    price: \"$50.00\",\n    variant: \"Dark Wash\",\n    size: \"32\",\n    quantity: 1,\n    image: \"/images/products/list3.png\",\n    in_stock: true\n  }\n];\n",
      "type": "registry:component",
      "target": "components/shopping-carts/data.ts"
    },
    {
      "path": "examples/blocks/ecommerce/shopping-carts/02/page.tsx",
      "content": "\"use client\";\n\nimport React from \"react\";\nimport { Info, ShoppingCartIcon } from \"lucide-react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Sheet, SheetContent, SheetTrigger } from \"@/components/ui/sheet\";\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"@/components/ui/tooltip\";\n\nimport { cartItems } from \"./data\";\nimport { CartListItem } from \"./cart-item\";\n\nexport default function ShoppingCartSheet() {\n  const [isOpen, setIsOpen] = React.useState(true);\n\n  return (\n    <div className=\"flex h-180 items-center justify-center\">\n      <Sheet open={isOpen} onOpenChange={setIsOpen}>\n        <SheetTrigger asChild>\n          <div className=\"text-center\">\n            <Button variant=\"outline\" size=\"icon\" className=\"relative\">\n              <ShoppingCartIcon />\n              <span className=\"bg-primary text-primary-foreground absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full text-xs\">\n                3\n              </span>\n            </Button>\n          </div>\n        </SheetTrigger>\n        <SheetContent side=\"right\" className=\"flex w-full flex-col\">\n          <div className=\"border-b p-4\">\n            <h3 className=\"font-bold lg:text-lg\">Shopping Cart</h3>\n          </div>\n          <div className=\"grow overflow-y-auto p-4 pt-0\">\n            <div className=\"divide-y *:py-4\">\n              {cartItems.map((item, key) => (\n                <CartListItem key={key} item={item} />\n              ))}\n            </div>\n          </div>\n\n          {/* Order Summary */}\n          <div className=\"bg-muted/50 flex flex-col space-y-6 rounded-lg p-6\">\n            <div className=\"space-y-4\">\n              <h2 className=\"font-semibold\">Order summary</h2>\n\n              <div className=\"flex justify-between text-sm\">\n                <p>Subtotal</p>\n                <p className=\"font-medium\">$255.00</p>\n              </div>\n\n              <div className=\"flex items-center justify-between text-sm\">\n                <div className=\"flex items-center\">\n                  <p>Shipping estimate</p>\n                  <TooltipProvider>\n                    <Tooltip>\n                      <TooltipTrigger>\n                        <Info className=\"text-muted-foreground ml-1 size-3\" />\n                      </TooltipTrigger>\n                      <TooltipContent>Delivery in 10 days is planned.</TooltipContent>\n                    </Tooltip>\n                  </TooltipProvider>\n                </div>\n                <p className=\"font-medium\">$5.00</p>\n              </div>\n\n              <div className=\"flex items-center justify-between text-sm\">\n                <div className=\"flex items-center\">\n                  <p>Tax estimate</p>\n                  <TooltipProvider>\n                    <Tooltip>\n                      <TooltipTrigger>\n                        <Info className=\"text-muted-foreground ml-1 size-3\" />\n                      </TooltipTrigger>\n                      <TooltipContent>There is a country specific taxation system.</TooltipContent>\n                    </Tooltip>\n                  </TooltipProvider>\n                </div>\n                <p className=\"font-medium\">$4.50</p>\n              </div>\n\n              <div className=\"flex justify-between border-t border-gray-200 pt-4 text-sm font-medium\">\n                <p>Order total</p>\n                <p>$264.50</p>\n              </div>\n            </div>\n\n            <Button className=\"w-full\">Checkout</Button>\n          </div>\n        </SheetContent>\n      </Sheet>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/shopping-carts/shopping-carts.tsx"
    },
    {
      "path": "examples/blocks/ecommerce/shopping-carts/02/type.ts",
      "content": "export type CartItem = {\n  id: number,\n  title: string,\n  price: string,\n  variant: string,\n  size: string,\n  quantity: number,\n  image: string,\n  in_stock: boolean,\n}\n\n",
      "type": "registry:component",
      "target": "components/shopping-carts/type.ts"
    }
  ],
  "meta": {
    "isPro": true
  }
}