@catalystsoftware/ui 1.0.5 → 1.0.6

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.
Files changed (155) hide show
  1. package/dist/data/data.tsx +29 -29
  2. package/dist/data/tailwind.config.js +3821 -261
  3. package/dist/data.tsx +29 -29
  4. package/package.json +4 -3
  5. package/components/catalyst-ui/buttons/burger.tsx +0 -207
  6. package/components/catalyst-ui/core/data-display/timeline.tsx +0 -210
  7. package/components/catalyst-ui/core/feedback/alert.tsx +0 -491
  8. package/components/catalyst-ui/core/feedback/spinner-1.tsx +0 -65
  9. package/components/catalyst-ui/core/feedback/toast.tsx +0 -1857
  10. package/components/catalyst-ui/core/navigation/menu.tsx +0 -164
  11. package/components/catalyst-ui/forms/toggle-class.tsx +0 -176
  12. package/components/catalyst-ui/hooks/use-copy-to-clipboard.tsx +0 -419
  13. package/components/catalyst-ui/hooks/use-counter.tsx +0 -13
  14. package/components/catalyst-ui/hooks/use-event-listener.tsx +0 -23
  15. package/components/catalyst-ui/hooks/use-export-markdown.tsx +0 -47
  16. package/components/catalyst-ui/hooks/use-focus.tsx +0 -17
  17. package/components/catalyst-ui/hooks/use-interval.tsx +0 -23
  18. package/components/catalyst-ui/hooks/use-is-client.tsx +0 -16
  19. package/components/catalyst-ui/hooks/use-media-query.tsx +0 -19
  20. package/components/catalyst-ui/hooks/use-mobile.tsx +0 -19
  21. package/components/catalyst-ui/hooks/use-resize-observer.tsx +0 -81
  22. package/components/catalyst-ui/hooks/use-timeout.tsx +0 -21
  23. package/components/catalyst-ui/hooks/use-timer.tsx +0 -209
  24. package/components/catalyst-ui/hooks/use-toggle.tsx +0 -12
  25. package/components/catalyst-ui/media/image.tsx +0 -13
  26. package/components/catalyst-ui/overlays/dual-sidebar.tsx +0 -4142
  27. package/components/catalyst-ui/overlays/sidebar-original.tsx +0 -726
  28. package/components/catalyst-ui/primitives/accordion.tsx +0 -250
  29. package/components/catalyst-ui/primitives/alert-dialog.tsx +0 -126
  30. package/components/catalyst-ui/primitives/aspect-ratio.tsx +0 -9
  31. package/components/catalyst-ui/primitives/avatar.tsx +0 -296
  32. package/components/catalyst-ui/primitives/badge.tsx +0 -57
  33. package/components/catalyst-ui/primitives/breadcrumb.tsx +0 -101
  34. package/components/catalyst-ui/primitives/button.tsx +0 -265
  35. package/components/catalyst-ui/primitives/calendar-v4.tsx +0 -208
  36. package/components/catalyst-ui/primitives/calendar.tsx +0 -295
  37. package/components/catalyst-ui/primitives/card.tsx +0 -618
  38. package/components/catalyst-ui/primitives/carousel.tsx +0 -238
  39. package/components/catalyst-ui/primitives/chart.tsx +0 -347
  40. package/components/catalyst-ui/primitives/checkbox.tsx +0 -225
  41. package/components/catalyst-ui/primitives/collapsible.tsx +0 -212
  42. package/components/catalyst-ui/primitives/command.tsx +0 -393
  43. package/components/catalyst-ui/primitives/context-menu.tsx +0 -236
  44. package/components/catalyst-ui/primitives/dialog.tsx +0 -471
  45. package/components/catalyst-ui/primitives/drawer.tsx +0 -761
  46. package/components/catalyst-ui/primitives/dropdown-menu.tsx +0 -290
  47. package/components/catalyst-ui/primitives/empty.tsx +0 -104
  48. package/components/catalyst-ui/primitives/field.tsx +0 -244
  49. package/components/catalyst-ui/primitives/hover-card.tsx +0 -124
  50. package/components/catalyst-ui/primitives/input-otp.tsx +0 -76
  51. package/components/catalyst-ui/primitives/input.tsx +0 -64
  52. package/components/catalyst-ui/primitives/item.tsx +0 -196
  53. package/components/catalyst-ui/primitives/kbd.tsx +0 -75
  54. package/components/catalyst-ui/primitives/label.tsx +0 -24
  55. package/components/catalyst-ui/primitives/navigation-menu.tsx +0 -150
  56. package/components/catalyst-ui/primitives/pagination.tsx +0 -198
  57. package/components/catalyst-ui/primitives/popover.tsx +0 -232
  58. package/components/catalyst-ui/primitives/progress.tsx +0 -34
  59. package/components/catalyst-ui/primitives/radio-group.tsx +0 -43
  60. package/components/catalyst-ui/primitives/resizable.tsx +0 -56
  61. package/components/catalyst-ui/primitives/select.tsx +0 -155
  62. package/components/catalyst-ui/primitives/separator.tsx +0 -74
  63. package/components/catalyst-ui/primitives/sheet.tsx +0 -126
  64. package/components/catalyst-ui/primitives/skeleton.tsx +0 -15
  65. package/components/catalyst-ui/primitives/slider.tsx +0 -27
  66. package/components/catalyst-ui/primitives/switch.tsx +0 -187
  67. package/components/catalyst-ui/primitives/tabs.tsx +0 -335
  68. package/components/catalyst-ui/primitives/textarea.tsx +0 -24
  69. package/components/catalyst-ui/primitives/toggle-group.tsx +0 -55
  70. package/components/catalyst-ui/primitives/toggle.tsx +0 -42
  71. package/components/catalyst-ui/primitives/tooltip.tsx +0 -116
  72. package/components/catalyst-ui/utils/basic-auth.tsx +0 -40
  73. package/components/catalyst-ui/utils/context-storage.tsx +0 -19
  74. package/components/catalyst-ui/utils/cors-middleware.tsx +0 -71
  75. package/components/catalyst-ui/utils/deferred-content.tsx +0 -595
  76. package/components/catalyst-ui/utils/honeypot-middleware.tsx +0 -38
  77. package/components/catalyst-ui/utils/incId.tsx +0 -75
  78. package/components/catalyst-ui/utils/jwk-auth.tsx +0 -36
  79. package/components/catalyst-ui/utils/request-id.tsx +0 -14
  80. package/components/catalyst-ui/utils/secure-headers.tsx +0 -37
  81. package/components/catalyst-ui/utils/server-timing.tsx +0 -23
  82. package/components/catalyst-ui/utils/utils.ts +0 -43
  83. package/components/catalyst-ui/utils/with-cookie.tsx +0 -43
  84. package/components/catalyst-ui/x/accordian-x.tsx +0 -428
  85. package/components/catalyst-ui/x/alert-x.tsx +0 -413
  86. package/components/catalyst-ui/x/animated-text-x.tsx +0 -2242
  87. package/components/catalyst-ui/x/avatar-x.tsx +0 -515
  88. package/components/catalyst-ui/x/badge-x.tsx +0 -670
  89. package/components/catalyst-ui/x/button-X.tsx +0 -2857
  90. package/components/catalyst-ui/x/button-group-x.tsx +0 -847
  91. package/components/catalyst-ui/x/calendar-x.tsx +0 -1910
  92. package/components/catalyst-ui/x/card-x.tsx +0 -2597
  93. package/components/catalyst-ui/x/checkbox-x.tsx +0 -656
  94. package/components/catalyst-ui/x/collapsible-x.tsx +0 -1360
  95. package/components/catalyst-ui/x/combobox-x.tsx +0 -911
  96. package/components/catalyst-ui/x/data-table-x.tsx +0 -1753
  97. package/components/catalyst-ui/x/date-picker-x.tsx +0 -648
  98. package/components/catalyst-ui/x/dialog-x.tsx +0 -659
  99. package/components/catalyst-ui/x/dropdown-menu-x.tsx +0 -612
  100. package/components/catalyst-ui/x/hover-card-x.tsx +0 -375
  101. package/components/catalyst-ui/x/icon-x.tsx +0 -840
  102. package/components/catalyst-ui/x/input-mask-x.tsx +0 -981
  103. package/components/catalyst-ui/x/input-otp-x.tsx +0 -659
  104. package/components/catalyst-ui/x/loader-x.tsx +0 -1757
  105. package/components/catalyst-ui/x/pagination-x.tsx +0 -622
  106. package/components/catalyst-ui/x/popover-x.tsx +0 -744
  107. package/components/catalyst-ui/x/radio-group-x.tsx +0 -499
  108. package/components/catalyst-ui/x/select-x.tsx +0 -1127
  109. package/components/catalyst-ui/x/sheet-x.tsx +0 -668
  110. package/components/catalyst-ui/x/switch-x.tsx +0 -681
  111. package/components/catalyst-ui/x/table-x.tsx +0 -574
  112. package/components/catalyst-ui/x/tabs-x.tsx +0 -839
  113. package/components/catalyst-ui/x/textarea-x.tsx +0 -1263
  114. package/components/catalyst-ui/x/tooltip-x.tsx +0 -396
  115. package/components/catalyst-ui/x/tracker-x.tsx +0 -560
  116. package/data/bg-data.tsx +0 -901
  117. package/data/buttons-data.tsx +0 -2327
  118. package/data/charts-data.tsx +0 -102
  119. package/data/chat-data.tsx +0 -83
  120. package/data/code-data.tsx +0 -1040
  121. package/data/comboboxes-data.tsx +0 -1843
  122. package/data/command-data.tsx +0 -1381
  123. package/data/core-data.tsx +0 -15953
  124. package/data/crm-data.tsx +0 -47
  125. package/data/data.tsx +0 -159
  126. package/data/date-and-time-data.tsx +0 -554
  127. package/data/dependencies.tsx +0 -7
  128. package/data/ecommerce-data.tsx +0 -1387
  129. package/data/forms-data.tsx +0 -7890
  130. package/data/hooks-data.tsx +0 -5487
  131. package/data/index.ts +0 -34
  132. package/data/inputs-data.tsx +0 -557
  133. package/data/interactive-data.tsx +0 -5394
  134. package/data/lofi-data.tsx +0 -18295
  135. package/data/marketing-data.tsx +0 -2546
  136. package/data/media-data.tsx +0 -1510
  137. package/data/motion-data.tsx +0 -5801
  138. package/data/overlay-data.tsx +0 -4136
  139. package/data/pdf-data.tsx +0 -124
  140. package/data/pos-data.tsx +0 -213
  141. package/data/postcss.config.js +0 -6
  142. package/data/primitive-data.tsx +0 -5170
  143. package/data/prompt-data.tsx +0 -1226
  144. package/data/requiredLibs.ts +0 -4
  145. package/data/sandbox-data.tsx +0 -1
  146. package/data/sidebars-data.tsx +0 -5421
  147. package/data/stacks-data.tsx +0 -32
  148. package/data/table-data.tsx +0 -706
  149. package/data/tailwind.config.js +0 -270
  150. package/data/tailwind.config.ngin.js +0 -3830
  151. package/data/tailwind.css +0 -431
  152. package/data/tools-data.tsx +0 -6910
  153. package/data/typography-data.tsx +0 -2050
  154. package/data/utils-data.tsx +0 -6500
  155. package/data/x-data.tsx +0 -1171
@@ -1,1387 +0,0 @@
1
- export const ecommerceComponents = [
2
- {
3
- name: "Category Filters",
4
- value: "category-filters",
5
- path: "/components/catalyst-ui/ecommerce/components/categoryFilters.tsx",
6
- premium: true,
7
- source: null,
8
- category: 'E-Commerce: Components',
9
- tags: ["components", "e-commerce", "filters", "search"],
10
- features: ["Responsive", "TypeScript", "Accessible"],
11
- dependencies: ["lucide-react"],
12
- usage: `
13
-
14
-
15
-
16
- export function CategoryFiltersDemo() {
17
- const [filters, setFilters] = useState({});
18
- const [searchTerm, setSearchTerm] = useState("");
19
-
20
- const demoFilters = [
21
- {
22
- key: 'category',
23
- label: 'Category',
24
- type: 'checkbox',
25
- options: [
26
- { value: 'electronics', label: 'Electronics', count: 124 },
27
- { value: 'clothing', label: 'Clothing', count: 89 },
28
- { value: 'books', label: 'Books', count: 45 },
29
- { value: 'home', label: 'Home & Garden', count: 67 },
30
- ]
31
- },
32
- {
33
- key: 'price',
34
- label: 'Price Range',
35
- type: 'range',
36
- minPlaceholder: '$0',
37
- maxPlaceholder: '$1000'
38
- },
39
- {
40
- key: 'brand',
41
- label: 'Brand',
42
- type: 'radio',
43
- options: [
44
- { value: 'apple', label: 'Apple', count: 23 },
45
- { value: 'samsung', label: 'Samsung', count: 31 },
46
- { value: 'nike', label: 'Nike', count: 18 },
47
- { value: 'adidas', label: 'Adidas', count: 15 },
48
- ]
49
- },
50
- {
51
- key: 'color',
52
- label: 'Color',
53
- type: 'color',
54
- options: [
55
- { value: 'black', label: 'Black', color: '#000000' },
56
- { value: 'white', label: 'White', color: '#FFFFFF' },
57
- { value: 'red', label: 'Red', color: '#EF4444' },
58
- { value: 'blue', label: 'Blue', color: '#3B82F6' },
59
- { value: 'green', label: 'Green', color: '#10B981' },
60
- { value: 'yellow', label: 'Yellow', color: '#F59E0B' },
61
- ]
62
- },
63
- {
64
- key: 'size',
65
- label: 'Size',
66
- type: 'checkbox',
67
- options: [
68
- { value: 'xs', label: 'XS', count: 12 },
69
- { value: 's', label: 'S', count: 24 },
70
- { value: 'm', label: 'M', count: 35 },
71
- { value: 'l', label: 'L', count: 28 },
72
- { value: 'xl', label: 'XL', count: 16 },
73
- ]
74
- }
75
- ];
76
-
77
- const handleFiltersChange = (newFilters) => {
78
- setFilters(newFilters);
79
- console.log('Active filters:', newFilters);
80
- };
81
-
82
- const handleSearchChange = (newSearchTerm) => {
83
- setSearchTerm(newSearchTerm);
84
- console.log('Search term:', newSearchTerm);
85
- };
86
-
87
- return (
88
- <div className="min-h-screen bg-background p-6">
89
- <div className="max-w-4xl mx-auto">
90
- <h1 className="text-2xl font-bold text-foreground mb-8">Category Filters Demo</h1>
91
-
92
- {/* Default Style */}
93
- <div className="mb-12">
94
- <h2 className="text-xl font-semibold mb-4 text-foreground">Default Style</h2>
95
- <div className="max-w-md">
96
- <CategoryFilters
97
- title="Filter Products"
98
- description="Find exactly what you're looking for"
99
- searchPlaceholder="Search products~/components/catalyst-ui."
100
- filters={demoFilters}
101
- onFiltersChange={handleFiltersChange}
102
- onSearchChange={handleSearchChange}
103
- style="default"
104
- />
105
- </div>
106
- </div>
107
-
108
- {/* Sidebar Style */}
109
- <div className="mb-12">
110
- <h2 className="text-xl font-semibold mb-4 text-foreground">Sidebar Style</h2>
111
- <div className="flex gap-6">
112
- <div className="w-80">
113
- <CategoryFilters
114
- title="Refine Search"
115
- description="Use filters to narrow down results"
116
- searchPlaceholder="Quick search~/components/catalyst-ui."
117
- filters={demoFilters}
118
- onFiltersChange={handleFiltersChange}
119
- onSearchChange={handleSearchChange}
120
- style="sidebar"
121
- />
122
- </div>
123
- <div className="flex-1 p-6 bg-muted/20 rounded-lg border-2 border-dashed border-muted-foreground/20">
124
- <div className="text-center text-muted-foreground">
125
- <p className="text-lg mb-2">Product Results Would Appear Here</p>
126
- <p className="text-sm">Current Search: "{searchTerm || 'None'}"</p>
127
- <p className="text-sm">Active Filters: {Object.keys(filters).length}</p>
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
-
133
- {/* Mobile/Responsive Style */}
134
- <div className="mb-12">
135
- <h2 className="text-xl font-semibold mb-4 text-foreground">Mobile/Responsive Style</h2>
136
- <div className="max-w-sm">
137
- <CategoryFilters
138
- title="Shop"
139
- description="Browse our collection"
140
- searchPlaceholder="What are you looking for?"
141
- filters={demoFilters.slice(0, 3)}
142
- onFiltersChange={handleFiltersChange}
143
- onSearchChange={handleSearchChange}
144
- style="mobile"
145
- />
146
- </div>
147
- </div>
148
- </div>
149
- </div>
150
- );
151
- }`,
152
- usagePath: null,
153
- desc: null,
154
- customize: null
155
- },
156
- {
157
- name: "Category Previews",
158
- value: "category-previews",
159
- path: "/components/catalyst-ui/ecommerce/components/categoryPreviews.tsx",
160
- premium: true,
161
- source: null,
162
- category: 'E-Commerce: Components',
163
- tags: ["components", "e-commerce"],
164
- features: ["Responsive", "TypeScript", "Accessible"],
165
- dependencies: ["lucide-react"],
166
- usage: `
167
-
168
-
169
- interface Product {
170
- id: string;
171
- name: string;
172
- description: string;
173
- price: number;
174
- originalPrice?: number;
175
- rating: number;
176
- reviewCount: number;
177
- image: string;
178
- tags: string[];
179
- category: string;
180
- inStock: boolean;
181
- isNew?: boolean;
182
- isFeatured?: boolean;
183
- }
184
-
185
- interface Category {
186
- id: string;
187
- name: string;
188
- description: string;
189
- image: string;
190
- productCount: number;
191
- featuredProducts: Product[];
192
- }
193
-
194
- export function CategoryPreviewsDemo() {
195
- // Sample categories data
196
- const sampleCategories: Category[] = [
197
- {
198
- id: "electronics",
199
- name: "Electronics",
200
- description: "Latest gadgets and devices",
201
- image: "/placeholder-electronics.jpg",
202
- productCount: 42,
203
- featuredProducts: [
204
- {
205
- id: "1",
206
- name: "Wireless Headphones",
207
- description: "Noise-cancelling wireless headphones with exceptional sound quality.",
208
- price: 299.99,
209
- originalPrice: 349.99,
210
- rating: 4.5,
211
- reviewCount: 124,
212
- image: "/placeholder-headphones.jpg",
213
- tags: ["Wireless", "Noise-Cancelling", "Bluetooth"],
214
- category: "electronics",
215
- inStock: true,
216
- isNew: true,
217
- isFeatured: true
218
- },
219
- {
220
- id: "2",
221
- name: "Smart Watch",
222
- description: "Advanced smartwatch with health monitoring and notifications.",
223
- price: 249.99,
224
- rating: 4.2,
225
- reviewCount: 89,
226
- image: "/placeholder-watch.jpg",
227
- tags: ["Wearable", "Fitness", "Smart"],
228
- category: "electronics",
229
- inStock: true,
230
- isFeatured: true
231
- },
232
- {
233
- id: "3",
234
- name: "Wireless Earbuds",
235
- description: "Compact true wireless earbuds with charging case.",
236
- price: 129.99,
237
- originalPrice: 149.99,
238
- rating: 4.3,
239
- reviewCount: 67,
240
- image: "/placeholder-earbuds.jpg",
241
- tags: ["Wireless", "Bluetooth", "Portable"],
242
- category: "electronics",
243
- inStock: true,
244
- isNew: true
245
- },
246
- {
247
- id: "4",
248
- name: "Bluetooth Speaker",
249
- description: "Portable speaker with 24-hour battery life.",
250
- price: 79.99,
251
- rating: 4.4,
252
- reviewCount: 92,
253
- image: "/placeholder-speaker.jpg",
254
- tags: ["Bluetooth", "Portable", "Waterproof"],
255
- category: "electronics",
256
- inStock: true
257
- }
258
- ]
259
- },
260
- {
261
- id: "clothing",
262
- name: "Clothing",
263
- description: "Fashionable apparel for everyone",
264
- image: "/placeholder-clothing.jpg",
265
- productCount: 38,
266
- featuredProducts: [
267
- {
268
- id: "5",
269
- name: "Premium T-Shirt",
270
- description: "100% cotton premium t-shirt with comfortable fit.",
271
- price: 29.99,
272
- originalPrice: 39.99,
273
- rating: 4.7,
274
- reviewCount: 156,
275
- image: "/placeholder-tshirt.jpg",
276
- tags: ["Cotton", "Comfort", "Casual"],
277
- category: "clothing",
278
- inStock: true,
279
- isNew: true
280
- },
281
- {
282
- id: "6",
283
- name: "Denim Jeans",
284
- description: "Classic denim jeans with modern fit.",
285
- price: 59.99,
286
- rating: 4.3,
287
- reviewCount: 204,
288
- image: "/placeholder-jeans.jpg",
289
- tags: ["Denim", "Classic", "Comfort"],
290
- category: "clothing",
291
- inStock: true
292
- },
293
- {
294
- id: "7",
295
- name: "Winter Jacket",
296
- description: "Warm winter jacket with water-resistant coating.",
297
- price: 129.99,
298
- rating: 4.6,
299
- reviewCount: 78,
300
- image: "/placeholder-jacket.jpg",
301
- tags: ["Winter", "Warm", "Water-Resistant"],
302
- category: "clothing",
303
- inStock: false
304
- },
305
- {
306
- id: "8",
307
- name: "Running Shoes",
308
- description: "Lightweight running shoes with extra cushioning.",
309
- price: 89.99,
310
- originalPrice: 109.99,
311
- rating: 4.5,
312
- reviewCount: 132,
313
- image: "/placeholder-shoes.jpg",
314
- tags: ["Running", "Comfort", "Lightweight"],
315
- category: "clothing",
316
- inStock: true,
317
- isFeatured: true
318
- }
319
- ]
320
- },
321
- {
322
- id: "home",
323
- name: "Home & Kitchen",
324
- description: "Everything for your home",
325
- image: "/placeholder-home.jpg",
326
- productCount: 27,
327
- featuredProducts: [
328
- {
329
- id: "9",
330
- name: "Coffee Maker",
331
- description: "Programmable coffee maker with thermal carafe.",
332
- price: 79.99,
333
- rating: 4.4,
334
- reviewCount: 187,
335
- image: "/placeholder-coffeemaker.jpg",
336
- tags: ["Coffee", "Kitchen", "Appliance"],
337
- category: "home",
338
- inStock: true
339
- },
340
- {
341
- id: "10",
342
- name: "Desk Lamp",
343
- description: "Modern LED desk lamp with adjustable brightness.",
344
- price: 39.99,
345
- originalPrice: 49.99,
346
- rating: 4.2,
347
- reviewCount: 95,
348
- image: "/placeholder-lamp.jpg",
349
- tags: ["LED", "Adjustable", "Modern"],
350
- category: "home",
351
- inStock: true,
352
- isNew: true
353
- },
354
- {
355
- id: "11",
356
- name: "Cutlery Set",
357
- description: "18-piece stainless steel cutlery set.",
358
- price: 49.99,
359
- rating: 4.8,
360
- reviewCount: 216,
361
- image: "/placeholder-cutlery.jpg",
362
- tags: ["Kitchen", "Stainless Steel", "Utensils"],
363
- category: "home",
364
- inStock: true,
365
- isFeatured: true
366
- },
367
- {
368
- id: "12",
369
- name: "Throw Pillow",
370
- description: "Decorative throw pillow with removable cover.",
371
- price: 24.99,
372
- rating: 4.1,
373
- reviewCount: 63,
374
- image: "/placeholder-pillow.jpg",
375
- tags: ["Decor", "Comfort", "Home"],
376
- category: "home",
377
- inStock: true
378
- }
379
- ]
380
- }
381
- ];
382
-
383
- const handleCategoryClick = (category: Category) => {
384
- console.log('Category clicked:', category);
385
- // Navigate to category page
386
- };
387
-
388
- const handleProductClick = (product: Product) => {
389
- console.log('Product clicked:', product);
390
- // Navigate to product detail page
391
- };
392
-
393
- const handleAddToCart = (product: Product) => {
394
- console.log('Added to cart:', product);
395
- // Add to cart logic
396
- };
397
-
398
- const handleAddToWishlist = (product: Product) => {
399
- console.log('Added to wishlist:', product);
400
- // Add to wishlist logic
401
- };
402
-
403
- return (
404
- <CategoryPreviews
405
- categories={sampleCategories}
406
- title="Shop by Category"
407
- description="Discover our curated collections"
408
- showFilters={true}
409
- showSearch={true}
410
- onCategoryClick={handleCategoryClick}
411
- onProductClick={handleProductClick}
412
- onAddToCart={handleAddToCart}
413
- onAddToWishlist={handleAddToWishlist}
414
- viewAllText="Browse all categories"
415
- viewAllUrl="/categories"
416
- />
417
- );
418
- }`,
419
- usagePath: null,
420
- desc: null,
421
- customize: null
422
- },
423
- {
424
- name: "Checkout Forms",
425
- value: "checkout-forms",
426
- path: "/components/catalyst-ui/ecommerce/components/checkoutForms.tsx",
427
- premium: true,
428
- source: null,
429
- category: 'E-Commerce: Components',
430
- tags: ["components", "e-commerce"],
431
- features: ["Responsive", "TypeScript", "Accessible"],
432
- dependencies: ["lucide-react"],
433
- usage: `
434
-
435
-
436
-
437
- export type CartItem = {
438
- id: string;
439
- name: string;
440
- price: number;
441
- quantity: number;
442
- image: string;
443
- color?: string;
444
- size?: string;
445
- };
446
-
447
- export type CheckoutFormProps = {
448
- title?: string;
449
- description?: string;
450
- primaryButtonText?: string;
451
- secondaryButtonText?: string;
452
- primaryButtonUrl?: string;
453
- secondaryButtonUrl?: string;
454
- className?: string;
455
- variant?: "default" | "simple" | "with-order-summary";
456
- items?: CartItem[];
457
- onUpdateQuantity?: (id: string, quantity: number) => void;
458
- onRemoveItem?: (id: string) => void;
459
- };
460
-
461
- export function CheckoutFormDemo() {
462
- const [cartItems, setCartItems] = useState([
463
- {
464
- id: "1",
465
- name: "Basic Tee",
466
- price: 32.00,
467
- quantity: 1,
468
- image: "https://tailwindui.com/img/ecommerce-images/shopping-cart-page-01-product-01.jpg",
469
- color: "Sienna",
470
- size: "M"
471
- },
472
- {
473
- id: "2",
474
- name: "Basic Bottle",
475
- price: 25.00,
476
- quantity: 1,
477
- image: "https://tailwindui.com/img/ecommerce-images/shopping-cart-page-01-product-02.jpg",
478
- color: "Clear"
479
- }
480
- ]);
481
-
482
- const handleUpdateQuantity = (id: string, quantity: number) => {
483
- setCartItems(prevItems =>
484
- prevItems.map(item =>
485
- item.id === id ? { ~/components/catalyst-ui.item, quantity } : item
486
- )
487
- );
488
- };
489
-
490
- const handleRemoveItem = (id: string) => {
491
- setCartItems(prevItems => prevItems.filter(item => item.id !== id));
492
- };
493
-
494
- return (
495
- <CheckoutForm
496
- title="Checkout"
497
- description="Complete your purchase by filling in the details below"
498
- primaryButtonText="Complete Order"
499
- secondaryButtonText="Continue Shopping"
500
- primaryButtonUrl="/order-confirmation"
501
- secondaryButtonUrl="/products"
502
- variant="default"
503
- items={cartItems}
504
- onUpdateQuantity={handleUpdateQuantity}
505
- onRemoveItem={handleRemoveItem}
506
- />
507
- );
508
- }`,
509
- usagePath: null,
510
- desc: null,
511
- customize: null
512
- },
513
- {
514
- name: "Incentives",
515
- value: "incentives",
516
- path: "/components/catalyst-ui/ecommerce/components/incentives.tsx",
517
- premium: true,
518
- source: null,
519
- category: 'E-Commerce: Components',
520
- tags: ["components", "e-commerce"],
521
- features: ["Responsive", "TypeScript", "Accessible"],
522
- dependencies: ["lucide-react"],
523
- usage: `
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
- interface IncentiveItem {
533
- id: string;
534
- icon?: React.ReactNode;
535
- title: string;
536
- description: string;
537
- value?: string;
538
- badge?: string;
539
- actionText?: string;
540
- url?: string;
541
- }
542
-
543
- export function IncentivesDemo() {
544
- const [showFloating, setShowFloating] = useState(true);
545
- const [progressValue, setProgressValue] = useState(75);
546
-
547
- const sampleIncentives: IncentiveItem[] = [
548
- {
549
- id: "1",
550
- icon: <Truck className="w-6 h-6 text-primary" />,
551
- title: "Free Shipping",
552
- description: "On orders over $50",
553
- value: "$0",
554
- badge: "Popular"
555
- },
556
- {
557
- id: "2",
558
- icon: <RotateCcw className="w-6 h-6 text-primary" />,
559
- title: "Easy Returns",
560
- description: "30-day return policy",
561
- actionText: "Learn more"
562
- },
563
- {
564
- id: "3",
565
- icon: <Shield className="w-6 h-6 text-primary" />,
566
- title: "Secure Checkout",
567
- description: "SSL encrypted payments",
568
- badge: "Verified"
569
- },
570
- {
571
- id: "4",
572
- icon: <Star className="w-6 h-6 text-primary" />,
573
- title: "Loyalty Rewards",
574
- description: "Earn points on every purchase",
575
- value: "2x Points",
576
- actionText: "Join now"
577
- }
578
- ];
579
-
580
- const countdownEnd = new Date(Date.now() + 2 * 60 * 60 * 1000); // 2 hours from now
581
-
582
- return (
583
- <div className="space-y-8 p-6">
584
- {/* Default Variant */}
585
- <Incentives
586
- title="Why Shop With Us"
587
- description="Discover the benefits of shopping with our store"
588
- items={sampleIncentives}
589
- onItemClick={(item) => console.log('Clicked:', item)}
590
- />
591
-
592
- {/* Banner Variant */}
593
- <Incentives
594
- title="Limited Time Offer!"
595
- description="Get amazing deals on all products"
596
- items={sampleIncentives.slice(0, 3)}
597
- variant="banner"
598
- promoCode="SAVE20"
599
- discount={20}
600
- showDismiss={true}
601
- onDismiss={() => console.log('Dismissed')}
602
- />
603
-
604
- {/* Grid Variant */}
605
- <Incentives
606
- title="Our Guarantees"
607
- items={sampleIncentives}
608
- variant="grid"
609
- onItemClick={(item) => console.log('Grid clicked:', item)}
610
- />
611
-
612
- {/* Cards Variant */}
613
- <Incentives
614
- title="Premium Benefits"
615
- description="Enjoy these exclusive perks with every purchase"
616
- items={sampleIncentives}
617
- variant="cards"
618
- onItemClick={(item) => console.log('Card clicked:', item)}
619
- />
620
-
621
- {/* Countdown Variant */}
622
- <Incentives
623
- title="Flash Sale Ends Soon!"
624
- description="Don't miss out on these incredible savings"
625
- items={sampleIncentives.slice(0, 3)}
626
- variant="countdown"
627
- countdownEnd={countdownEnd}
628
- discount={30}
629
- primaryButtonText="Shop Flash Sale"
630
- onPrimaryClick={() => console.log('Flash sale clicked')}
631
- />
632
-
633
- {/* Progress Variant */}
634
- <Incentives
635
- title="Unlock Free Shipping"
636
- description="You're almost there! Keep shopping to qualify."
637
- variant="progress"
638
- progressValue={progressValue}
639
- progressGoal={100}
640
- primaryButtonText="Continue Shopping"
641
- onPrimaryClick={() => setProgressValue(Math.min(progressValue + 25, 100))}
642
- />
643
-
644
- {/* Minimal Variant */}
645
- <div className="bg-muted/30 p-4 rounded-lg">
646
- <Incentives
647
- items={sampleIncentives.slice(0, 3)}
648
- variant="minimal"
649
- />
650
- </div>
651
-
652
- {/* Floating Variant */}
653
- {showFloating && (
654
- <Incentives
655
- items={[
656
- {
657
- id: "float1",
658
- icon: <Gift className="w-5 h-5 text-primary" />,
659
- title: "Special Offer!",
660
- description: "Get 15% off your first order"
661
- },
662
- {
663
- id: "float2",
664
- icon: <Heart className="w-5 h-5 text-primary" />,
665
- title: "Join Newsletter",
666
- description: "Get exclusive deals"
667
- }
668
- ]}
669
- variant="floating"
670
- showDismiss={true}
671
- onDismiss={() => setShowFloating(false)}
672
- onItemClick={(item) => console.log('Floating clicked:', item)}
673
- />
674
- )}
675
- </div>
676
- );
677
- }`,
678
- usagePath: null,
679
- desc: null,
680
- customize: null
681
- },
682
- {
683
- name: "Order History",
684
- value: "order-history",
685
- path: "/components/catalyst-ui/ecommerce/components/orderHistory.tsx",
686
- premium: true,
687
- source: null,
688
- category: 'E-Commerce: Components',
689
- tags: ["components", "e-commerce"],
690
- features: ["Responsive", "TypeScript", "Accessible"],
691
- dependencies: ["lucide-react"],
692
- usage: `
693
-
694
-
695
- export interface Order {
696
- id: string;
697
- date: string;
698
- status: "delivered" | "processing" | "cancelled";
699
- total: string;
700
- items: number;
701
- customer?: string;
702
- paymentMethod?: string;
703
- }
704
-
705
- export interface OrderHistoryProps {
706
- title: string;
707
- description: string;
708
- orders: Order[];
709
- primaryButtonText: string;
710
- secondaryButtonText: string;
711
- primaryButtonUrl: string;
712
- secondaryButtonUrl: string;
713
- variant?: "default" | "minimal" | "detailed";
714
- className?: string;
715
- searchPlaceholder?: string;
716
- filterOptions?: string[];
717
- }
718
-
719
- export function OrderHistoryDemo() {
720
- const sampleOrders: Order[] = [
721
- {
722
- id: "ORD-1234",
723
- date: "Jan 15, 2023",
724
- status: "delivered",
725
- total: "$125.00",
726
- items: 3,
727
- customer: "John Doe",
728
- paymentMethod: "Credit Card"
729
- },
730
- {
731
- id: "ORD-1235",
732
- date: "Feb 3, 2023",
733
- status: "processing",
734
- total: "$89.99",
735
- items: 2,
736
- customer: "Jane Smith",
737
- paymentMethod: "PayPal"
738
- },
739
- {
740
- id: "ORD-1236",
741
- date: "Mar 28, 2023",
742
- status: "cancelled",
743
- total: "$245.50",
744
- items: 5,
745
- customer: "Robert Johnson",
746
- paymentMethod: "Credit Card"
747
- },
748
- {
749
- id: "ORD-1237",
750
- date: "Apr 12, 2023",
751
- status: "delivered",
752
- total: "$72.25",
753
- items: 1,
754
- customer: "Sarah Williams",
755
- paymentMethod: "Apple Pay"
756
- }
757
- ];
758
-
759
- return (
760
- <OrderHistory
761
- title="Order History"
762
- description="Check the status of recent orders, manage returns, and download invoices."
763
- orders={sampleOrders}
764
- primaryButtonText="Continue Shopping"
765
- secondaryButtonText="Request Return"
766
- primaryButtonUrl="/products"
767
- secondaryButtonUrl="/returns"
768
- variant="default"
769
- searchPlaceholder="Search orders~/components/catalyst-ui."
770
- filterOptions={["All", "Delivered", "Processing", "Cancelled"]}
771
- />
772
- );
773
- }`,
774
- usagePath: null,
775
- desc: null,
776
- customize: null
777
- },
778
- {
779
- name: "Order Summaries",
780
- value: "order-summaries",
781
- path: "/components/catalyst-ui/ecommerce/components/orderSummaries.tsx",
782
- premium: true,
783
- source: null,
784
- category: 'E-Commerce: Components',
785
- tags: ["components", "e-commerce"],
786
- features: ["Responsive", "TypeScript", "Accessible"],
787
- dependencies: ["lucide-react"],
788
- usage: `
789
-
790
-
791
-
792
- export function OrderSummaryDemo() {
793
- const [items, setItems] = useState<OrderItem[]>([
794
- {
795
- id: "1",
796
- name: "Basic Tee 6-Pack",
797
- image: "/api/placeholder/64/64",
798
- price: 192,
799
- quantity: 1,
800
- variant: "White"
801
- },
802
- {
803
- id: "2",
804
- name: "Basic Tee",
805
- image: "/api/placeholder/64/64",
806
- price: 32,
807
- quantity: 2,
808
- variant: "Black"
809
- }
810
- ]);
811
-
812
- const [discount, setDiscount] = useState(0);
813
- const subtotal = items.reduce((sum, item) => sum + (item.price * item.quantity), 0);
814
- const shipping = 5.00;
815
- const tax = subtotal * 0.08;
816
- const total = subtotal + shipping + tax - discount;
817
-
818
- const handleApplyDiscount = (code: string) => {
819
- if (code.toLowerCase() === "save10") {
820
- setDiscount(subtotal * 0.1);
821
- }
822
- };
823
-
824
- const handleRemoveItem = (itemId: string) => {
825
- setItems(items.filter(item => item.id !== itemId));
826
- };
827
-
828
- const handleUpdateQuantity = (itemId: string, quantity: number) => {
829
- setItems(items.map(item =>
830
- item.id === itemId ? { ~/components/catalyst-ui.item, quantity } : item
831
- ));
832
- };
833
-
834
- return (
835
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-6">
836
- <OrderSummary
837
- title="Order Summary"
838
- description="Review your items before checkout"
839
- items={items}
840
- subtotal={subtotal}
841
- shipping={shipping}
842
- tax={tax}
843
- discount={discount}
844
- total={total}
845
- onApplyDiscount={handleApplyDiscount}
846
- onRemoveItem={handleRemoveItem}
847
- onUpdateQuantity={handleUpdateQuantity}
848
- variant="default"
849
- />
850
-
851
- <OrderSummary
852
- items={items}
853
- subtotal={subtotal}
854
- shipping={shipping}
855
- tax={tax}
856
- discount={discount}
857
- total={total}
858
- variant="compact"
859
- />
860
-
861
- <OrderSummary
862
- items={items}
863
- total={total}
864
- variant="minimal"
865
- />
866
-
867
- <div className="md:col-span-2 lg:col-span-3">
868
- <OrderSummary
869
- title="Detailed Order Summary"
870
- description="Complete breakdown of your purchase"
871
- items={items}
872
- subtotal={subtotal}
873
- shipping={shipping}
874
- tax={tax}
875
- discount={discount}
876
- total={total}
877
- onApplyDiscount={handleApplyDiscount}
878
- onRemoveItem={handleRemoveItem}
879
- onUpdateQuantity={handleUpdateQuantity}
880
- variant="card"
881
- />
882
- </div>
883
- </div>
884
- );
885
- }`,
886
- usagePath: null,
887
- desc: null,
888
- customize: null
889
- },
890
- {
891
- name: "Product Card",
892
- value: "product-card",
893
- path: "/components/catalyst-ui/ecommerce/components/productCard.tsx",
894
- premium: true,
895
- source: null,
896
- category: 'E-Commerce: Components',
897
- tags: ["components", "e-commerce"],
898
- features: ["Responsive", "TypeScript", "Accessible"],
899
- dependencies: ["lucide-react"],
900
- usage: null,
901
- usagePath: "/components/catalyst-ui/ecommerce/demo/productCard.tsx",
902
- desc: null,
903
- customize: null
904
- },
905
- {
906
- name: "Product Features",
907
- value: "product-features",
908
- path: "/components/catalyst-ui/ecommerce/components/productFeatures.tsx",
909
- premium: true,
910
- source: null,
911
- category: 'E-Commerce: Components',
912
- tags: ["components", "e-commerce"],
913
- features: ["Responsive", "TypeScript", "Accessible"],
914
- dependencies: ["lucide-react"],
915
- usage: `
916
-
917
-
918
-
919
-
920
-
921
- export type Feature = {
922
- name: string;
923
- description: string;
924
- icon: React.ComponentType<any>;
925
- };
926
-
927
- export type ProductFeature = {
928
- title: string;
929
- description: string;
930
- features: string[];
931
- };
932
-
933
- export type ProductFeaturesProps = {
934
- title?: string;
935
- description?: string;
936
- primaryButtonText?: string;
937
- secondaryButtonText?: string;
938
- primaryButtonUrl?: string;
939
- secondaryButtonUrl?: string;
940
- className?: string;
941
- variant?: "default" | "with-image" | "split-with-image" | "centered" | "grid";
942
- features?: Feature[];
943
- productFeatures?: ProductFeature[];
944
- imageUrl?: string;
945
- rating?: number;
946
- price?: string;
947
- colors?: { name: string; class: string; selectedClass: string }[];
948
- sizes?: { name: string; inStock: boolean }[];
949
- };
950
-
951
- export function ProductFeaturesDemo() {
952
- return (
953
- <ProductFeatures
954
- title="Basic Tee"
955
- description="The Basic Tee 6-Pack allows you to fully express your vibrant personality with three grayscale options. Feeling adventurous? Put on a heather gray tee. Want to be a trendsetter? Try our exclusive colorway: 'Black'. Need to add an extra pop of color to your outfit? Our white tee has you covered."
956
- primaryButtonText="Add to bag"
957
- secondaryButtonText="Continue Shopping"
958
- primaryButtonUrl="/checkout"
959
- secondaryButtonUrl="/products"
960
- variant="with-image"
961
- />
962
- );
963
- }`,
964
- usagePath: null,
965
- desc: null,
966
- customize: null
967
- },
968
- {
969
- name: "Product Lists",
970
- value: "product-lists",
971
- path: "/components/catalyst-ui/ecommerce/components/productFeatures.tsx",
972
- premium: true,
973
- source: null,
974
- category: 'E-Commerce: Components',
975
- tags: ["components", "e-commerce"],
976
- features: ["Responsive", "TypeScript", "Accessible"],
977
- dependencies: ["lucide-react"],
978
- usage: `
979
-
980
-
981
- interface Product {
982
- id: string;
983
- name: string;
984
- description: string;
985
- price: number;
986
- originalPrice?: number;
987
- rating: number;
988
- reviewCount: number;
989
- image: string;
990
- tags: string[];
991
- category: string;
992
- inStock: boolean;
993
- isNew?: boolean;
994
- isFeatured?: boolean;
995
- }
996
-
997
- export function ProductListDemo() {
998
- // Sample products data
999
- const sampleProducts: Product[] = [
1000
- {
1001
- id: "1",
1002
- name: "Premium Headphones",
1003
- description: "Noise-cancelling wireless headphones with exceptional sound quality.",
1004
- price: 299.99,
1005
- originalPrice: 349.99,
1006
- rating: 4.5,
1007
- reviewCount: 124,
1008
- image: "/placeholder-headphones.jpg",
1009
- tags: ["Wireless", "Noise-Cancelling", "Bluetooth"],
1010
- category: "Audio",
1011
- inStock: true,
1012
- isNew: true,
1013
- isFeatured: true
1014
- },
1015
- {
1016
- id: "2",
1017
- name: "Smart Watch",
1018
- description: "Advanced smartwatch with health monitoring and notifications.",
1019
- price: 249.99,
1020
- rating: 4.2,
1021
- reviewCount: 89,
1022
- image: "/placeholder-watch.jpg",
1023
- tags: ["Wearable", "Fitness", "Smart"],
1024
- category: "Wearables",
1025
- inStock: true,
1026
- isFeatured: true
1027
- },
1028
- {
1029
- id: "3",
1030
- name: "Wireless Earbuds",
1031
- description: "Compact true wireless earbuds with charging case.",
1032
- price: 129.99,
1033
- originalPrice: 149.99,
1034
- rating: 4.3,
1035
- reviewCount: 67,
1036
- image: "/placeholder-earbuds.jpg",
1037
- tags: ["Wireless", "Bluetooth", "Portable"],
1038
- category: "Audio",
1039
- inStock: false,
1040
- isNew: true
1041
- },
1042
- {
1043
- id: "4",
1044
- name: "Gaming Keyboard",
1045
- description: "Mechanical gaming keyboard with RGB lighting.",
1046
- price: 89.99,
1047
- rating: 4.7,
1048
- reviewCount: 156,
1049
- image: "/placeholder-keyboard.jpg",
1050
- tags: ["Gaming", "RGB", "Mechanical"],
1051
- category: "Accessories",
1052
- inStock: true
1053
- },
1054
- {
1055
- id: "5",
1056
- name: "Portable Speaker",
1057
- description: "Waterproof Bluetooth speaker with 24-hour battery life.",
1058
- price: 79.99,
1059
- rating: 4.4,
1060
- reviewCount: 92,
1061
- image: "/placeholder-speaker.jpg",
1062
- tags: ["Bluetooth", "Waterproof", "Portable"],
1063
- category: "Audio",
1064
- inStock: true
1065
- },
1066
- {
1067
- id: "6",
1068
- name: "Phone Case",
1069
- description: "Protective case with drop protection and sleek design.",
1070
- price: 39.99,
1071
- rating: 4.1,
1072
- reviewCount: 204,
1073
- image: "/placeholder-case.jpg",
1074
- tags: ["Protection", "Accessory", "Mobile"],
1075
- category: "Accessories",
1076
- inStock: true
1077
- }
1078
- ];
1079
-
1080
- const handleProductClick = (product: Product) => {
1081
- console.log('Product clicked:', product);
1082
- // Navigate to product detail page
1083
- };
1084
-
1085
- const handleAddToCart = (product: Product) => {
1086
- console.log('Added to cart:', product);
1087
- // Add to cart logic
1088
- };
1089
-
1090
- const handleAddToWishlist = (product: Product) => {
1091
- console.log('Added to wishlist:', product);
1092
- // Add to wishlist logic
1093
- };
1094
-
1095
- return (
1096
- <ProductList
1097
- products={sampleProducts}
1098
- title="Our Products"
1099
- description="Discover our latest collection of premium gadgets and accessories"
1100
- layout="grid"
1101
- showFilters={true}
1102
- showSort={true}
1103
- onProductClick={handleProductClick}
1104
- onAddToCart={handleAddToCart}
1105
- onAddToWishlist={handleAddToWishlist}
1106
- />
1107
- );
1108
- }`,
1109
- usagePath: null,
1110
- desc: null,
1111
- customize: null
1112
- },
1113
- {
1114
- name: "Product Overview",
1115
- value: "product-overview",
1116
- path: "/components/catalyst-ui/ecommerce/components/productOverview.tsx",
1117
- premium: true,
1118
- source: null,
1119
- category: 'E-Commerce: Components',
1120
- tags: ["components", "e-commerce"],
1121
- features: ["Responsive", "TypeScript", "Accessible"],
1122
- dependencies: ["lucide-react"],
1123
- usage: null,
1124
- usagePath: "/components/catalyst-ui/ecommerce/components/productOverview.tsx",
1125
- desc: null,
1126
- customize: null
1127
- },
1128
- {
1129
- name: "Product QuickViews",
1130
- value: "product-quick-views",
1131
- path: "/components/catalyst-ui/ecommerce/components/productQuickViews.tsx",
1132
- source: null,
1133
- premium: true,
1134
- category: 'E-Commerce: Components',
1135
- tags: ["components", "e-commerce"],
1136
- features: ["Responsive", "TypeScript", "Accessible"],
1137
- dependencies: ["lucide-react"],
1138
- usage: null,
1139
- usagePath: "/components/catalyst-ui/ecommerce/demo/productQuickViews.tsx",
1140
- desc: null,
1141
- customize: null
1142
- },
1143
- {
1144
- name: "Promo Sections",
1145
- value: "promo-sections",
1146
- path: "/components/catalyst-ui/ecommerce/components/promoSectionts.tsx",
1147
- source: null,
1148
- premium: true,
1149
- category: 'E-Commerce: Components',
1150
- tags: ["components", "e-commerce"],
1151
- features: ["Responsive", "TypeScript", "Accessible"],
1152
- dependencies: ["lucide-react"],
1153
- usage: null,
1154
- usagePath: "/components/catalyst-ui/ecommerce/demo/promoSectionts.tsx",
1155
- desc: null,
1156
- customize: null
1157
- },
1158
- {
1159
- name: "Reviews",
1160
- value: "reviews",
1161
- path: "/components/catalyst-ui/ecommerce/components/reviews.tsx",
1162
- source: null,
1163
- premium: true,
1164
- category: 'E-Commerce: Components',
1165
- tags: ["components", "e-commerce"],
1166
- features: ["Responsive", "TypeScript", "Accessible"],
1167
- dependencies: ["lucide-react"],
1168
- usage: `
1169
-
1170
-
1171
- export function ReviewsDemo() {
1172
- const sampleReviews: Review[] = [
1173
- {
1174
- id: "1",
1175
- author: "John Doe",
1176
- rating: 5,
1177
- content:
1178
- "This product has completely transformed my workflow. The quality is exceptional and it's incredibly easy to use. I would highly recommend it to anyone looking for a solution like this.",
1179
- date: "January 15, 2023",
1180
- avatar: "/avatars/john-doe.jpg", // This would be a real path in your app
1181
- },
1182
- {
1183
- id: "2",
1184
- author: "Jane Smith",
1185
- rating: 4,
1186
- content:
1187
- "Very impressed with the build quality and attention to detail. The only reason I'm not giving 5 stars is because the instructions could be a bit clearer for beginners.",
1188
- date: "February 3, 2023",
1189
- },
1190
- {
1191
- id: "3",
1192
- author: "Robert Johnson",
1193
- rating: 5,
1194
- content:
1195
- "I've tried many alternatives but this one stands out for its simplicity and effectiveness. The customer support team was also very helpful when I had questions.",
1196
- date: "March 28, 2023",
1197
- },
1198
- ];
1199
-
1200
- return (
1201
- <ReviewsComponent
1202
- title="Customer Reviews"
1203
- description="See what our customers are saying about our products. We take pride in providing high-quality items and excellent customer service."
1204
- reviews={sampleReviews}
1205
- primaryButtonText="Write a Review"
1206
- secondaryButtonText="See All Reviews"
1207
- primaryButtonUrl="/write-review"
1208
- secondaryButtonUrl="/all-reviews"
1209
- variant="default"
1210
- />
1211
- );
1212
- }`,
1213
- usagePath: null,
1214
- desc: null,
1215
- customize: null
1216
- },
1217
- {
1218
- name: "Shopping Carts",
1219
- value: "shopping-carts",
1220
- path: "/components/catalyst-ui/ecommerce/components/shoppingCarts.tsx",
1221
- source: null,
1222
- premium: true,
1223
- category: 'E-Commerce: Components',
1224
- tags: ["components", "e-commerce"],
1225
- features: ["Responsive", "TypeScript", "Accessible"],
1226
- dependencies: ["lucide-react"],
1227
- usage: `
1228
- // app/components/shopping-cart.tsx
1229
-
1230
-
1231
-
1232
-
1233
-
1234
- export type CartItem = {
1235
- id: string;
1236
- name: string;
1237
- price: number;
1238
- quantity: number;
1239
- image: string;
1240
- description?: string;
1241
- };
1242
-
1243
- export type ShoppingCartProps = {
1244
- items: CartItem[];
1245
- title?: string;
1246
- description?: string;
1247
- url?: string;
1248
- primaryButtonText?: string;
1249
- secondaryButtonText?: string;
1250
- className?: string;
1251
- variant?: "default" | "minimalist" | "sidebar" | "with-image";
1252
- onUpdateQuantity?: (id: string, quantity: number) => void;
1253
- onRemoveItem?: (id: string) => void;
1254
- onContinueShopping?: () => void;
1255
- onCheckout?: () => void;
1256
- };
1257
-
1258
- // Example usage component
1259
- export function ShoppingCartDemo() {
1260
- const [cartItems, setCartItems] = useState<CartItem[]>([
1261
- {
1262
- id: "1",
1263
- name: "Basic Tee",
1264
- price: 32.0,
1265
- quantity: 1,
1266
- image: "https://tailwindui.com/img/ecommerce-images/shopping-cart-page-01-product-01.jpg",
1267
- description: "Sienna",
1268
- },
1269
- {
1270
- id: "2",
1271
- name: "Basic Bottle",
1272
- price: 25.0,
1273
- quantity: 1,
1274
- image: "https://tailwindui.com/img/ecommerce-images/shopping-cart-page-01-product-02.jpg",
1275
- description: "Clear",
1276
- },
1277
- ]);
1278
-
1279
- const handleUpdateQuantity = (id: string, quantity: number) => {
1280
- setCartItems((prevItems) => prevItems.map((item) => (item.id === id ? { ~/components/catalyst-ui.item, quantity } : item)));
1281
- };
1282
-
1283
- const handleRemoveItem = (id: string) => {
1284
- setCartItems((prevItems) => prevItems.filter((item) => item.id !== id));
1285
- };
1286
-
1287
- return (
1288
- <ShoppingCart
1289
- items={cartItems}
1290
- title="Your Cart"
1291
- description="Check your items and proceed to checkout"
1292
- url="/products"
1293
- primaryButtonText="Checkout"
1294
- secondaryButtonText="Continue Shopping"
1295
- variant="default"
1296
- onUpdateQuantity={handleUpdateQuantity}
1297
- onRemoveItem={handleRemoveItem}
1298
- />
1299
- );
1300
- }
1301
- `,
1302
- usagePath: null,
1303
- desc: null,
1304
- customize: null
1305
- },
1306
- {
1307
- name: "Store Navigation",
1308
- value: "store-navigation",
1309
- path: "/components/catalyst-ui/ecommerce/components/storeNavigation.tsx",
1310
- source: null,
1311
- premium: true,
1312
- category: 'E-Commerce: Components',
1313
- tags: ["components", "e-commerce"],
1314
- features: ["Responsive", "TypeScript", "Accessible"],
1315
- dependencies: ["lucide-react"],
1316
- usage: null,
1317
- usagePath: "/components/catalyst-ui/ecommerce/demo/storeNavigation.tsx",
1318
- desc: null,
1319
- customize: null
1320
- },
1321
- ];
1322
- export const ecommerceModules = [
1323
- {
1324
- name: "Promotion Engine",
1325
- value: "promotion-engine",
1326
- path: "/components/catalyst-ui/ecommerce/modules/promotionEngine.ts",
1327
- premium: true,
1328
- source: null,
1329
- category: 'E-Commerce: Modules',
1330
- tags: ["modules", "e-commerce"],
1331
- features: ["Responsive", "TypeScript", "Accessible"],
1332
- dependencies: ["lucide-react"],
1333
- usage: null,
1334
- usagePath: "/components/catalyst-ui/ecommerce/modules/promotionEngine.ts",
1335
- desc: null,
1336
- customize: null
1337
- },
1338
- {
1339
- name: "Promotions Manager",
1340
- value: "promotions-manager",
1341
- path: "/components/catalyst-ui/ecommerce/modules/promotionsManager.tsx",
1342
- premium: true,
1343
- source: null,
1344
- category: 'E-Commerce: Modules',
1345
- tags: ["modules", "e-commerce"],
1346
- features: ["Responsive", "TypeScript", "Accessible"],
1347
- dependencies: ["lucide-react"],
1348
- usage: null,
1349
- usagePath: "/components/catalyst-ui/ecommerce/modules/promotionsManager.tsx",
1350
- desc: null,
1351
- customize: null
1352
- },
1353
- {
1354
- name: "Cash Till Manager",
1355
- value: "cash-till-manager",
1356
- path: "/components/catalyst-ui/ecommerce/modules/cash-till-manager.tsx",
1357
- premium: true,
1358
- source: null,
1359
- category: 'E-Commerce: Modules',
1360
- tags: ["modules", "e-commerce"],
1361
- features: ["Responsive", "TypeScript", "Accessible"],
1362
- dependencies: ["lucide-react"],
1363
- usage: null,
1364
- usagePath: "/components/catalyst-ui/ecommerce/modules/cash-till-manager.tsx",
1365
- desc: null,
1366
- customize: null
1367
- },
1368
- {
1369
- name: "Cash Drawer Wizard",
1370
- value: "cash-drawer-wizard",
1371
- path: "/components/catalyst-ui/ecommerce/modules/cash-drawer-wizard.tsx",
1372
- premium: true,
1373
- source: null,
1374
- category: 'E-Commerce: Modules',
1375
- tags: ["modules", "e-commerce"],
1376
- features: ["Responsive", "TypeScript", "Accessible"],
1377
- dependencies: ["lucide-react"],
1378
- usage: null,
1379
- usagePath: "/components/catalyst-ui/ecommerce/modules/cash-drawer-wizard.tsx",
1380
- desc: null,
1381
- customize: null
1382
- },
1383
- ];
1384
- export const combinedEcom = [
1385
- ...ecommerceComponents,
1386
- ...ecommerceModules,
1387
- ];