From bea6c70fb31b3b53203ae1ea01ca6a5c7a8c07cd Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 17 Apr 2026 21:18:47 +0000 Subject: [PATCH] Switch to version 2: added registry/components/ProductCardThree.json --- registry/components/ProductCardThree.json | 114 ++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 registry/components/ProductCardThree.json diff --git a/registry/components/ProductCardThree.json b/registry/components/ProductCardThree.json new file mode 100644 index 0000000..bfa6b72 --- /dev/null +++ b/registry/components/ProductCardThree.json @@ -0,0 +1,114 @@ +{ + "name": "ProductCardThree", + "description": "E-commerce product card with quantity selector and add-to-cart price button.", + "details": "Use for shopping cart or e-commerce flows where users add items directly. Layout: Image (top) → Product Name → Quantity Controls (- button, number, + button) + Price Button (styled CTA). The quantity controls let users select amount before adding to cart. Price is displayed inside a themed button (from ThemeProvider). Best for checkout flows, quick-add interfaces, or when quantity selection is essential before purchase. Each card has favorite button overlay on image and image scales 105% on hover. Does NOT show: brand name, ratings, arrow icon.", + "constraints": { + "textRules": { + "title": { + "required": true, + "example": "Shop Now", + "minChars": 2, + "maxChars": 35 + }, + "description": { + "required": true, + "example": "Add your favorite items to cart", + "minChars": 5, + "maxChars": 250 + }, + "tag": { + "required": false, + "example": "Limited Stock", + "minChars": 2, + "maxChars": 30 + } + }, + "productCardRules": { + "id": { + "required": true, + "example": "1", + "minChars": 1, + "maxChars": 20 + }, + "name": { + "required": true, + "example": "TIMBUK2 Classic Messenger Bag", + "minChars": 2, + "maxChars": 50 + }, + "price": { + "required": true, + "example": "$119.00", + "minChars": 1, + "maxChars": 20 + }, + "initialQuantity": { + "required": false, + "example": 1, + "note": "Default quantity value (default: 1)" + } + }, + "mediaRules": { + "imageSrc": { + "required": true, + "example": "/product.jpg", + "note": "Supports external URLs with unoptimized prop" + }, + "imageAlt": { + "required": false, + "example": "Product name", + "note": "Empty string marks image as decorative (aria-hidden)" + } + } + }, + "propsSchema": { + "products": "Array<{ id: string, name: string, price: string, imageSrc: string, imageAlt?: string, onFavorite?: () => void, onProductClick?: () => void, onQuantityChange?: (quantity: number) => void, isFavorited?: boolean, initialQuantity?: number, priceButtonProps?: Partial> }>", + "carouselMode?": "'auto' | 'buttons' (default: 'buttons')", + "gridVariant": "'uniform-all-items-equal' | 'bento-grid' | 'bento-grid-inverted' | 'two-columns-alternating-heights' | 'asymmetric-60-wide-40-narrow' | 'three-columns-all-equal-width' | 'four-items-2x2-equal-grid' | 'one-large-right-three-stacked-left' | 'one-large-left-three-stacked-right' (required)", + "animationType": "'none' | 'opacity' | 'slide-up' | 'scale-rotate' | 'blur-reveal' (required - controls GSAP scroll animations with stagger effect)", + "uniformGridCustomHeightClasses?": "string (default: 'min-h-95 2xl:min-h-105')", + "title": "string", + "titleSegments?": "Array<{ type: 'text', content: string } | { type: 'image', src: string, alt?: string }> - For inline images in title", + "description": "string", + "tag?": "string", + "tagIcon?": "LucideIcon", + "tagAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'", + "buttons?": "Array<{text: string, onClick?: () => void, href?: string}>", + "buttonAnimation?": "'none' | 'opacity' | 'slide-up' | 'blur-reveal'", + "textboxLayout": "'default' | 'split' | 'split-actions' | 'split-description' | 'inline-image' (required - 'inline-image' uses titleSegments for rich text with images)", + "useInvertedBackground": "boolean", + "ariaLabel?": "string (default: 'Product section')", + "className?": "string", + "containerClassName?": "string", + "cardClassName?": "string", + "imageClassName?": "string", + "textBoxTitleClassName?": "string", + "textBoxTitleImageWrapperClassName?": "string - For styling image wrapper in inline-image layout", + "textBoxTitleImageClassName?": "string - For styling images in inline-image layout", + "textBoxDescriptionClassName?": "string", + "cardNameClassName?": "string", + "quantityControlsClassName?": "string", + "gridClassName?": "string", + "carouselClassName?": "string", + "controlsClassName?": "string", + "textBoxClassName?": "string", + "textBoxTagClassName?": "string", + "textBoxButtonContainerClassName?": "string", + "textBoxButtonClassName?": "string", + "textBoxButtonTextClassName?": "string" + }, + "usageExample": " window.open('https://example.com', '_blank'), onQuantityChange: (qty) => console.log(qty) }]} title=\"Shop Now\" description=\"Explore our curated collection\" textboxLayout=\"default\" animationType=\"slide-up\" useInvertedBackground={false} />", + "do": [ + "Use for product catalogs", + "Use for e-commerce", + "Requires products[]", + "Requires titleSegments?[]", + "Requires buttons?[]" + ], + "dont": [], + "editRules": { + "textOnly": true, + "layoutLocked": true, + "styleLocked": true + } +}