@beyondcorp/beyond-ui 1.2.28 → 1.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Marketplace/AllProductsView.d.ts +8 -0
- package/dist/components/Marketplace/AllProductsView.js +185 -0
- package/dist/components/Marketplace/AllProductsView.js.map +1 -0
- package/dist/components/Marketplace/CheckoutCompact.d.ts +10 -0
- package/dist/components/Marketplace/CheckoutCompact.js +66 -0
- package/dist/components/Marketplace/CheckoutCompact.js.map +1 -0
- package/dist/components/Marketplace/CheckoutComponent.d.ts +8 -0
- package/dist/components/Marketplace/CheckoutComponent.js +123 -0
- package/dist/components/Marketplace/CheckoutComponent.js.map +1 -0
- package/dist/components/Marketplace/MarketplaceComponent.d.ts +8 -0
- package/dist/components/Marketplace/MarketplaceComponent.js +108 -0
- package/dist/components/Marketplace/MarketplaceComponent.js.map +1 -0
- package/dist/components/Marketplace/MarketplaceSidebar.d.ts +12 -0
- package/dist/components/Marketplace/MarketplaceSidebar.js +167 -0
- package/dist/components/Marketplace/MarketplaceSidebar.js.map +1 -0
- package/dist/components/Marketplace/SingleProductView.d.ts +9 -0
- package/dist/components/Marketplace/SingleProductView.js +52 -0
- package/dist/components/Marketplace/SingleProductView.js.map +1 -0
- package/dist/components/Marketplace/data/sampleData.d.ts +3 -0
- package/dist/components/Marketplace/data/sampleData.js +153 -0
- package/dist/components/Marketplace/data/sampleData.js.map +1 -0
- package/dist/components/Marketplace/index.d.ts +7 -0
- package/dist/components/Marketplace/types.d.ts +82 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +6 -5
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Filter, X, Grid2x2, ChevronDown, ChevronRight, Tag, Star, Store, Sliders } from 'lucide-react';
|
|
4
|
+
import { Button } from '../Button/Button.js';
|
|
5
|
+
import { Input } from '../Input/Input.js';
|
|
6
|
+
import { Card, CardContent, CardHeader, CardTitle } from '../Card/Card.js';
|
|
7
|
+
import { Badge } from '../Badge/Badge.js';
|
|
8
|
+
import { Checkbox } from '../Checkbox/Checkbox.js';
|
|
9
|
+
import { cn } from '../../utils/cn.js';
|
|
10
|
+
|
|
11
|
+
const categoryTree = [
|
|
12
|
+
{
|
|
13
|
+
id: 'electronics',
|
|
14
|
+
name: 'Electronics',
|
|
15
|
+
count: 156,
|
|
16
|
+
children: [
|
|
17
|
+
{ id: 'smartphones', name: 'Smartphones', count: 45 },
|
|
18
|
+
{ id: 'laptops', name: 'Laptops', count: 32 },
|
|
19
|
+
{ id: 'headphones', name: 'Headphones', count: 28 },
|
|
20
|
+
{ id: 'cameras', name: 'Cameras', count: 21 },
|
|
21
|
+
{ id: 'accessories', name: 'Accessories', count: 30 },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'clothing',
|
|
26
|
+
name: 'Clothing & Fashion',
|
|
27
|
+
count: 234,
|
|
28
|
+
children: [
|
|
29
|
+
{ id: 'mens', name: "Men's Clothing", count: 89 },
|
|
30
|
+
{ id: 'womens', name: "Women's Clothing", count: 112 },
|
|
31
|
+
{ id: 'shoes', name: 'Shoes', count: 67 },
|
|
32
|
+
{ id: 'accessories-fashion', name: 'Fashion Accessories', count: 45 },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'home',
|
|
37
|
+
name: 'Home & Garden',
|
|
38
|
+
count: 178,
|
|
39
|
+
children: [
|
|
40
|
+
{ id: 'furniture', name: 'Furniture', count: 56 },
|
|
41
|
+
{ id: 'decor', name: 'Home Decor', count: 43 },
|
|
42
|
+
{ id: 'kitchen', name: 'Kitchen & Dining', count: 38 },
|
|
43
|
+
{ id: 'garden', name: 'Garden & Outdoor', count: 41 },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'sports',
|
|
48
|
+
name: 'Sports & Outdoors',
|
|
49
|
+
count: 145,
|
|
50
|
+
children: [
|
|
51
|
+
{ id: 'fitness', name: 'Fitness Equipment', count: 34 },
|
|
52
|
+
{ id: 'outdoor', name: 'Outdoor Recreation', count: 52 },
|
|
53
|
+
{ id: 'sports-apparel', name: 'Sports Apparel', count: 59 },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
const brands = [
|
|
58
|
+
{ name: 'Apple', count: 45 },
|
|
59
|
+
{ name: 'Samsung', count: 38 },
|
|
60
|
+
{ name: 'Nike', count: 67 },
|
|
61
|
+
{ name: 'Adidas', count: 54 },
|
|
62
|
+
{ name: 'Sony', count: 32 },
|
|
63
|
+
{ name: 'LG', count: 28 },
|
|
64
|
+
{ name: 'Canon', count: 21 },
|
|
65
|
+
{ name: 'Dell', count: 19 },
|
|
66
|
+
];
|
|
67
|
+
const vendors = [
|
|
68
|
+
{ name: 'TechWorld Store', count: 89, rating: 4.8 },
|
|
69
|
+
{ name: 'Fashion Hub', count: 76, rating: 4.6 },
|
|
70
|
+
{ name: 'Home Essentials', count: 65, rating: 4.7 },
|
|
71
|
+
{ name: 'Sports Central', count: 54, rating: 4.5 },
|
|
72
|
+
{ name: 'Electronics Plus', count: 43, rating: 4.9 },
|
|
73
|
+
];
|
|
74
|
+
const MarketplaceSidebar = ({ filters, onFiltersChange, onClearFilters, className = '', collapsed = false, onToggleCollapse, }) => {
|
|
75
|
+
const [expandedCategories, setExpandedCategories] = useState(new Set(['electronics']));
|
|
76
|
+
const [expandedSections, setExpandedSections] = useState(new Set(['categories', 'price', 'rating', 'brands']));
|
|
77
|
+
const toggleCategory = (categoryId) => {
|
|
78
|
+
setExpandedCategories(prev => {
|
|
79
|
+
const newSet = new Set(prev);
|
|
80
|
+
if (newSet.has(categoryId)) {
|
|
81
|
+
newSet.delete(categoryId);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
newSet.add(categoryId);
|
|
85
|
+
}
|
|
86
|
+
return newSet;
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
const toggleSection = (sectionId) => {
|
|
90
|
+
setExpandedSections(prev => {
|
|
91
|
+
const newSet = new Set(prev);
|
|
92
|
+
if (newSet.has(sectionId)) {
|
|
93
|
+
newSet.delete(sectionId);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
newSet.add(sectionId);
|
|
97
|
+
}
|
|
98
|
+
return newSet;
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
const handleFilterChange = (filterType, value) => {
|
|
102
|
+
onFiltersChange({
|
|
103
|
+
...filters,
|
|
104
|
+
[filterType]: value,
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const getActiveFiltersCount = () => {
|
|
108
|
+
let count = 0;
|
|
109
|
+
if (filters.categories.length > 0)
|
|
110
|
+
count += filters.categories.length;
|
|
111
|
+
if (filters.brands.length > 0)
|
|
112
|
+
count += filters.brands.length;
|
|
113
|
+
if (filters.vendors.length > 0)
|
|
114
|
+
count += filters.vendors.length;
|
|
115
|
+
if (filters.rating > 0)
|
|
116
|
+
count += 1;
|
|
117
|
+
if (filters.inStock)
|
|
118
|
+
count += 1;
|
|
119
|
+
if (filters.priceRange[0] > 0 || filters.priceRange[1] < 1000)
|
|
120
|
+
count += 1;
|
|
121
|
+
return count;
|
|
122
|
+
};
|
|
123
|
+
const renderCategoryTree = (categories, level = 0) => {
|
|
124
|
+
return categories.map((category) => (jsxs("div", { className: cn('', level > 0 && 'ml-4'), children: [jsxs("div", { className: "flex items-center justify-between py-1", children: [jsxs("label", { className: "flex items-center space-x-2 flex-1 cursor-pointer", children: [jsx(Checkbox, { checked: filters.categories.includes(category.id), onChange: (e) => {
|
|
125
|
+
const newCategories = e.target.checked
|
|
126
|
+
? [...filters.categories, category.id]
|
|
127
|
+
: filters.categories.filter(c => c !== category.id);
|
|
128
|
+
handleFilterChange('categories', newCategories);
|
|
129
|
+
} }), jsx("span", { className: "text-sm text-gray-700 flex-1", children: category.name }), jsxs("span", { className: "text-xs text-gray-500", children: ["(", category.count, ")"] })] }), category.children && (jsx("button", { onClick: () => toggleCategory(category.id), className: "p-1 hover:bg-gray-100 rounded", children: expandedCategories.has(category.id) ? (jsx(ChevronDown, { className: "h-3 w-3 text-gray-400" })) : (jsx(ChevronRight, { className: "h-3 w-3 text-gray-400" })) }))] }), category.children && expandedCategories.has(category.id) && (jsx("div", { className: "mt-1", children: renderCategoryTree(category.children, level + 1) }))] }, category.id)));
|
|
130
|
+
};
|
|
131
|
+
if (collapsed) {
|
|
132
|
+
return (jsx("div", { className: cn('w-16 flex-shrink-0', className), children: jsx(Card, { className: "sticky top-4", children: jsx(CardContent, { className: "p-4", children: jsxs("div", { className: "flex flex-col items-center space-y-4", children: [jsx(Button, { variant: "ghost", size: "sm", onClick: onToggleCollapse, className: "w-full", children: jsx(Filter, { className: "h-5 w-5" }) }), getActiveFiltersCount() > 0 && (jsx(Badge, { variant: "default", className: "text-xs", children: getActiveFiltersCount() }))] }) }) }) }));
|
|
133
|
+
}
|
|
134
|
+
return (jsx("div", { className: cn('w-80 flex-shrink-0', className), children: jsxs(Card, { className: "sticky top-4", children: [jsx(CardHeader, { className: "pb-3", children: jsxs("div", { className: "flex items-center justify-between", children: [jsxs(CardTitle, { className: "flex items-center text-lg", children: [jsx(Filter, { className: "h-5 w-5 mr-2" }), "Filters", getActiveFiltersCount() > 0 && (jsx(Badge, { variant: "default", className: "ml-2", children: getActiveFiltersCount() }))] }), jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Button, { variant: "ghost", size: "sm", onClick: onClearFilters, children: "Clear All" }), onToggleCollapse && (jsx(Button, { variant: "ghost", size: "sm", onClick: onToggleCollapse, children: jsx(X, { className: "h-4 w-4" }) }))] })] }) }), jsxs(CardContent, { className: "space-y-6 max-h-[calc(100vh-200px)] overflow-y-auto", children: [jsxs("div", { children: [jsxs("button", { onClick: () => toggleSection('categories'), className: "flex items-center justify-between w-full mb-3", children: [jsxs("h3", { className: "font-medium text-gray-900 flex items-center", children: [jsx(Grid2x2, { className: "h-4 w-4 mr-2" }), "Categories"] }), expandedSections.has('categories') ? (jsx(ChevronDown, { className: "h-4 w-4 text-gray-400" })) : (jsx(ChevronRight, { className: "h-4 w-4 text-gray-400" }))] }), expandedSections.has('categories') && (jsx("div", { className: "space-y-1", children: renderCategoryTree(categoryTree) }))] }), jsxs("div", { children: [jsxs("button", { onClick: () => toggleSection('price'), className: "flex items-center justify-between w-full mb-3", children: [jsxs("h3", { className: "font-medium text-gray-900 flex items-center", children: [jsx(Tag, { className: "h-4 w-4 mr-2" }), "Price Range"] }), expandedSections.has('price') ? (jsx(ChevronDown, { className: "h-4 w-4 text-gray-400" })) : (jsx(ChevronRight, { className: "h-4 w-4 text-gray-400" }))] }), expandedSections.has('price') && (jsxs("div", { className: "space-y-3", children: [jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Input, { type: "number", placeholder: "Min", value: filters.priceRange[0], onChange: (e) => handleFilterChange('priceRange', [
|
|
135
|
+
parseInt(e.target.value) || 0,
|
|
136
|
+
filters.priceRange[1]
|
|
137
|
+
]), className: "w-20 text-sm" }), jsx("span", { className: "text-gray-400", children: "-" }), jsx(Input, { type: "number", placeholder: "Max", value: filters.priceRange[1], onChange: (e) => handleFilterChange('priceRange', [
|
|
138
|
+
filters.priceRange[0],
|
|
139
|
+
parseInt(e.target.value) || 1000
|
|
140
|
+
]), className: "w-20 text-sm" })] }), jsx("div", { className: "space-y-1", children: [
|
|
141
|
+
{ label: 'Under $25', range: [0, 25] },
|
|
142
|
+
{ label: '$25 - $50', range: [25, 50] },
|
|
143
|
+
{ label: '$50 - $100', range: [50, 100] },
|
|
144
|
+
{ label: '$100 - $200', range: [100, 200] },
|
|
145
|
+
{ label: 'Over $200', range: [200, 1000] },
|
|
146
|
+
].map((option) => (jsxs("label", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { checked: filters.priceRange[0] === option.range[0] &&
|
|
147
|
+
filters.priceRange[1] === option.range[1], onChange: (e) => {
|
|
148
|
+
if (e.target.checked) {
|
|
149
|
+
handleFilterChange('priceRange', option.range);
|
|
150
|
+
}
|
|
151
|
+
} }), jsx("span", { className: "text-sm text-gray-700", children: option.label })] }, option.label))) })] }))] }), jsxs("div", { children: [jsxs("button", { onClick: () => toggleSection('rating'), className: "flex items-center justify-between w-full mb-3", children: [jsxs("h3", { className: "font-medium text-gray-900 flex items-center", children: [jsx(Star, { className: "h-4 w-4 mr-2" }), "Customer Rating"] }), expandedSections.has('rating') ? (jsx(ChevronDown, { className: "h-4 w-4 text-gray-400" })) : (jsx(ChevronRight, { className: "h-4 w-4 text-gray-400" }))] }), expandedSections.has('rating') && (jsx("div", { className: "space-y-2", children: [4, 3, 2, 1].map(rating => (jsxs("label", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { checked: filters.rating === rating, onChange: (e) => {
|
|
152
|
+
handleFilterChange('rating', e.target.checked ? rating : 0);
|
|
153
|
+
} }), jsxs("div", { className: "flex items-center space-x-1", children: [[1, 2, 3, 4, 5].map(star => (jsx(Star, { className: `h-4 w-4 ${star <= rating ? 'text-yellow-400 fill-current' : 'text-gray-300'}` }, star))), jsx("span", { className: "text-sm text-gray-700", children: "& up" })] })] }, rating))) }))] }), jsxs("div", { children: [jsxs("button", { onClick: () => toggleSection('brands'), className: "flex items-center justify-between w-full mb-3", children: [jsxs("h3", { className: "font-medium text-gray-900 flex items-center", children: [jsx(Tag, { className: "h-4 w-4 mr-2" }), "Brands"] }), expandedSections.has('brands') ? (jsx(ChevronDown, { className: "h-4 w-4 text-gray-400" })) : (jsx(ChevronRight, { className: "h-4 w-4 text-gray-400" }))] }), expandedSections.has('brands') && (jsx("div", { className: "space-y-2", children: brands.map(brand => (jsxs("label", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { checked: filters.brands.includes(brand.name), onChange: (e) => {
|
|
154
|
+
const newBrands = e.target.checked
|
|
155
|
+
? [...filters.brands, brand.name]
|
|
156
|
+
: filters.brands.filter(b => b !== brand.name);
|
|
157
|
+
handleFilterChange('brands', newBrands);
|
|
158
|
+
} }), jsx("span", { className: "text-sm text-gray-700", children: brand.name })] }), jsxs("span", { className: "text-xs text-gray-500", children: ["(", brand.count, ")"] })] }, brand.name))) }))] }), jsxs("div", { children: [jsxs("button", { onClick: () => toggleSection('vendors'), className: "flex items-center justify-between w-full mb-3", children: [jsxs("h3", { className: "font-medium text-gray-900 flex items-center", children: [jsx(Store, { className: "h-4 w-4 mr-2" }), "Sellers"] }), expandedSections.has('vendors') ? (jsx(ChevronDown, { className: "h-4 w-4 text-gray-400" })) : (jsx(ChevronRight, { className: "h-4 w-4 text-gray-400" }))] }), expandedSections.has('vendors') && (jsx("div", { className: "space-y-2", children: vendors.map(vendor => (jsxs("label", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { checked: filters.vendors.includes(vendor.name), onChange: (e) => {
|
|
159
|
+
const newVendors = e.target.checked
|
|
160
|
+
? [...filters.vendors, vendor.name]
|
|
161
|
+
: filters.vendors.filter(v => v !== vendor.name);
|
|
162
|
+
handleFilterChange('vendors', newVendors);
|
|
163
|
+
} }), jsxs("div", { children: [jsx("div", { className: "text-sm text-gray-700", children: vendor.name }), jsxs("div", { className: "flex items-center space-x-1", children: [jsx(Star, { className: "h-3 w-3 text-yellow-400 fill-current" }), jsx("span", { className: "text-xs text-gray-500", children: vendor.rating })] })] })] }), jsxs("span", { className: "text-xs text-gray-500", children: ["(", vendor.count, ")"] })] }, vendor.name))) }))] }), jsxs("div", { children: [jsxs("h3", { className: "font-medium text-gray-900 mb-3 flex items-center", children: [jsx(Sliders, { className: "h-4 w-4 mr-2" }), "Availability"] }), jsx("div", { className: "space-y-2", children: jsxs("label", { className: "flex items-center space-x-2", children: [jsx(Checkbox, { checked: filters.inStock, onChange: (e) => handleFilterChange('inStock', e.target.checked) }), jsx("span", { className: "text-sm text-gray-700", children: "In Stock Only" })] }) })] }), getActiveFiltersCount() > 0 && (jsxs("div", { className: "pt-4 border-t border-gray-200", children: [jsxs("div", { className: "flex items-center justify-between mb-2", children: [jsx("h3", { className: "font-medium text-gray-900", children: "Active Filters" }), jsx(Button, { variant: "ghost", size: "sm", onClick: onClearFilters, children: "Clear All" })] }), jsxs("div", { className: "flex flex-wrap gap-2", children: [filters.categories.map(category => (jsxs(Badge, { variant: "outline", className: "text-xs", children: [category, jsx("button", { onClick: () => handleFilterChange('categories', filters.categories.filter(c => c !== category)), className: "ml-1 hover:text-red-600", children: jsx(X, { className: "h-3 w-3" }) })] }, category))), filters.brands.map(brand => (jsxs(Badge, { variant: "outline", className: "text-xs", children: [brand, jsx("button", { onClick: () => handleFilterChange('brands', filters.brands.filter(b => b !== brand)), className: "ml-1 hover:text-red-600", children: jsx(X, { className: "h-3 w-3" }) })] }, brand))), filters.rating > 0 && (jsxs(Badge, { variant: "outline", className: "text-xs", children: [filters.rating, "+ stars", jsx("button", { onClick: () => handleFilterChange('rating', 0), className: "ml-1 hover:text-red-600", children: jsx(X, { className: "h-3 w-3" }) })] })), filters.inStock && (jsxs(Badge, { variant: "outline", className: "text-xs", children: ["In Stock", jsx("button", { onClick: () => handleFilterChange('inStock', false), className: "ml-1 hover:text-red-600", children: jsx(X, { className: "h-3 w-3" }) })] }))] })] }))] })] }) }));
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export { MarketplaceSidebar };
|
|
167
|
+
//# sourceMappingURL=MarketplaceSidebar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketplaceSidebar.js","sources":["../../../src/components/Marketplace/MarketplaceSidebar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { ChevronDown, ChevronRight, Star, X, Filter, Sliders, Tag, Store, Grid2x2 as Grid } from 'lucide-react';\nimport { Button } from '../Button';\nimport { Input } from '../Input';\nimport { Card, CardHeader, CardTitle, CardContent } from '../Card';\nimport { Badge } from '../Badge';\nimport { Checkbox } from '../Checkbox';\nimport { cn } from '../../utils/cn';\nimport type { FilterOptions } from './types';\n\ninterface MarketplaceSidebarProps {\n filters: FilterOptions;\n onFiltersChange: (filters: FilterOptions) => void;\n onClearFilters: () => void;\n className?: string;\n collapsed?: boolean;\n onToggleCollapse?: () => void;\n}\n\ninterface CategoryNode {\n id: string;\n name: string;\n count: number;\n children?: CategoryNode[];\n}\n\nconst categoryTree: CategoryNode[] = [\n {\n id: 'electronics',\n name: 'Electronics',\n count: 156,\n children: [\n { id: 'smartphones', name: 'Smartphones', count: 45 },\n { id: 'laptops', name: 'Laptops', count: 32 },\n { id: 'headphones', name: 'Headphones', count: 28 },\n { id: 'cameras', name: 'Cameras', count: 21 },\n { id: 'accessories', name: 'Accessories', count: 30 },\n ],\n },\n {\n id: 'clothing',\n name: 'Clothing & Fashion',\n count: 234,\n children: [\n { id: 'mens', name: \"Men's Clothing\", count: 89 },\n { id: 'womens', name: \"Women's Clothing\", count: 112 },\n { id: 'shoes', name: 'Shoes', count: 67 },\n { id: 'accessories-fashion', name: 'Fashion Accessories', count: 45 },\n ],\n },\n {\n id: 'home',\n name: 'Home & Garden',\n count: 178,\n children: [\n { id: 'furniture', name: 'Furniture', count: 56 },\n { id: 'decor', name: 'Home Decor', count: 43 },\n { id: 'kitchen', name: 'Kitchen & Dining', count: 38 },\n { id: 'garden', name: 'Garden & Outdoor', count: 41 },\n ],\n },\n {\n id: 'sports',\n name: 'Sports & Outdoors',\n count: 145,\n children: [\n { id: 'fitness', name: 'Fitness Equipment', count: 34 },\n { id: 'outdoor', name: 'Outdoor Recreation', count: 52 },\n { id: 'sports-apparel', name: 'Sports Apparel', count: 59 },\n ],\n },\n];\n\nconst brands = [\n { name: 'Apple', count: 45 },\n { name: 'Samsung', count: 38 },\n { name: 'Nike', count: 67 },\n { name: 'Adidas', count: 54 },\n { name: 'Sony', count: 32 },\n { name: 'LG', count: 28 },\n { name: 'Canon', count: 21 },\n { name: 'Dell', count: 19 },\n];\n\nconst vendors = [\n { name: 'TechWorld Store', count: 89, rating: 4.8 },\n { name: 'Fashion Hub', count: 76, rating: 4.6 },\n { name: 'Home Essentials', count: 65, rating: 4.7 },\n { name: 'Sports Central', count: 54, rating: 4.5 },\n { name: 'Electronics Plus', count: 43, rating: 4.9 },\n];\n\nexport const MarketplaceSidebar: React.FC<MarketplaceSidebarProps> = ({\n filters,\n onFiltersChange,\n onClearFilters,\n className = '',\n collapsed = false,\n onToggleCollapse,\n}) => {\n const [expandedCategories, setExpandedCategories] = useState<Set<string>>(new Set(['electronics']));\n const [expandedSections, setExpandedSections] = useState<Set<string>>(\n new Set(['categories', 'price', 'rating', 'brands'])\n );\n\n const toggleCategory = (categoryId: string) => {\n setExpandedCategories(prev => {\n const newSet = new Set(prev);\n if (newSet.has(categoryId)) {\n newSet.delete(categoryId);\n } else {\n newSet.add(categoryId);\n }\n return newSet;\n });\n };\n\n const toggleSection = (sectionId: string) => {\n setExpandedSections(prev => {\n const newSet = new Set(prev);\n if (newSet.has(sectionId)) {\n newSet.delete(sectionId);\n } else {\n newSet.add(sectionId);\n }\n return newSet;\n });\n };\n\n const handleFilterChange = (filterType: keyof FilterOptions, value: any) => {\n onFiltersChange({\n ...filters,\n [filterType]: value,\n });\n };\n\n const getActiveFiltersCount = () => {\n let count = 0;\n if (filters.categories.length > 0) count += filters.categories.length;\n if (filters.brands.length > 0) count += filters.brands.length;\n if (filters.vendors.length > 0) count += filters.vendors.length;\n if (filters.rating > 0) count += 1;\n if (filters.inStock) count += 1;\n if (filters.priceRange[0] > 0 || filters.priceRange[1] < 1000) count += 1;\n return count;\n };\n\n const renderCategoryTree = (categories: CategoryNode[], level = 0) => {\n return categories.map((category) => (\n <div key={category.id} className={cn('', level > 0 && 'ml-4')}>\n <div className=\"flex items-center justify-between py-1\">\n <label className=\"flex items-center space-x-2 flex-1 cursor-pointer\">\n <Checkbox\n checked={filters.categories.includes(category.id)}\n onChange={(e) => {\n const newCategories = e.target.checked\n ? [...filters.categories, category.id]\n : filters.categories.filter(c => c !== category.id);\n handleFilterChange('categories', newCategories);\n }}\n />\n <span className=\"text-sm text-gray-700 flex-1\">{category.name}</span>\n <span className=\"text-xs text-gray-500\">({category.count})</span>\n </label>\n {category.children && (\n <button\n onClick={() => toggleCategory(category.id)}\n className=\"p-1 hover:bg-gray-100 rounded\"\n >\n {expandedCategories.has(category.id) ? (\n <ChevronDown className=\"h-3 w-3 text-gray-400\" />\n ) : (\n <ChevronRight className=\"h-3 w-3 text-gray-400\" />\n )}\n </button>\n )}\n </div>\n {category.children && expandedCategories.has(category.id) && (\n <div className=\"mt-1\">\n {renderCategoryTree(category.children, level + 1)}\n </div>\n )}\n </div>\n ));\n };\n\n if (collapsed) {\n return (\n <div className={cn('w-16 flex-shrink-0', className)}>\n <Card className=\"sticky top-4\">\n <CardContent className=\"p-4\">\n <div className=\"flex flex-col items-center space-y-4\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={onToggleCollapse}\n className=\"w-full\"\n >\n <Filter className=\"h-5 w-5\" />\n </Button>\n {getActiveFiltersCount() > 0 && (\n <Badge variant=\"default\" className=\"text-xs\">\n {getActiveFiltersCount()}\n </Badge>\n )}\n </div>\n </CardContent>\n </Card>\n </div>\n );\n }\n\n return (\n <div className={cn('w-80 flex-shrink-0', className)}>\n <Card className=\"sticky top-4\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"flex items-center text-lg\">\n <Filter className=\"h-5 w-5 mr-2\" />\n Filters\n {getActiveFiltersCount() > 0 && (\n <Badge variant=\"default\" className=\"ml-2\">\n {getActiveFiltersCount()}\n </Badge>\n )}\n </CardTitle>\n <div className=\"flex items-center space-x-2\">\n <Button variant=\"ghost\" size=\"sm\" onClick={onClearFilters}>\n Clear All\n </Button>\n {onToggleCollapse && (\n <Button variant=\"ghost\" size=\"sm\" onClick={onToggleCollapse}>\n <X className=\"h-4 w-4\" />\n </Button>\n )}\n </div>\n </div>\n </CardHeader>\n\n <CardContent className=\"space-y-6 max-h-[calc(100vh-200px)] overflow-y-auto\">\n {/* Categories */}\n <div>\n <button\n onClick={() => toggleSection('categories')}\n className=\"flex items-center justify-between w-full mb-3\"\n >\n <h3 className=\"font-medium text-gray-900 flex items-center\">\n <Grid className=\"h-4 w-4 mr-2\" />\n Categories\n </h3>\n {expandedSections.has('categories') ? (\n <ChevronDown className=\"h-4 w-4 text-gray-400\" />\n ) : (\n <ChevronRight className=\"h-4 w-4 text-gray-400\" />\n )}\n </button>\n {expandedSections.has('categories') && (\n <div className=\"space-y-1\">\n {renderCategoryTree(categoryTree)}\n </div>\n )}\n </div>\n\n {/* Price Range */}\n <div>\n <button\n onClick={() => toggleSection('price')}\n className=\"flex items-center justify-between w-full mb-3\"\n >\n <h3 className=\"font-medium text-gray-900 flex items-center\">\n <Tag className=\"h-4 w-4 mr-2\" />\n Price Range\n </h3>\n {expandedSections.has('price') ? (\n <ChevronDown className=\"h-4 w-4 text-gray-400\" />\n ) : (\n <ChevronRight className=\"h-4 w-4 text-gray-400\" />\n )}\n </button>\n {expandedSections.has('price') && (\n <div className=\"space-y-3\">\n <div className=\"flex items-center space-x-2\">\n <Input\n type=\"number\"\n placeholder=\"Min\"\n value={filters.priceRange[0]}\n onChange={(e) => handleFilterChange('priceRange', [\n parseInt(e.target.value) || 0,\n filters.priceRange[1]\n ])}\n className=\"w-20 text-sm\"\n />\n <span className=\"text-gray-400\">-</span>\n <Input\n type=\"number\"\n placeholder=\"Max\"\n value={filters.priceRange[1]}\n onChange={(e) => handleFilterChange('priceRange', [\n filters.priceRange[0],\n parseInt(e.target.value) || 1000\n ])}\n className=\"w-20 text-sm\"\n />\n </div>\n \n {/* Quick Price Ranges */}\n <div className=\"space-y-1\">\n {[\n { label: 'Under $25', range: [0, 25] },\n { label: '$25 - $50', range: [25, 50] },\n { label: '$50 - $100', range: [50, 100] },\n { label: '$100 - $200', range: [100, 200] },\n { label: 'Over $200', range: [200, 1000] },\n ].map((option) => (\n <label key={option.label} className=\"flex items-center space-x-2\">\n <Checkbox\n checked={\n filters.priceRange[0] === option.range[0] &&\n filters.priceRange[1] === option.range[1]\n }\n onChange={(e) => {\n if (e.target.checked) {\n handleFilterChange('priceRange', option.range);\n }\n }}\n />\n <span className=\"text-sm text-gray-700\">{option.label}</span>\n </label>\n ))}\n </div>\n </div>\n )}\n </div>\n\n {/* Rating */}\n <div>\n <button\n onClick={() => toggleSection('rating')}\n className=\"flex items-center justify-between w-full mb-3\"\n >\n <h3 className=\"font-medium text-gray-900 flex items-center\">\n <Star className=\"h-4 w-4 mr-2\" />\n Customer Rating\n </h3>\n {expandedSections.has('rating') ? (\n <ChevronDown className=\"h-4 w-4 text-gray-400\" />\n ) : (\n <ChevronRight className=\"h-4 w-4 text-gray-400\" />\n )}\n </button>\n {expandedSections.has('rating') && (\n <div className=\"space-y-2\">\n {[4, 3, 2, 1].map(rating => (\n <label key={rating} className=\"flex items-center space-x-2\">\n <Checkbox\n checked={filters.rating === rating}\n onChange={(e) => {\n handleFilterChange('rating', e.target.checked ? rating : 0);\n }}\n />\n <div className=\"flex items-center space-x-1\">\n {[1, 2, 3, 4, 5].map(star => (\n <Star\n key={star}\n className={`h-4 w-4 ${\n star <= rating ? 'text-yellow-400 fill-current' : 'text-gray-300'\n }`}\n />\n ))}\n <span className=\"text-sm text-gray-700\">& up</span>\n </div>\n </label>\n ))}\n </div>\n )}\n </div>\n\n {/* Brands */}\n <div>\n <button\n onClick={() => toggleSection('brands')}\n className=\"flex items-center justify-between w-full mb-3\"\n >\n <h3 className=\"font-medium text-gray-900 flex items-center\">\n <Tag className=\"h-4 w-4 mr-2\" />\n Brands\n </h3>\n {expandedSections.has('brands') ? (\n <ChevronDown className=\"h-4 w-4 text-gray-400\" />\n ) : (\n <ChevronRight className=\"h-4 w-4 text-gray-400\" />\n )}\n </button>\n {expandedSections.has('brands') && (\n <div className=\"space-y-2\">\n {brands.map(brand => (\n <label key={brand.name} className=\"flex items-center justify-between\">\n <div className=\"flex items-center space-x-2\">\n <Checkbox\n checked={filters.brands.includes(brand.name)}\n onChange={(e) => {\n const newBrands = e.target.checked\n ? [...filters.brands, brand.name]\n : filters.brands.filter(b => b !== brand.name);\n handleFilterChange('brands', newBrands);\n }}\n />\n <span className=\"text-sm text-gray-700\">{brand.name}</span>\n </div>\n <span className=\"text-xs text-gray-500\">({brand.count})</span>\n </label>\n ))}\n </div>\n )}\n </div>\n\n {/* Vendors */}\n <div>\n <button\n onClick={() => toggleSection('vendors')}\n className=\"flex items-center justify-between w-full mb-3\"\n >\n <h3 className=\"font-medium text-gray-900 flex items-center\">\n <Store className=\"h-4 w-4 mr-2\" />\n Sellers\n </h3>\n {expandedSections.has('vendors') ? (\n <ChevronDown className=\"h-4 w-4 text-gray-400\" />\n ) : (\n <ChevronRight className=\"h-4 w-4 text-gray-400\" />\n )}\n </button>\n {expandedSections.has('vendors') && (\n <div className=\"space-y-2\">\n {vendors.map(vendor => (\n <label key={vendor.name} className=\"flex items-center justify-between\">\n <div className=\"flex items-center space-x-2\">\n <Checkbox\n checked={filters.vendors.includes(vendor.name)}\n onChange={(e) => {\n const newVendors = e.target.checked\n ? [...filters.vendors, vendor.name]\n : filters.vendors.filter(v => v !== vendor.name);\n handleFilterChange('vendors', newVendors);\n }}\n />\n <div>\n <div className=\"text-sm text-gray-700\">{vendor.name}</div>\n <div className=\"flex items-center space-x-1\">\n <Star className=\"h-3 w-3 text-yellow-400 fill-current\" />\n <span className=\"text-xs text-gray-500\">{vendor.rating}</span>\n </div>\n </div>\n </div>\n <span className=\"text-xs text-gray-500\">({vendor.count})</span>\n </label>\n ))}\n </div>\n )}\n </div>\n\n {/* Availability */}\n <div>\n <h3 className=\"font-medium text-gray-900 mb-3 flex items-center\">\n <Sliders className=\"h-4 w-4 mr-2\" />\n Availability\n </h3>\n <div className=\"space-y-2\">\n <label className=\"flex items-center space-x-2\">\n <Checkbox\n checked={filters.inStock}\n onChange={(e) => handleFilterChange('inStock', e.target.checked)}\n />\n <span className=\"text-sm text-gray-700\">In Stock Only</span>\n </label>\n </div>\n </div>\n\n {/* Active Filters Summary */}\n {getActiveFiltersCount() > 0 && (\n <div className=\"pt-4 border-t border-gray-200\">\n <div className=\"flex items-center justify-between mb-2\">\n <h3 className=\"font-medium text-gray-900\">Active Filters</h3>\n <Button variant=\"ghost\" size=\"sm\" onClick={onClearFilters}>\n Clear All\n </Button>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n {filters.categories.map(category => (\n <Badge key={category} variant=\"outline\" className=\"text-xs\">\n {category}\n <button\n onClick={() => handleFilterChange('categories', \n filters.categories.filter(c => c !== category)\n )}\n className=\"ml-1 hover:text-red-600\"\n >\n <X className=\"h-3 w-3\" />\n </button>\n </Badge>\n ))}\n {filters.brands.map(brand => (\n <Badge key={brand} variant=\"outline\" className=\"text-xs\">\n {brand}\n <button\n onClick={() => handleFilterChange('brands', \n filters.brands.filter(b => b !== brand)\n )}\n className=\"ml-1 hover:text-red-600\"\n >\n <X className=\"h-3 w-3\" />\n </button>\n </Badge>\n ))}\n {filters.rating > 0 && (\n <Badge variant=\"outline\" className=\"text-xs\">\n {filters.rating}+ stars\n <button\n onClick={() => handleFilterChange('rating', 0)}\n className=\"ml-1 hover:text-red-600\"\n >\n <X className=\"h-3 w-3\" />\n </button>\n </Badge>\n )}\n {filters.inStock && (\n <Badge variant=\"outline\" className=\"text-xs\">\n In Stock\n <button\n onClick={() => handleFilterChange('inStock', false)}\n className=\"ml-1 hover:text-red-600\"\n >\n <X className=\"h-3 w-3\" />\n </button>\n </Badge>\n )}\n </div>\n </div>\n )}\n </CardContent>\n </Card>\n </div>\n );\n};"],"names":["_jsxs","_jsx","Grid"],"mappings":";;;;;;;;;;AA0BA,MAAM,YAAY,GAAmB;AACnC,IAAA;AACE,QAAA,EAAE,EAAE,aAAa;AACjB,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,KAAK,EAAE,GAAG;AACV,QAAA,QAAQ,EAAE;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EAAA,CACH;AAEV;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Product } from './types';
|
|
3
|
+
interface SingleProductViewProps {
|
|
4
|
+
productId?: string;
|
|
5
|
+
onAddToCart?: (product: Product, quantity: number) => void;
|
|
6
|
+
onBuyNow?: (product: Product, quantity: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SingleProductView: React.FC<SingleProductViewProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { ChevronLeft, ChevronRight, Star, Minus, Plus, ShoppingCart, Zap, Heart, Share2, Truck, RotateCcw, Shield, Check, ThumbsUp } from 'lucide-react';
|
|
4
|
+
import { Button } from '../Button/Button.js';
|
|
5
|
+
import { Card, CardContent } from '../Card/Card.js';
|
|
6
|
+
import { Badge } from '../Badge/Badge.js';
|
|
7
|
+
import { Avatar, AvatarImage, AvatarFallback } from '../Avatar/Avatar.js';
|
|
8
|
+
import { Input } from '../Input/Input.js';
|
|
9
|
+
import { Tabs, TabsList, TabsTrigger, TabsContent } from '../Tabs/Tabs.js';
|
|
10
|
+
import { showToast } from '../Toast/Toast.js';
|
|
11
|
+
import { sampleProducts, sampleReviews } from './data/sampleData.js';
|
|
12
|
+
|
|
13
|
+
const SingleProductView = ({ productId = '1', onAddToCart, onBuyNow, }) => {
|
|
14
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState(0);
|
|
15
|
+
const [quantity, setQuantity] = useState(1);
|
|
16
|
+
const [isWishlisted, setIsWishlisted] = useState(false);
|
|
17
|
+
const [selectedTab, setSelectedTab] = useState('description');
|
|
18
|
+
// Get product data (in real app, this would come from API)
|
|
19
|
+
const product = sampleProducts.find(p => p.id === productId) || sampleProducts[0];
|
|
20
|
+
const reviews = sampleReviews;
|
|
21
|
+
const relatedProducts = sampleProducts.slice(1, 5);
|
|
22
|
+
const handleAddToCart = () => {
|
|
23
|
+
onAddToCart?.(product, quantity);
|
|
24
|
+
showToast.success(`Added ${quantity} item(s) to cart!`);
|
|
25
|
+
};
|
|
26
|
+
const handleBuyNow = () => {
|
|
27
|
+
onBuyNow?.(product, quantity);
|
|
28
|
+
showToast.info('Redirecting to checkout...');
|
|
29
|
+
};
|
|
30
|
+
const handleShare = () => {
|
|
31
|
+
navigator.clipboard.writeText(window.location.href);
|
|
32
|
+
showToast.success('Product link copied to clipboard!');
|
|
33
|
+
};
|
|
34
|
+
const nextImage = () => {
|
|
35
|
+
setSelectedImageIndex((prev) => prev === product.images.length - 1 ? 0 : prev + 1);
|
|
36
|
+
};
|
|
37
|
+
const prevImage = () => {
|
|
38
|
+
setSelectedImageIndex((prev) => prev === 0 ? product.images.length - 1 : prev - 1);
|
|
39
|
+
};
|
|
40
|
+
return (jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8", children: [jsxs("nav", { className: "flex items-center space-x-2 text-sm text-gray-600 mb-8", children: [jsx("a", { href: "/", className: "hover:text-primary-600", children: "Home" }), jsx("span", { children: "/" }), jsx("a", { href: "/products", className: "hover:text-primary-600", children: "Products" }), jsx("span", { children: "/" }), jsx("a", { href: `/category/${product.category.toLowerCase()}`, className: "hover:text-primary-600", children: product.category }), jsx("span", { children: "/" }), jsx("span", { className: "text-gray-900", children: product.name })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12", children: [jsxs("div", { children: [jsxs("div", { className: "relative aspect-square bg-gray-100 rounded-lg overflow-hidden mb-4", children: [jsx("img", { src: product.images[selectedImageIndex], alt: product.name, className: "w-full h-full object-cover" }), product.images.length > 1 && (jsxs(Fragment, { children: [jsx("button", { onClick: prevImage, className: "absolute left-4 top-1/2 transform -translate-y-1/2 bg-white/80 hover:bg-white rounded-full p-2 shadow-lg transition-colors", children: jsx(ChevronLeft, { className: "h-5 w-5" }) }), jsx("button", { onClick: nextImage, className: "absolute right-4 top-1/2 transform -translate-y-1/2 bg-white/80 hover:bg-white rounded-full p-2 shadow-lg transition-colors", children: jsx(ChevronRight, { className: "h-5 w-5" }) })] })), product.discount && (jsxs(Badge, { variant: "danger", className: "absolute top-4 left-4", children: ["-", product.discount, "%"] }))] }), product.images.length > 1 && (jsx("div", { className: "flex space-x-2 overflow-x-auto", children: product.images.map((image, index) => (jsx("button", { onClick: () => setSelectedImageIndex(index), className: `flex-shrink-0 w-20 h-20 rounded-lg overflow-hidden border-2 transition-colors ${selectedImageIndex === index
|
|
41
|
+
? 'border-primary-500'
|
|
42
|
+
: 'border-gray-200 hover:border-gray-300'}`, children: jsx("img", { src: image, alt: `${product.name} ${index + 1}`, className: "w-full h-full object-cover" }) }, index))) }))] }), jsxs("div", { children: [jsxs("div", { className: "flex items-center space-x-2 mb-4", children: [jsx("span", { className: "text-sm text-gray-600", children: "Sold by" }), jsxs("div", { className: "flex items-center space-x-2", children: [product.vendor.logo && (jsxs(Avatar, { size: "sm", children: [jsx(AvatarImage, { src: product.vendor.logo }), jsx(AvatarFallback, { children: product.vendor.name[0] })] })), jsx("span", { className: "font-medium text-primary-600", children: product.vendor.name }), jsxs("div", { className: "flex items-center space-x-1", children: [jsx(Star, { className: "h-4 w-4 text-yellow-400 fill-current" }), jsx("span", { className: "text-sm text-gray-600", children: product.vendor.rating })] })] })] }), jsx("h1", { className: "text-3xl font-bold text-gray-900 mb-4", children: product.name }), jsxs("div", { className: "flex items-center space-x-4 mb-6", children: [jsxs("div", { className: "flex items-center space-x-1", children: [[1, 2, 3, 4, 5].map((star) => (jsx(Star, { className: `h-5 w-5 ${star <= Math.floor(product.rating)
|
|
43
|
+
? 'text-yellow-400 fill-current'
|
|
44
|
+
: 'text-gray-300'}` }, star))), jsx("span", { className: "text-lg font-medium text-gray-900 ml-2", children: product.rating })] }), jsxs("span", { className: "text-gray-600", children: ["(", product.reviewCount, " reviews)"] }), jsx(Badge, { variant: product.inStock ? 'success' : 'danger', children: product.inStock ? 'In Stock' : 'Out of Stock' })] }), jsx("div", { className: "mb-6", children: jsxs("div", { className: "flex items-center space-x-3", children: [jsxs("span", { className: "text-3xl font-bold text-gray-900", children: ["$", product.price.toFixed(2)] }), product.originalPrice && (jsxs("span", { className: "text-xl text-gray-500 line-through", children: ["$", product.originalPrice.toFixed(2)] })), product.discount && (jsxs(Badge, { variant: "danger", children: ["Save ", product.discount, "%"] }))] }) }), jsx("p", { className: "text-gray-600 mb-6 leading-relaxed", children: product.description }), jsxs("div", { className: "space-y-4 mb-8", children: [jsxs("div", { className: "flex items-center space-x-4", children: [jsx("span", { className: "font-medium text-gray-900", children: "Quantity:" }), jsxs("div", { className: "flex items-center border border-gray-300 rounded-lg", children: [jsx("button", { onClick: () => setQuantity(Math.max(1, quantity - 1)), className: "p-2 hover:bg-gray-50 transition-colors", disabled: quantity <= 1, children: jsx(Minus, { className: "h-4 w-4" }) }), jsx(Input, { type: "number", value: quantity, onChange: (e) => setQuantity(Math.max(1, parseInt(e.target.value) || 1)), className: "w-16 text-center border-0 focus:ring-0", min: "1" }), jsx("button", { onClick: () => setQuantity(quantity + 1), className: "p-2 hover:bg-gray-50 transition-colors", children: jsx(Plus, { className: "h-4 w-4" }) })] })] }), jsxs("div", { className: "flex space-x-4", children: [jsxs(Button, { variant: "primary", size: "lg", onClick: handleAddToCart, disabled: !product.inStock, className: "flex-1", children: [jsx(ShoppingCart, { className: "mr-2 h-5 w-5" }), "Add to Cart"] }), jsxs(Button, { variant: "secondary", size: "lg", onClick: handleBuyNow, disabled: !product.inStock, className: "flex-1", children: [jsx(Zap, { className: "mr-2 h-5 w-5" }), "Buy Now"] })] }), jsxs("div", { className: "flex space-x-2", children: [jsxs(Button, { variant: "outline", onClick: () => setIsWishlisted(!isWishlisted), className: "flex-1", children: [jsx(Heart, { className: `mr-2 h-5 w-5 ${isWishlisted ? 'fill-current text-red-500' : ''}` }), isWishlisted ? 'Wishlisted' : 'Add to Wishlist'] }), jsx(Button, { variant: "outline", onClick: handleShare, children: jsx(Share2, { className: "h-5 w-5" }) })] })] }), jsxs("div", { className: "grid grid-cols-2 gap-4 mb-8", children: [jsxs("div", { className: "flex items-center space-x-2 text-sm text-gray-600", children: [jsx(Truck, { className: "h-4 w-4 text-green-600" }), jsx("span", { children: "Free shipping" })] }), jsxs("div", { className: "flex items-center space-x-2 text-sm text-gray-600", children: [jsx(RotateCcw, { className: "h-4 w-4 text-blue-600" }), jsx("span", { children: "30-day returns" })] }), jsxs("div", { className: "flex items-center space-x-2 text-sm text-gray-600", children: [jsx(Shield, { className: "h-4 w-4 text-purple-600" }), jsx("span", { children: "2-year warranty" })] }), jsxs("div", { className: "flex items-center space-x-2 text-sm text-gray-600", children: [jsx(Check, { className: "h-4 w-4 text-green-600" }), jsx("span", { children: "Authentic product" })] })] })] })] }), jsx("div", { className: "mt-16", children: jsxs(Tabs, { value: selectedTab, onValueChange: setSelectedTab, children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "description", children: "Description" }), jsx(TabsTrigger, { value: "specifications", children: "Specifications" }), jsxs(TabsTrigger, { value: "reviews", children: ["Reviews (", reviews.length, ")"] })] }), jsx(TabsContent, { value: "description", className: "mt-8", children: jsx(Card, { children: jsxs(CardContent, { className: "p-8", children: [jsx("h3", { className: "text-xl font-semibold mb-4", children: "Product Description" }), jsxs("div", { className: "prose max-w-none", children: [jsx("p", { className: "text-gray-600 leading-relaxed mb-4", children: product.description }), jsx("p", { className: "text-gray-600 leading-relaxed", children: "This premium product offers exceptional quality and performance, designed to meet the highest standards. With advanced features and reliable construction, it's perfect for both professional and personal use." })] })] }) }) }), jsx(TabsContent, { value: "specifications", className: "mt-8", children: jsx(Card, { children: jsxs(CardContent, { className: "p-8", children: [jsx("h3", { className: "text-xl font-semibold mb-4", children: "Technical Specifications" }), jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: Object.entries(product.specifications).map(([key, value]) => (jsxs("div", { className: "flex justify-between py-2 border-b border-gray-100", children: [jsxs("span", { className: "font-medium text-gray-900", children: [key, ":"] }), jsx("span", { className: "text-gray-600", children: value })] }, key))) })] }) }) }), jsx(TabsContent, { value: "reviews", className: "mt-8", children: jsxs("div", { className: "space-y-6", children: [jsx(Card, { children: jsx(CardContent, { className: "p-8", children: jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [jsxs("div", { children: [jsx("h3", { className: "text-xl font-semibold mb-4", children: "Customer Reviews" }), jsxs("div", { className: "flex items-center space-x-4 mb-4", children: [jsx("span", { className: "text-4xl font-bold text-gray-900", children: product.rating }), jsxs("div", { children: [jsx("div", { className: "flex items-center space-x-1 mb-1", children: [1, 2, 3, 4, 5].map((star) => (jsx(Star, { className: `h-5 w-5 ${star <= Math.floor(product.rating)
|
|
45
|
+
? 'text-yellow-400 fill-current'
|
|
46
|
+
: 'text-gray-300'}` }, star))) }), jsxs("span", { className: "text-gray-600", children: ["Based on ", product.reviewCount, " reviews"] })] })] })] }), jsx("div", { children: jsx(Button, { variant: "primary", className: "w-full", children: "Write a Review" }) })] }) }) }), reviews.map((review) => (jsx(Card, { children: jsx(CardContent, { className: "p-6", children: jsxs("div", { className: "flex items-start space-x-4", children: [jsxs(Avatar, { children: [jsx(AvatarImage, { src: review.userAvatar }), jsx(AvatarFallback, { children: review.userName[0] })] }), jsxs("div", { className: "flex-1", children: [jsxs("div", { className: "flex items-center space-x-2 mb-2", children: [jsx("span", { className: "font-medium text-gray-900", children: review.userName }), review.verified && (jsx(Badge, { variant: "success", className: "text-xs", children: "Verified Purchase" }))] }), jsxs("div", { className: "flex items-center space-x-2 mb-2", children: [jsx("div", { className: "flex items-center space-x-1", children: [1, 2, 3, 4, 5].map((star) => (jsx(Star, { className: `h-4 w-4 ${star <= review.rating
|
|
47
|
+
? 'text-yellow-400 fill-current'
|
|
48
|
+
: 'text-gray-300'}` }, star))) }), jsx("span", { className: "text-sm text-gray-600", children: review.date })] }), jsx("h4", { className: "font-medium text-gray-900 mb-2", children: review.title }), jsx("p", { className: "text-gray-600 mb-4", children: review.comment }), jsx("div", { className: "flex items-center space-x-4", children: jsxs("button", { className: "flex items-center space-x-1 text-sm text-gray-600 hover:text-gray-900", children: [jsx(ThumbsUp, { className: "h-4 w-4" }), jsxs("span", { children: ["Helpful (", review.helpful, ")"] })] }) })] })] }) }) }, review.id)))] }) })] }) }), jsxs("div", { className: "mt-16", children: [jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-8", children: "Related Products" }), jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6", children: relatedProducts.map((relatedProduct) => (jsxs(Card, { className: "hover:shadow-lg transition-shadow", children: [jsx("div", { className: "aspect-square bg-gray-100 rounded-t-lg overflow-hidden", children: jsx("img", { src: relatedProduct.images[0], alt: relatedProduct.name, className: "w-full h-full object-cover" }) }), jsxs(CardContent, { className: "p-4", children: [jsx("h3", { className: "font-medium text-gray-900 mb-2 line-clamp-2", children: relatedProduct.name }), jsxs("div", { className: "flex items-center space-x-1 mb-2", children: [jsx(Star, { className: "h-4 w-4 text-yellow-400 fill-current" }), jsxs("span", { className: "text-sm text-gray-600", children: [relatedProduct.rating, " (", relatedProduct.reviewCount, ")"] })] }), jsxs("div", { className: "flex items-center justify-between", children: [jsxs("span", { className: "text-lg font-bold text-gray-900", children: ["$", relatedProduct.price.toFixed(2)] }), jsx(Button, { size: "sm", variant: "outline", children: "View" })] })] })] }, relatedProduct.id))) })] })] }));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { SingleProductView };
|
|
52
|
+
//# sourceMappingURL=SingleProductView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleProductView.js","sources":["../../../src/components/Marketplace/SingleProductView.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { \n Star, \n Heart, \n Share2, \n ShoppingCart, \n Zap, \n Shield, \n Truck, \n RotateCcw,\n ChevronLeft,\n ChevronRight,\n Plus,\n Minus,\n Check,\n ThumbsUp\n} from 'lucide-react';\nimport { Button } from '../Button';\nimport { Card, CardHeader, CardTitle, CardContent } from '../Card';\nimport { Badge } from '../Badge';\nimport { Avatar, AvatarImage, AvatarFallback } from '../Avatar';\nimport { Input } from '../Input';\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../Tabs';\nimport { showToast } from '../Toast';\nimport type { Product, Review } from './types';\nimport { sampleProducts, sampleReviews } from './data/sampleData';\n\ninterface SingleProductViewProps {\n productId?: string;\n onAddToCart?: (product: Product, quantity: number) => void;\n onBuyNow?: (product: Product, quantity: number) => void;\n}\n\nexport const SingleProductView: React.FC<SingleProductViewProps> = ({\n productId = '1',\n onAddToCart,\n onBuyNow,\n}) => {\n const [selectedImageIndex, setSelectedImageIndex] = useState(0);\n const [quantity, setQuantity] = useState(1);\n const [isWishlisted, setIsWishlisted] = useState(false);\n const [selectedTab, setSelectedTab] = useState('description');\n\n // Get product data (in real app, this would come from API)\n const product = sampleProducts.find(p => p.id === productId) || sampleProducts[0];\n const reviews = sampleReviews;\n const relatedProducts = sampleProducts.slice(1, 5);\n\n const handleAddToCart = () => {\n onAddToCart?.(product, quantity);\n showToast.success(`Added ${quantity} item(s) to cart!`);\n };\n\n const handleBuyNow = () => {\n onBuyNow?.(product, quantity);\n showToast.info('Redirecting to checkout...');\n };\n\n const handleShare = () => {\n navigator.clipboard.writeText(window.location.href);\n showToast.success('Product link copied to clipboard!');\n };\n\n const nextImage = () => {\n setSelectedImageIndex((prev) => \n prev === product.images.length - 1 ? 0 : prev + 1\n );\n };\n\n const prevImage = () => {\n setSelectedImageIndex((prev) => \n prev === 0 ? product.images.length - 1 : prev - 1\n );\n };\n\n return (\n <div className=\"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8\">\n {/* Breadcrumb */}\n <nav className=\"flex items-center space-x-2 text-sm text-gray-600 mb-8\">\n <a href=\"/\" className=\"hover:text-primary-600\">Home</a>\n <span>/</span>\n <a href=\"/products\" className=\"hover:text-primary-600\">Products</a>\n <span>/</span>\n <a href={`/category/${product.category.toLowerCase()}`} className=\"hover:text-primary-600\">\n {product.category}\n </a>\n <span>/</span>\n <span className=\"text-gray-900\">{product.name}</span>\n </nav>\n\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-12\">\n {/* Product Images */}\n <div>\n {/* Main Image */}\n <div className=\"relative aspect-square bg-gray-100 rounded-lg overflow-hidden mb-4\">\n <img\n src={product.images[selectedImageIndex]}\n alt={product.name}\n className=\"w-full h-full object-cover\"\n />\n {product.images.length > 1 && (\n <>\n <button\n onClick={prevImage}\n className=\"absolute left-4 top-1/2 transform -translate-y-1/2 bg-white/80 hover:bg-white rounded-full p-2 shadow-lg transition-colors\"\n >\n <ChevronLeft className=\"h-5 w-5\" />\n </button>\n <button\n onClick={nextImage}\n className=\"absolute right-4 top-1/2 transform -translate-y-1/2 bg-white/80 hover:bg-white rounded-full p-2 shadow-lg transition-colors\"\n >\n <ChevronRight className=\"h-5 w-5\" />\n </button>\n </>\n )}\n {product.discount && (\n <Badge variant=\"danger\" className=\"absolute top-4 left-4\">\n -{product.discount}%\n </Badge>\n )}\n </div>\n\n {/* Thumbnail Images */}\n {product.images.length > 1 && (\n <div className=\"flex space-x-2 overflow-x-auto\">\n {product.images.map((image, index) => (\n <button\n key={index}\n onClick={() => setSelectedImageIndex(index)}\n className={`flex-shrink-0 w-20 h-20 rounded-lg overflow-hidden border-2 transition-colors ${\n selectedImageIndex === index\n ? 'border-primary-500'\n : 'border-gray-200 hover:border-gray-300'\n }`}\n >\n <img\n src={image}\n alt={`${product.name} ${index + 1}`}\n className=\"w-full h-full object-cover\"\n />\n </button>\n ))}\n </div>\n )}\n </div>\n\n {/* Product Details */}\n <div>\n {/* Vendor */}\n <div className=\"flex items-center space-x-2 mb-4\">\n <span className=\"text-sm text-gray-600\">Sold by</span>\n <div className=\"flex items-center space-x-2\">\n {product.vendor.logo && (\n <Avatar size=\"sm\">\n <AvatarImage src={product.vendor.logo} />\n <AvatarFallback>{product.vendor.name[0]}</AvatarFallback>\n </Avatar>\n )}\n <span className=\"font-medium text-primary-600\">{product.vendor.name}</span>\n <div className=\"flex items-center space-x-1\">\n <Star className=\"h-4 w-4 text-yellow-400 fill-current\" />\n <span className=\"text-sm text-gray-600\">{product.vendor.rating}</span>\n </div>\n </div>\n </div>\n\n {/* Product Title */}\n <h1 className=\"text-3xl font-bold text-gray-900 mb-4\">{product.name}</h1>\n\n {/* Rating and Reviews */}\n <div className=\"flex items-center space-x-4 mb-6\">\n <div className=\"flex items-center space-x-1\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`h-5 w-5 ${\n star <= Math.floor(product.rating)\n ? 'text-yellow-400 fill-current'\n : 'text-gray-300'\n }`}\n />\n ))}\n <span className=\"text-lg font-medium text-gray-900 ml-2\">\n {product.rating}\n </span>\n </div>\n <span className=\"text-gray-600\">({product.reviewCount} reviews)</span>\n <Badge variant={product.inStock ? 'success' : 'danger'}>\n {product.inStock ? 'In Stock' : 'Out of Stock'}\n </Badge>\n </div>\n\n {/* Price */}\n <div className=\"mb-6\">\n <div className=\"flex items-center space-x-3\">\n <span className=\"text-3xl font-bold text-gray-900\">\n ${product.price.toFixed(2)}\n </span>\n {product.originalPrice && (\n <span className=\"text-xl text-gray-500 line-through\">\n ${product.originalPrice.toFixed(2)}\n </span>\n )}\n {product.discount && (\n <Badge variant=\"danger\">Save {product.discount}%</Badge>\n )}\n </div>\n </div>\n\n {/* Description */}\n <p className=\"text-gray-600 mb-6 leading-relaxed\">{product.description}</p>\n\n {/* Quantity and Actions */}\n <div className=\"space-y-4 mb-8\">\n <div className=\"flex items-center space-x-4\">\n <span className=\"font-medium text-gray-900\">Quantity:</span>\n <div className=\"flex items-center border border-gray-300 rounded-lg\">\n <button\n onClick={() => setQuantity(Math.max(1, quantity - 1))}\n className=\"p-2 hover:bg-gray-50 transition-colors\"\n disabled={quantity <= 1}\n >\n <Minus className=\"h-4 w-4\" />\n </button>\n <Input\n type=\"number\"\n value={quantity}\n onChange={(e) => setQuantity(Math.max(1, parseInt(e.target.value) || 1))}\n className=\"w-16 text-center border-0 focus:ring-0\"\n min=\"1\"\n />\n <button\n onClick={() => setQuantity(quantity + 1)}\n className=\"p-2 hover:bg-gray-50 transition-colors\"\n >\n <Plus className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n\n <div className=\"flex space-x-4\">\n <Button\n variant=\"primary\"\n size=\"lg\"\n onClick={handleAddToCart}\n disabled={!product.inStock}\n className=\"flex-1\"\n >\n <ShoppingCart className=\"mr-2 h-5 w-5\" />\n Add to Cart\n </Button>\n <Button\n variant=\"secondary\"\n size=\"lg\"\n onClick={handleBuyNow}\n disabled={!product.inStock}\n className=\"flex-1\"\n >\n <Zap className=\"mr-2 h-5 w-5\" />\n Buy Now\n </Button>\n </div>\n\n <div className=\"flex space-x-2\">\n <Button\n variant=\"outline\"\n onClick={() => setIsWishlisted(!isWishlisted)}\n className=\"flex-1\"\n >\n <Heart className={`mr-2 h-5 w-5 ${isWishlisted ? 'fill-current text-red-500' : ''}`} />\n {isWishlisted ? 'Wishlisted' : 'Add to Wishlist'}\n </Button>\n <Button variant=\"outline\" onClick={handleShare}>\n <Share2 className=\"h-5 w-5\" />\n </Button>\n </div>\n </div>\n\n {/* Features */}\n <div className=\"grid grid-cols-2 gap-4 mb-8\">\n <div className=\"flex items-center space-x-2 text-sm text-gray-600\">\n <Truck className=\"h-4 w-4 text-green-600\" />\n <span>Free shipping</span>\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-gray-600\">\n <RotateCcw className=\"h-4 w-4 text-blue-600\" />\n <span>30-day returns</span>\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-gray-600\">\n <Shield className=\"h-4 w-4 text-purple-600\" />\n <span>2-year warranty</span>\n </div>\n <div className=\"flex items-center space-x-2 text-sm text-gray-600\">\n <Check className=\"h-4 w-4 text-green-600\" />\n <span>Authentic product</span>\n </div>\n </div>\n </div>\n </div>\n\n {/* Product Details Tabs */}\n <div className=\"mt-16\">\n <Tabs value={selectedTab} onValueChange={setSelectedTab}>\n <TabsList>\n <TabsTrigger value=\"description\">Description</TabsTrigger>\n <TabsTrigger value=\"specifications\">Specifications</TabsTrigger>\n <TabsTrigger value=\"reviews\">Reviews ({reviews.length})</TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"description\" className=\"mt-8\">\n <Card>\n <CardContent className=\"p-8\">\n <h3 className=\"text-xl font-semibold mb-4\">Product Description</h3>\n <div className=\"prose max-w-none\">\n <p className=\"text-gray-600 leading-relaxed mb-4\">\n {product.description}\n </p>\n <p className=\"text-gray-600 leading-relaxed\">\n This premium product offers exceptional quality and performance, \n designed to meet the highest standards. With advanced features and \n reliable construction, it's perfect for both professional and personal use.\n </p>\n </div>\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"specifications\" className=\"mt-8\">\n <Card>\n <CardContent className=\"p-8\">\n <h3 className=\"text-xl font-semibold mb-4\">Technical Specifications</h3>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {Object.entries(product.specifications).map(([key, value]) => (\n <div key={key} className=\"flex justify-between py-2 border-b border-gray-100\">\n <span className=\"font-medium text-gray-900\">{key}:</span>\n <span className=\"text-gray-600\">{value}</span>\n </div>\n ))}\n </div>\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"reviews\" className=\"mt-8\">\n <div className=\"space-y-6\">\n {/* Reviews Summary */}\n <Card>\n <CardContent className=\"p-8\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-8\">\n <div>\n <h3 className=\"text-xl font-semibold mb-4\">Customer Reviews</h3>\n <div className=\"flex items-center space-x-4 mb-4\">\n <span className=\"text-4xl font-bold text-gray-900\">\n {product.rating}\n </span>\n <div>\n <div className=\"flex items-center space-x-1 mb-1\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`h-5 w-5 ${\n star <= Math.floor(product.rating)\n ? 'text-yellow-400 fill-current'\n : 'text-gray-300'\n }`}\n />\n ))}\n </div>\n <span className=\"text-gray-600\">\n Based on {product.reviewCount} reviews\n </span>\n </div>\n </div>\n </div>\n <div>\n <Button variant=\"primary\" className=\"w-full\">\n Write a Review\n </Button>\n </div>\n </div>\n </CardContent>\n </Card>\n\n {/* Individual Reviews */}\n {reviews.map((review) => (\n <Card key={review.id}>\n <CardContent className=\"p-6\">\n <div className=\"flex items-start space-x-4\">\n <Avatar>\n <AvatarImage src={review.userAvatar} />\n <AvatarFallback>{review.userName[0]}</AvatarFallback>\n </Avatar>\n <div className=\"flex-1\">\n <div className=\"flex items-center space-x-2 mb-2\">\n <span className=\"font-medium text-gray-900\">{review.userName}</span>\n {review.verified && (\n <Badge variant=\"success\" className=\"text-xs\">\n Verified Purchase\n </Badge>\n )}\n </div>\n <div className=\"flex items-center space-x-2 mb-2\">\n <div className=\"flex items-center space-x-1\">\n {[1, 2, 3, 4, 5].map((star) => (\n <Star\n key={star}\n className={`h-4 w-4 ${\n star <= review.rating\n ? 'text-yellow-400 fill-current'\n : 'text-gray-300'\n }`}\n />\n ))}\n </div>\n <span className=\"text-sm text-gray-600\">{review.date}</span>\n </div>\n <h4 className=\"font-medium text-gray-900 mb-2\">{review.title}</h4>\n <p className=\"text-gray-600 mb-4\">{review.comment}</p>\n <div className=\"flex items-center space-x-4\">\n <button className=\"flex items-center space-x-1 text-sm text-gray-600 hover:text-gray-900\">\n <ThumbsUp className=\"h-4 w-4\" />\n <span>Helpful ({review.helpful})</span>\n </button>\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </TabsContent>\n </Tabs>\n </div>\n\n {/* Related Products */}\n <div className=\"mt-16\">\n <h2 className=\"text-2xl font-bold text-gray-900 mb-8\">Related Products</h2>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6\">\n {relatedProducts.map((relatedProduct) => (\n <Card key={relatedProduct.id} className=\"hover:shadow-lg transition-shadow\">\n <div className=\"aspect-square bg-gray-100 rounded-t-lg overflow-hidden\">\n <img\n src={relatedProduct.images[0]}\n alt={relatedProduct.name}\n className=\"w-full h-full object-cover\"\n />\n </div>\n <CardContent className=\"p-4\">\n <h3 className=\"font-medium text-gray-900 mb-2 line-clamp-2\">\n {relatedProduct.name}\n </h3>\n <div className=\"flex items-center space-x-1 mb-2\">\n <Star className=\"h-4 w-4 text-yellow-400 fill-current\" />\n <span className=\"text-sm text-gray-600\">\n {relatedProduct.rating} ({relatedProduct.reviewCount})\n </span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-lg font-bold text-gray-900\">\n ${relatedProduct.price.toFixed(2)}\n </span>\n <Button size=\"sm\" variant=\"outline\">\n View\n </Button>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n </div>\n );\n};"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;AAiCO,MAAM,iBAAiB,GAAqC,CAAC,EAClE,SAAS,GAAG,GAAG,EACf,WAAW,EACX,QAAQ,GACT,KAAI;IACH,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAC/D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IACvD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC;;IAG7D,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC;IACjF,MAAM,OAAO,GAAG,aAAa;IAC7B,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAElD,MAAM,eAAe,GAAG,MAAK;AAC3B,QAAA,WAAW,GAAG,OAAO,EAAE,QAAQ,CAAC;AAChC,QA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cAAc,CAAC,MAAM,EAAA,IAAA,EAAI,cAAc,CAAC,WAAW,EAAA,GAAA,CAAA,EAAA,CAC/C,CAAA,EAAA,CACH,EACNA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mCAAmC,EAAA,QAAA,EAAA,CAChDA,IAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,iCAAiC,EAAA,QAAA,EAAA,CAAA,GAAA,EAC7C,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA,EAAA,CAC5B,EACPC,GAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAA,QAAA,EAAA,MAAA,EAAA,CAE1B,IACL,CAAA,EAAA,CACM,CAAA,EAAA,EA1BL,cAAc,CAAC,EAAE,CA2BrB,CACR,CAAC,EAAA,CACE,CAAA,EAAA,CACF,CAAA,EAAA,CACF;AAEV;;;;"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// Sample product data for demonstration
|
|
2
|
+
const sampleProducts = [
|
|
3
|
+
{
|
|
4
|
+
id: '1',
|
|
5
|
+
name: 'Premium Wireless Headphones',
|
|
6
|
+
description: 'High-quality wireless headphones with active noise cancellation and 30-hour battery life.',
|
|
7
|
+
price: 299.99,
|
|
8
|
+
originalPrice: 399.99,
|
|
9
|
+
discount: 25,
|
|
10
|
+
images: [
|
|
11
|
+
'https://images.pexels.com/photos/3394650/pexels-photo-3394650.jpeg?auto=compress&cs=tinysrgb&w=800',
|
|
12
|
+
'https://images.pexels.com/photos/1649771/pexels-photo-1649771.jpeg?auto=compress&cs=tinysrgb&w=800',
|
|
13
|
+
'https://images.pexels.com/photos/1649772/pexels-photo-1649772.jpeg?auto=compress&cs=tinysrgb&w=800',
|
|
14
|
+
],
|
|
15
|
+
category: 'Electronics',
|
|
16
|
+
brand: 'AudioTech',
|
|
17
|
+
rating: 4.5,
|
|
18
|
+
reviewCount: 128,
|
|
19
|
+
inStock: true,
|
|
20
|
+
specifications: {
|
|
21
|
+
'Battery Life': '30 hours',
|
|
22
|
+
'Connectivity': 'Bluetooth 5.0',
|
|
23
|
+
'Weight': '250g',
|
|
24
|
+
'Noise Cancellation': 'Active',
|
|
25
|
+
'Warranty': '2 years',
|
|
26
|
+
},
|
|
27
|
+
tags: ['wireless', 'noise-cancelling', 'premium'],
|
|
28
|
+
vendor: {
|
|
29
|
+
id: 'v1',
|
|
30
|
+
name: 'AudioTech Store',
|
|
31
|
+
rating: 4.8,
|
|
32
|
+
logo: 'https://images.pexels.com/photos/1649771/pexels-photo-1649771.jpeg?auto=compress&cs=tinysrgb&w=64',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: '2',
|
|
37
|
+
name: 'Smart Fitness Watch',
|
|
38
|
+
description: 'Advanced fitness tracking with heart rate monitoring, GPS, and 7-day battery life.',
|
|
39
|
+
price: 199.99,
|
|
40
|
+
images: [
|
|
41
|
+
'https://images.pexels.com/photos/437037/pexels-photo-437037.jpeg?auto=compress&cs=tinysrgb&w=800',
|
|
42
|
+
'https://images.pexels.com/photos/437038/pexels-photo-437038.jpeg?auto=compress&cs=tinysrgb&w=800',
|
|
43
|
+
],
|
|
44
|
+
category: 'Wearables',
|
|
45
|
+
brand: 'FitTech',
|
|
46
|
+
rating: 4.3,
|
|
47
|
+
reviewCount: 89,
|
|
48
|
+
inStock: true,
|
|
49
|
+
specifications: {
|
|
50
|
+
'Battery Life': '7 days',
|
|
51
|
+
'Display': '1.4" AMOLED',
|
|
52
|
+
'Water Resistance': '5ATM',
|
|
53
|
+
'GPS': 'Built-in',
|
|
54
|
+
'Sensors': 'Heart Rate, SpO2, Accelerometer',
|
|
55
|
+
},
|
|
56
|
+
tags: ['fitness', 'smartwatch', 'gps'],
|
|
57
|
+
vendor: {
|
|
58
|
+
id: 'v2',
|
|
59
|
+
name: 'FitTech Official',
|
|
60
|
+
rating: 4.6,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: '3',
|
|
65
|
+
name: 'Professional Camera Lens',
|
|
66
|
+
description: '85mm f/1.4 portrait lens with exceptional image quality and beautiful bokeh.',
|
|
67
|
+
price: 899.99,
|
|
68
|
+
images: [
|
|
69
|
+
'https://images.pexels.com/photos/90946/pexels-photo-90946.jpeg?auto=compress&cs=tinysrgb&w=800',
|
|
70
|
+
],
|
|
71
|
+
category: 'Photography',
|
|
72
|
+
brand: 'LensMaster',
|
|
73
|
+
rating: 4.8,
|
|
74
|
+
reviewCount: 45,
|
|
75
|
+
inStock: false,
|
|
76
|
+
specifications: {
|
|
77
|
+
'Focal Length': '85mm',
|
|
78
|
+
'Aperture': 'f/1.4',
|
|
79
|
+
'Mount': 'Canon EF',
|
|
80
|
+
'Weight': '950g',
|
|
81
|
+
'Filter Size': '77mm',
|
|
82
|
+
},
|
|
83
|
+
tags: ['portrait', 'professional', 'bokeh'],
|
|
84
|
+
vendor: {
|
|
85
|
+
id: 'v3',
|
|
86
|
+
name: 'Camera World',
|
|
87
|
+
rating: 4.9,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
// Add more sample products...
|
|
91
|
+
...Array.from({ length: 20 }, (_, i) => ({
|
|
92
|
+
id: `${i + 4}`,
|
|
93
|
+
name: `Product ${i + 4}`,
|
|
94
|
+
description: `Description for product ${i + 4}`,
|
|
95
|
+
price: Math.floor(Math.random() * 500) + 50,
|
|
96
|
+
images: [`https://images.pexels.com/photos/${1000000 + i}/pexels-photo-${1000000 + i}.jpeg?auto=compress&cs=tinysrgb&w=800`],
|
|
97
|
+
category: ['Electronics', 'Clothing', 'Home', 'Sports'][Math.floor(Math.random() * 4)],
|
|
98
|
+
brand: ['Brand A', 'Brand B', 'Brand C'][Math.floor(Math.random() * 3)],
|
|
99
|
+
rating: Math.round((Math.random() * 2 + 3) * 10) / 10,
|
|
100
|
+
reviewCount: Math.floor(Math.random() * 200) + 10,
|
|
101
|
+
inStock: Math.random() > 0.2,
|
|
102
|
+
specifications: {
|
|
103
|
+
'Feature 1': 'Value 1',
|
|
104
|
+
'Feature 2': 'Value 2',
|
|
105
|
+
},
|
|
106
|
+
tags: ['tag1', 'tag2'],
|
|
107
|
+
vendor: {
|
|
108
|
+
id: `v${i + 4}`,
|
|
109
|
+
name: `Vendor ${i + 4}`,
|
|
110
|
+
rating: Math.round((Math.random() * 1 + 4) * 10) / 10,
|
|
111
|
+
},
|
|
112
|
+
})),
|
|
113
|
+
];
|
|
114
|
+
const sampleReviews = [
|
|
115
|
+
{
|
|
116
|
+
id: '1',
|
|
117
|
+
userId: 'u1',
|
|
118
|
+
userName: 'John Smith',
|
|
119
|
+
userAvatar: 'https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&w=64',
|
|
120
|
+
rating: 5,
|
|
121
|
+
title: 'Excellent quality!',
|
|
122
|
+
comment: 'These headphones exceeded my expectations. The sound quality is amazing and the noise cancellation works perfectly.',
|
|
123
|
+
date: '2024-01-15',
|
|
124
|
+
helpful: 12,
|
|
125
|
+
verified: true,
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: '2',
|
|
129
|
+
userId: 'u2',
|
|
130
|
+
userName: 'Sarah Johnson',
|
|
131
|
+
userAvatar: 'https://images.pexels.com/photos/415829/pexels-photo-415829.jpeg?auto=compress&cs=tinysrgb&w=64',
|
|
132
|
+
rating: 4,
|
|
133
|
+
title: 'Great value for money',
|
|
134
|
+
comment: 'Good headphones for the price. Battery life is as advertised and they are comfortable to wear.',
|
|
135
|
+
date: '2024-01-10',
|
|
136
|
+
helpful: 8,
|
|
137
|
+
verified: true,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: '3',
|
|
141
|
+
userId: 'u3',
|
|
142
|
+
userName: 'Mike Wilson',
|
|
143
|
+
rating: 5,
|
|
144
|
+
title: 'Perfect for work',
|
|
145
|
+
comment: 'Use these daily for work calls and music. The noise cancellation is a game changer in the office.',
|
|
146
|
+
date: '2024-01-05',
|
|
147
|
+
helpful: 15,
|
|
148
|
+
verified: false,
|
|
149
|
+
},
|
|
150
|
+
];
|
|
151
|
+
|
|
152
|
+
export { sampleProducts, sampleReviews };
|
|
153
|
+
//# sourceMappingURL=sampleData.js.map
|